访问地址:https://zhtt.gitee.io/angular-demo/ng-zorro/#/list/drag-table
安装依赖
npm i great-ngform --save
导入模块
import {GreatDirectiveModule} from "great-ngform";
在需要拖拽的组件中初始化宽度
greatTableDragCfg = {
x: '1320px',
nameWidth: '120px',
};
<nz-table
#basicTable
[nzData]="listOfData"
[nzScroll]="greatTableDragCfg"
>
<thead>
<tr>
<th
[style.width]="greatTableDragCfg.nameWidth"
[greatTableColumnDrag]="greatTableDragCfg"
columnName="nameWidth"
>Name
</th>
</tr>
</thead>
</nz-table>