vxe-table 3.10.16 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +5 -1
- package/es/table/module/edit/mixin.js +24 -15
- package/es/table/src/body.js +40 -24
- package/es/table/src/cell.js +75 -32
- package/es/table/src/footer.js +159 -131
- package/es/table/src/header.js +128 -90
- package/es/table/src/methods.js +284 -65
- package/es/table/src/props.js +5 -1
- package/es/table/src/table.js +64 -20
- package/es/table/style.css +33 -20
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +9 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +33 -20
- package/es/vxe-table/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/index.umd.js +906 -449
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +5 -1
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/edit/mixin.js +24 -15
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/body.js +31 -15
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +82 -35
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/footer.js +198 -161
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +169 -128
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +313 -68
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +5 -1
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +70 -20
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +33 -20
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +9 -4
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +33 -20
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +3 -3
- package/packages/table/module/custom/mixin.ts +5 -1
- package/packages/table/module/edit/mixin.ts +24 -15
- package/packages/table/src/body.ts +43 -25
- package/packages/table/src/cell.ts +120 -67
- package/packages/table/src/footer.ts +164 -150
- package/packages/table/src/header.ts +136 -90
- package/packages/table/src/methods.ts +296 -67
- package/packages/table/src/props.ts +5 -1
- package/packages/table/src/table.ts +71 -19
- package/packages/ui/index.ts +8 -3
- package/styles/components/table.scss +42 -35
- /package/es/{iconfont.1731633464058.ttf → iconfont.1731890707082.ttf} +0 -0
- /package/es/{iconfont.1731633464058.woff → iconfont.1731890707082.woff} +0 -0
- /package/es/{iconfont.1731633464058.woff2 → iconfont.1731890707082.woff2} +0 -0
- /package/lib/{iconfont.1731633464058.ttf → iconfont.1731890707082.ttf} +0 -0
- /package/lib/{iconfont.1731633464058.woff → iconfont.1731890707082.woff} +0 -0
- /package/lib/{iconfont.1731633464058.woff2 → iconfont.1731890707082.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.
|
|
2223
|
+
const version = "3.11.0";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2257,8 +2257,11 @@ core_.VxeUI.setConfig({
|
|
|
2257
2257
|
// trigger: 'default'
|
|
2258
2258
|
strict: true
|
|
2259
2259
|
},
|
|
2260
|
-
|
|
2261
|
-
|
|
2260
|
+
rowDragConfig: {
|
|
2261
|
+
showIcon: true
|
|
2262
|
+
},
|
|
2263
|
+
columnDragConfig: {
|
|
2264
|
+
showIcon: true
|
|
2262
2265
|
},
|
|
2263
2266
|
checkboxConfig: {
|
|
2264
2267
|
// trigger: 'default',
|
|
@@ -2355,7 +2358,8 @@ core_.VxeUI.setConfig({
|
|
|
2355
2358
|
},
|
|
2356
2359
|
areaConfig: {
|
|
2357
2360
|
autoClear: true,
|
|
2358
|
-
selectCellByHeader: true
|
|
2361
|
+
selectCellByHeader: true,
|
|
2362
|
+
selectCellByBody: true
|
|
2359
2363
|
},
|
|
2360
2364
|
clipConfig: {
|
|
2361
2365
|
isCopy: true,
|
|
@@ -2452,6 +2456,7 @@ core_.VxeUI.setIcon({
|
|
|
2452
2456
|
TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
|
|
2453
2457
|
TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
|
|
2454
2458
|
TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
|
|
2459
|
+
TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
|
|
2455
2460
|
// toolbar
|
|
2456
2461
|
TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
|
|
2457
2462
|
TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
|
|
@@ -2769,7 +2774,7 @@ function isNodeElement(elem) {
|
|
|
2769
2774
|
const {
|
|
2770
2775
|
log: log_log
|
|
2771
2776
|
} = core_.VxeUI;
|
|
2772
|
-
const log_version = `table v${"3.
|
|
2777
|
+
const log_version = `table v${"3.11.0"}`;
|
|
2773
2778
|
const warnLog = log_log.create('warn', log_version);
|
|
2774
2779
|
const errLog = log_log.create('error', log_version);
|
|
2775
2780
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3518,12 +3523,17 @@ function renderCellDragIcon(h, params) {
|
|
|
3518
3523
|
const {
|
|
3519
3524
|
$table
|
|
3520
3525
|
} = params;
|
|
3521
|
-
const
|
|
3526
|
+
const tableProps = $table;
|
|
3522
3527
|
const {
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
const
|
|
3528
|
+
dragConfig
|
|
3529
|
+
} = tableProps;
|
|
3530
|
+
const rowDragOpts = $table.computeRowDragOpts;
|
|
3531
|
+
const {
|
|
3532
|
+
icon,
|
|
3533
|
+
disabledMethod
|
|
3534
|
+
} = rowDragOpts;
|
|
3535
|
+
const rDisabledMethod = disabledMethod || (dragConfig ? dragConfig.rowDisabledMethod : null);
|
|
3536
|
+
const isDisabled = rDisabledMethod && rDisabledMethod(params);
|
|
3527
3537
|
return h('span', {
|
|
3528
3538
|
key: 'dg',
|
|
3529
3539
|
class: ['vxe-cell--drag-handle', {
|
|
@@ -3538,14 +3548,13 @@ function renderCellDragIcon(h, params) {
|
|
|
3538
3548
|
mouseup: $table.handleCellDragMouseupEvent
|
|
3539
3549
|
}
|
|
3540
3550
|
}, [h('i', {
|
|
3541
|
-
class: rowIcon || cell_getIcon().TABLE_DRAG_ROW
|
|
3551
|
+
class: icon || (dragConfig ? dragConfig.rowIcon : '') || cell_getIcon().TABLE_DRAG_ROW
|
|
3542
3552
|
})]);
|
|
3543
3553
|
}
|
|
3544
3554
|
function renderCellBaseVNs(h, params, content) {
|
|
3545
3555
|
const {
|
|
3546
3556
|
$table,
|
|
3547
3557
|
column,
|
|
3548
|
-
row,
|
|
3549
3558
|
level
|
|
3550
3559
|
} = params;
|
|
3551
3560
|
const {
|
|
@@ -3553,25 +3562,64 @@ function renderCellBaseVNs(h, params, content) {
|
|
|
3553
3562
|
} = column;
|
|
3554
3563
|
const tableProps = $table;
|
|
3555
3564
|
const {
|
|
3556
|
-
treeConfig
|
|
3565
|
+
treeConfig,
|
|
3566
|
+
dragConfig
|
|
3557
3567
|
} = tableProps;
|
|
3558
3568
|
const rowOpts = $table.computeRowOpts;
|
|
3559
|
-
const
|
|
3569
|
+
const rowDragOpts = $table.computeRowDragOpts;
|
|
3560
3570
|
const {
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
} =
|
|
3571
|
+
showIcon,
|
|
3572
|
+
visibleMethod
|
|
3573
|
+
} = rowDragOpts;
|
|
3574
|
+
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
|
|
3564
3575
|
const vns = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(content) ? content : [content];
|
|
3565
|
-
if (dragSort && rowOpts.drag && showRowIcon && (!
|
|
3566
|
-
row,
|
|
3567
|
-
column
|
|
3568
|
-
}))) {
|
|
3576
|
+
if (dragSort && rowOpts.drag && (showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params))) {
|
|
3569
3577
|
if (!treeConfig || !level) {
|
|
3570
3578
|
vns.unshift(renderCellDragIcon(h, params));
|
|
3571
3579
|
}
|
|
3572
3580
|
}
|
|
3573
3581
|
return vns;
|
|
3574
3582
|
}
|
|
3583
|
+
function renderHeaderCellDragIcon(h, params) {
|
|
3584
|
+
const {
|
|
3585
|
+
$table,
|
|
3586
|
+
column
|
|
3587
|
+
} = params;
|
|
3588
|
+
const columnOpts = $table.computeColumnOpts;
|
|
3589
|
+
const columnDragOpts = $table.computeColumnDragOpts;
|
|
3590
|
+
const {
|
|
3591
|
+
showIcon,
|
|
3592
|
+
icon,
|
|
3593
|
+
visibleMethod,
|
|
3594
|
+
disabledMethod
|
|
3595
|
+
} = columnDragOpts;
|
|
3596
|
+
const isDisabled = disabledMethod && disabledMethod(params);
|
|
3597
|
+
if (columnOpts.drag && showIcon && (!visibleMethod || visibleMethod(params))) {
|
|
3598
|
+
if (!(column.fixed || column.parentId)) {
|
|
3599
|
+
return h('span', {
|
|
3600
|
+
key: 'dg',
|
|
3601
|
+
class: ['vxe-cell--drag-handle', {
|
|
3602
|
+
'is--disabled': isDisabled
|
|
3603
|
+
}],
|
|
3604
|
+
on: {
|
|
3605
|
+
mousedown(evnt) {
|
|
3606
|
+
if (!isDisabled) {
|
|
3607
|
+
$table.handleHeaderCellDragMousedownEvent(evnt, params);
|
|
3608
|
+
}
|
|
3609
|
+
},
|
|
3610
|
+
mouseup: $table.handleHeaderCellDragMouseupEvent
|
|
3611
|
+
}
|
|
3612
|
+
}, [h('i', {
|
|
3613
|
+
class: icon || cell_getIcon().TABLE_DRAG_COLUMN
|
|
3614
|
+
})]);
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3617
|
+
return renderEmptyElement($table);
|
|
3618
|
+
}
|
|
3619
|
+
function renderHeaderCellBaseVNs(h, params, content) {
|
|
3620
|
+
const vns = [renderTitlePrefixIcon(h, params), renderHeaderCellDragIcon(h, params), ...(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(content) ? content : [content]), renderTitleSuffixIcon(h, params)];
|
|
3621
|
+
return vns;
|
|
3622
|
+
}
|
|
3575
3623
|
function renderTitleContent(h, params, content) {
|
|
3576
3624
|
const {
|
|
3577
3625
|
$table,
|
|
@@ -3751,7 +3799,7 @@ const Cell = {
|
|
|
3751
3799
|
return createColumn($xetable, _vm, renMaps);
|
|
3752
3800
|
},
|
|
3753
3801
|
/**
|
|
3754
|
-
*
|
|
3802
|
+
* 列头标题
|
|
3755
3803
|
*/
|
|
3756
3804
|
renderHeaderTitle(h, params) {
|
|
3757
3805
|
const {
|
|
@@ -3777,7 +3825,7 @@ const Cell = {
|
|
|
3777
3825
|
return renderTitleContent(h, params, formatText(column.getTitle(), 1));
|
|
3778
3826
|
},
|
|
3779
3827
|
renderDefaultHeader(h, params) {
|
|
3780
|
-
return
|
|
3828
|
+
return renderHeaderCellBaseVNs(h, params, Cell.renderHeaderTitle(h, params));
|
|
3781
3829
|
},
|
|
3782
3830
|
renderDefaultCell(h, params) {
|
|
3783
3831
|
const {
|
|
@@ -3898,7 +3946,7 @@ const Cell = {
|
|
|
3898
3946
|
}, cellVNodes)])];
|
|
3899
3947
|
},
|
|
3900
3948
|
/**
|
|
3901
|
-
*
|
|
3949
|
+
* 序号
|
|
3902
3950
|
*/
|
|
3903
3951
|
renderSeqHeader(h, params) {
|
|
3904
3952
|
const {
|
|
@@ -3908,7 +3956,7 @@ const Cell = {
|
|
|
3908
3956
|
const {
|
|
3909
3957
|
slots
|
|
3910
3958
|
} = column;
|
|
3911
|
-
return renderTitleContent(h, params, slots && slots.header ? $table.callSlot(slots.header, params, h) : formatText(column.getTitle(), 1));
|
|
3959
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, slots && slots.header ? $table.callSlot(slots.header, params, h) : formatText(column.getTitle(), 1)));
|
|
3912
3960
|
},
|
|
3913
3961
|
renderSeqCell(h, params) {
|
|
3914
3962
|
const {
|
|
@@ -3947,9 +3995,9 @@ const Cell = {
|
|
|
3947
3995
|
} = column;
|
|
3948
3996
|
const headerSlot = slots ? slots.header : null;
|
|
3949
3997
|
const titleSlot = slots ? slots.title : null;
|
|
3950
|
-
return renderTitleContent(h, params, headerSlot ? $table.callSlot(headerSlot, params, h) : [h('span', {
|
|
3998
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot ? $table.callSlot(headerSlot, params, h) : [h('span', {
|
|
3951
3999
|
class: 'vxe-radio--label'
|
|
3952
|
-
}, titleSlot ? $table.callSlot(titleSlot, params, h) : formatText(column.getTitle(), 1))]);
|
|
4000
|
+
}, titleSlot ? $table.callSlot(titleSlot, params, h) : formatText(column.getTitle(), 1))]));
|
|
3953
4001
|
},
|
|
3954
4002
|
renderRadioCell(h, params) {
|
|
3955
4003
|
const {
|
|
@@ -4063,14 +4111,14 @@ const Cell = {
|
|
|
4063
4111
|
indeterminate: isAllCheckboxIndeterminate
|
|
4064
4112
|
};
|
|
4065
4113
|
if (headerSlot) {
|
|
4066
|
-
return renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h));
|
|
4114
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h)));
|
|
4067
4115
|
}
|
|
4068
4116
|
if (checkboxOpts.checkStrictly ? !checkboxOpts.showHeader : checkboxOpts.showHeader === false) {
|
|
4069
|
-
return renderTitleContent(h, checkboxParams, [h('span', {
|
|
4117
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [h('span', {
|
|
4070
4118
|
class: 'vxe-checkbox--label'
|
|
4071
|
-
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)]);
|
|
4119
|
+
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)]));
|
|
4072
4120
|
}
|
|
4073
|
-
return renderTitleContent(h, checkboxParams, [h('span', {
|
|
4121
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [h('span', {
|
|
4074
4122
|
class: ['vxe-cell--checkbox', {
|
|
4075
4123
|
'is--checked': isAllCheckboxSelected,
|
|
4076
4124
|
'is--disabled': isAllCheckboxDisabled,
|
|
@@ -4084,7 +4132,7 @@ const Cell = {
|
|
|
4084
4132
|
class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
4085
4133
|
})].concat(titleSlot || headerTitle ? [h('span', {
|
|
4086
4134
|
class: 'vxe-checkbox--label'
|
|
4087
|
-
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)] : []))]);
|
|
4135
|
+
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)] : []))]));
|
|
4088
4136
|
},
|
|
4089
4137
|
renderCheckboxCell(h, params) {
|
|
4090
4138
|
const {
|
|
@@ -4356,13 +4404,13 @@ const Cell = {
|
|
|
4356
4404
|
* 排序和筛选
|
|
4357
4405
|
*/
|
|
4358
4406
|
renderSortAndFilterHeader(h, params) {
|
|
4359
|
-
return
|
|
4407
|
+
return renderHeaderCellBaseVNs(h, params, Cell.renderHeaderTitle(h, params).concat(Cell.renderSortIcon(h, params)));
|
|
4360
4408
|
},
|
|
4361
4409
|
/**
|
|
4362
4410
|
* 排序
|
|
4363
4411
|
*/
|
|
4364
4412
|
renderSortHeader(h, params) {
|
|
4365
|
-
return Cell.
|
|
4413
|
+
return renderHeaderCellBaseVNs(h, params, Cell.renderHeaderTitle(h, params).concat(Cell.renderSortIcon(h, params)));
|
|
4366
4414
|
},
|
|
4367
4415
|
renderSortIcon(h, params) {
|
|
4368
4416
|
const {
|
|
@@ -4409,7 +4457,7 @@ const Cell = {
|
|
|
4409
4457
|
* 筛选
|
|
4410
4458
|
*/
|
|
4411
4459
|
renderFilterHeader(h, params) {
|
|
4412
|
-
return Cell.
|
|
4460
|
+
return renderHeaderCellBaseVNs(h, params, Cell.renderHeaderTitle(h, params).concat(Cell.renderFilterIcon(h, params)));
|
|
4413
4461
|
},
|
|
4414
4462
|
renderFilterIcon(h, params) {
|
|
4415
4463
|
const {
|
|
@@ -4470,11 +4518,15 @@ const Cell = {
|
|
|
4470
4518
|
isRequired = columnRules.some(rule => rule.required);
|
|
4471
4519
|
}
|
|
4472
4520
|
}
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4521
|
+
let editIconVNs = [];
|
|
4522
|
+
if (isEnableConf(editConfig)) {
|
|
4523
|
+
editIconVNs = [isRequired && editOpts.showAsterisk ? h('i', {
|
|
4524
|
+
class: 'vxe-cell--required-icon'
|
|
4525
|
+
}) : renderEmptyElement($table), isEnableConf(editRender) && editOpts.showIcon ? h('i', {
|
|
4526
|
+
class: ['vxe-cell--edit-icon', editOpts.icon || cell_getIcon().TABLE_EDIT]
|
|
4527
|
+
}) : renderEmptyElement($table)];
|
|
4528
|
+
}
|
|
4529
|
+
return renderHeaderCellBaseVNs(h, params, editIconVNs.concat(Cell.renderHeaderTitle(h, params)).concat(sortable || remoteSort ? Cell.renderSortIcon(h, params) : []).concat(filters ? Cell.renderFilterIcon(h, params) : []));
|
|
4478
4530
|
},
|
|
4479
4531
|
// 行格编辑模式
|
|
4480
4532
|
renderRowEdit(h, params) {
|
|
@@ -5164,66 +5216,124 @@ function updateRowDropOrigin($xeTable, row) {
|
|
|
5164
5216
|
});
|
|
5165
5217
|
}
|
|
5166
5218
|
}
|
|
5167
|
-
|
|
5219
|
+
const updateRowDropTipContent = ($xeTable, tdEl) => {
|
|
5220
|
+
const reactData = $xeTable;
|
|
5221
|
+
const props = $xeTable;
|
|
5222
|
+
const {
|
|
5223
|
+
dragConfig
|
|
5224
|
+
} = props;
|
|
5225
|
+
const {
|
|
5226
|
+
dragRow
|
|
5227
|
+
} = reactData;
|
|
5228
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
5229
|
+
const {
|
|
5230
|
+
tooltipMethod
|
|
5231
|
+
} = rowDragOpts;
|
|
5232
|
+
const rTooltipMethod = tooltipMethod || (dragConfig ? dragConfig.rowTooltipMethod : null);
|
|
5233
|
+
let tipContent = '';
|
|
5234
|
+
if (rTooltipMethod) {
|
|
5235
|
+
tipContent = `${rTooltipMethod({
|
|
5236
|
+
row: dragRow
|
|
5237
|
+
}) || ''}`;
|
|
5238
|
+
} else {
|
|
5239
|
+
tipContent = methods_getI18n('vxe.table.dragTip', [tdEl.textContent || '']);
|
|
5240
|
+
}
|
|
5241
|
+
reactData.dragTipText = tipContent;
|
|
5242
|
+
};
|
|
5243
|
+
const updateColDropOrigin = ($xeTable, column) => {
|
|
5168
5244
|
const el = $xeTable.$el;
|
|
5169
5245
|
if (el) {
|
|
5170
|
-
const clss = '
|
|
5171
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(
|
|
5172
|
-
|
|
5246
|
+
const clss = 'col--drag-origin';
|
|
5247
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(`[colid="${column.id}"]`), elem => {
|
|
5248
|
+
addClass(elem, clss);
|
|
5173
5249
|
});
|
|
5174
5250
|
}
|
|
5175
|
-
}
|
|
5176
|
-
|
|
5251
|
+
};
|
|
5252
|
+
const clearColDropOrigin = $xeTable => {
|
|
5177
5253
|
const el = $xeTable.$el;
|
|
5178
5254
|
if (el) {
|
|
5179
|
-
const clss = '
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
elem.setAttribute('drag-pos', dragPos);
|
|
5255
|
+
const clss = 'col--drag-origin';
|
|
5256
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(`.${clss}`), elem => {
|
|
5257
|
+
elem.draggable = false;
|
|
5258
|
+
removeClass(elem, clss);
|
|
5184
5259
|
});
|
|
5185
5260
|
}
|
|
5186
|
-
}
|
|
5187
|
-
|
|
5188
|
-
const
|
|
5189
|
-
|
|
5190
|
-
|
|
5261
|
+
};
|
|
5262
|
+
const updateColDropTipContent = ($xeTable, tdEl) => {
|
|
5263
|
+
const reactData = $xeTable;
|
|
5264
|
+
const {
|
|
5265
|
+
dragCol
|
|
5266
|
+
} = reactData;
|
|
5267
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
5268
|
+
const {
|
|
5269
|
+
tooltipMethod
|
|
5270
|
+
} = columnDragOpts;
|
|
5271
|
+
let tipContent = '';
|
|
5272
|
+
if (tooltipMethod) {
|
|
5273
|
+
tipContent = `${tooltipMethod({
|
|
5274
|
+
column: dragCol
|
|
5275
|
+
}) || ''}`;
|
|
5276
|
+
} else {
|
|
5277
|
+
tipContent = methods_getI18n('vxe.table.dragTip', [tdEl.textContent || '']);
|
|
5191
5278
|
}
|
|
5192
|
-
|
|
5279
|
+
reactData.dragTipText = tipContent;
|
|
5280
|
+
};
|
|
5281
|
+
function showDropTip($xeTable, evnt, trEl, thEl, dragPos) {
|
|
5282
|
+
const reactData = $xeTable;
|
|
5283
|
+
const el = $xeTable.$refs.refElem;
|
|
5193
5284
|
if (!el) {
|
|
5194
5285
|
return;
|
|
5195
5286
|
}
|
|
5287
|
+
const {
|
|
5288
|
+
scrollbarWidth,
|
|
5289
|
+
scrollbarHeight
|
|
5290
|
+
} = reactData;
|
|
5291
|
+
const wrapperRect = el.getBoundingClientRect();
|
|
5292
|
+
if (trEl) {
|
|
5293
|
+
const rdLineEl = $xeTable.$refs.refDragRowLineElem;
|
|
5294
|
+
if (rdLineEl) {
|
|
5295
|
+
const trRect = trEl.getBoundingClientRect();
|
|
5296
|
+
let top = Math.max(1, trRect.y - wrapperRect.y);
|
|
5297
|
+
if (dragPos === 'bottom') {
|
|
5298
|
+
top = Math.min(wrapperRect.height - 1, trRect.y - wrapperRect.y + trRect.height);
|
|
5299
|
+
}
|
|
5300
|
+
rdLineEl.style.top = `${top}px`;
|
|
5301
|
+
rdLineEl.style.width = `${wrapperRect.width - scrollbarWidth}px`;
|
|
5302
|
+
rdLineEl.style.display = 'block';
|
|
5303
|
+
}
|
|
5304
|
+
} else if (thEl) {
|
|
5305
|
+
const cdLineEl = $xeTable.$refs.refDragColLineElem;
|
|
5306
|
+
if (cdLineEl) {
|
|
5307
|
+
const thRect = thEl.getBoundingClientRect();
|
|
5308
|
+
let left = Math.max(1, thRect.x - wrapperRect.x);
|
|
5309
|
+
if (dragPos === 'right') {
|
|
5310
|
+
left = Math.min(wrapperRect.width - 2, thRect.x - wrapperRect.x + thRect.width);
|
|
5311
|
+
}
|
|
5312
|
+
cdLineEl.style.left = `${left}px`;
|
|
5313
|
+
cdLineEl.style.height = `${wrapperRect.height - scrollbarHeight}px`;
|
|
5314
|
+
cdLineEl.style.display = 'block';
|
|
5315
|
+
}
|
|
5316
|
+
}
|
|
5317
|
+
const rdTipEl = $xeTable.$refs.refDragTipElem;
|
|
5196
5318
|
if (rdTipEl) {
|
|
5197
|
-
const wrapperRect = el.getBoundingClientRect();
|
|
5198
5319
|
rdTipEl.style.display = 'block';
|
|
5199
5320
|
rdTipEl.style.top = `${Math.min(el.clientHeight - el.scrollTop - rdTipEl.clientHeight, evnt.clientY - wrapperRect.y)}px`;
|
|
5200
5321
|
rdTipEl.style.left = `${Math.min(el.clientWidth - el.scrollLeft - rdTipEl.clientWidth - 16, evnt.clientX - wrapperRect.x)}px`;
|
|
5201
5322
|
}
|
|
5202
5323
|
}
|
|
5203
|
-
const
|
|
5204
|
-
const rdTipEl = $xeTable.$refs.
|
|
5324
|
+
const hideDropTip = $xeTable => {
|
|
5325
|
+
const rdTipEl = $xeTable.$refs.refDragTipElem;
|
|
5326
|
+
const rdLineEl = $xeTable.$refs.refDragRowLineElem;
|
|
5327
|
+
const cdLineEl = $xeTable.$refs.refDragColLineElem;
|
|
5205
5328
|
if (rdTipEl) {
|
|
5206
5329
|
rdTipEl.style.display = '';
|
|
5207
5330
|
}
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
} = reactData;
|
|
5214
|
-
const dragOpts = $xeTable.computeDragOpts;
|
|
5215
|
-
const {
|
|
5216
|
-
rowTooltipMethod
|
|
5217
|
-
} = dragOpts;
|
|
5218
|
-
let tipContent = '';
|
|
5219
|
-
if (rowTooltipMethod) {
|
|
5220
|
-
tipContent = `${rowTooltipMethod({
|
|
5221
|
-
row: dragRow
|
|
5222
|
-
}) || ''}`;
|
|
5223
|
-
} else {
|
|
5224
|
-
tipContent = methods_getI18n('vxe.table.dragTip', [tdEl.textContent || '']);
|
|
5331
|
+
if (rdLineEl) {
|
|
5332
|
+
rdLineEl.style.display = '';
|
|
5333
|
+
}
|
|
5334
|
+
if (cdLineEl) {
|
|
5335
|
+
cdLineEl.style.display = '';
|
|
5225
5336
|
}
|
|
5226
|
-
reactData.dragTipText = tipContent;
|
|
5227
5337
|
};
|
|
5228
5338
|
const Methods = {
|
|
5229
5339
|
callSlot(slotFunc, params, h, vNodes) {
|
|
@@ -5428,6 +5538,7 @@ const Methods = {
|
|
|
5428
5538
|
editStore.removeMaps = {};
|
|
5429
5539
|
const sYLoad = this.updateScrollYStatus(fullData);
|
|
5430
5540
|
this.scrollYLoad = sYLoad;
|
|
5541
|
+
this.isDragRowMove = false;
|
|
5431
5542
|
// 全量数据
|
|
5432
5543
|
this.tableFullData = fullData;
|
|
5433
5544
|
this.tableFullTreeData = treeData;
|
|
@@ -5619,6 +5730,7 @@ const Methods = {
|
|
|
5619
5730
|
const tableFullColumn = getColumnList(collectColumn);
|
|
5620
5731
|
this.tableFullColumn = tableFullColumn;
|
|
5621
5732
|
this._isLoading = true;
|
|
5733
|
+
this.isDragColMove = false;
|
|
5622
5734
|
this.initColumnSort();
|
|
5623
5735
|
return Promise.resolve(this.restoreCustomStorage()).then(() => {
|
|
5624
5736
|
this._isLoading = false;
|
|
@@ -8283,7 +8395,7 @@ const Methods = {
|
|
|
8283
8395
|
// 如果点击了当前表格之外
|
|
8284
8396
|
!getEventTargetNode(evnt, $el).flag) {
|
|
8285
8397
|
setTimeout(() => {
|
|
8286
|
-
this.
|
|
8398
|
+
this.handleClearEdit(evnt).then(() => {
|
|
8287
8399
|
// 如果存在校验,点击了表格之外则清除
|
|
8288
8400
|
if (!this.isActivated && editRules && validOpts.autoClear) {
|
|
8289
8401
|
this.validErrorMaps = {};
|
|
@@ -8366,8 +8478,8 @@ const Methods = {
|
|
|
8366
8478
|
if (isEsc) {
|
|
8367
8479
|
this.preventEvent(evnt, 'event.keydown', null, () => {
|
|
8368
8480
|
this.emitEvent('keydown-start', {}, evnt);
|
|
8369
|
-
if (keyboardConfig && mouseConfig && mouseOpts.area && this.
|
|
8370
|
-
this.
|
|
8481
|
+
if (keyboardConfig && mouseConfig && mouseOpts.area && this.handleKeyboardCellAreaEvent) {
|
|
8482
|
+
this.handleKeyboardCellAreaEvent(evnt);
|
|
8371
8483
|
} else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
|
|
8372
8484
|
evnt.stopPropagation();
|
|
8373
8485
|
// 如果按下了 Esc 键,关闭快捷菜单、筛选
|
|
@@ -8377,7 +8489,7 @@ const Methods = {
|
|
|
8377
8489
|
// 如果是激活编辑状态,则取消编辑
|
|
8378
8490
|
if (actived.row) {
|
|
8379
8491
|
const params = actived.args;
|
|
8380
|
-
this.
|
|
8492
|
+
this.handleClearEdit(evnt);
|
|
8381
8493
|
// 如果配置了选中功能,则为选中状态
|
|
8382
8494
|
if (mouseConfig && mouseOpts.selected) {
|
|
8383
8495
|
this.$nextTick(() => this.handleSelected(params, evnt));
|
|
@@ -8457,8 +8569,8 @@ const Methods = {
|
|
|
8457
8569
|
} else {
|
|
8458
8570
|
this.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, this.ctxMenuList);
|
|
8459
8571
|
}
|
|
8460
|
-
} else if (keyboardConfig && mouseConfig && mouseOpts.area && this.
|
|
8461
|
-
this.
|
|
8572
|
+
} else if (keyboardConfig && mouseConfig && mouseOpts.area && this.handleKeyboardCellAreaEvent) {
|
|
8573
|
+
this.handleKeyboardCellAreaEvent(evnt);
|
|
8462
8574
|
} else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
|
|
8463
8575
|
// 空格键支持选中复选框
|
|
8464
8576
|
evnt.preventDefault();
|
|
@@ -8489,7 +8601,7 @@ const Methods = {
|
|
|
8489
8601
|
// 如果是激活编辑状态,则取消编辑
|
|
8490
8602
|
if (actived.row) {
|
|
8491
8603
|
const params = actived.args;
|
|
8492
|
-
this.
|
|
8604
|
+
this.handleClearEdit(evnt);
|
|
8493
8605
|
// 如果配置了选中功能,则为选中状态
|
|
8494
8606
|
if (mouseConfig && mouseOpts.selected) {
|
|
8495
8607
|
this.$nextTick(() => this.handleSelected(params, evnt));
|
|
@@ -10324,6 +10436,9 @@ const Methods = {
|
|
|
10324
10436
|
this.emitEvent('sort-change', params, evnt);
|
|
10325
10437
|
}
|
|
10326
10438
|
},
|
|
10439
|
+
/**
|
|
10440
|
+
* 行拖拽
|
|
10441
|
+
*/
|
|
10327
10442
|
handleRowDragDragstartEvent(evnt) {
|
|
10328
10443
|
const img = new Image();
|
|
10329
10444
|
if (evnt.dataTransfer) {
|
|
@@ -10336,12 +10451,13 @@ const Methods = {
|
|
|
10336
10451
|
const reactData = $xeTable;
|
|
10337
10452
|
const internalData = $xeTable;
|
|
10338
10453
|
const {
|
|
10339
|
-
treeConfig
|
|
10454
|
+
treeConfig,
|
|
10455
|
+
dragConfig
|
|
10340
10456
|
} = props;
|
|
10341
|
-
const
|
|
10457
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
10342
10458
|
const {
|
|
10343
10459
|
dragEndMethod
|
|
10344
|
-
} =
|
|
10460
|
+
} = rowDragOpts;
|
|
10345
10461
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
10346
10462
|
const {
|
|
10347
10463
|
transform
|
|
@@ -10357,17 +10473,20 @@ const Methods = {
|
|
|
10357
10473
|
prevDragRow,
|
|
10358
10474
|
prevDragPos
|
|
10359
10475
|
} = internalData;
|
|
10476
|
+
const dEndMethod = dragEndMethod || (dragConfig ? dragConfig.dragEndMethod : null);
|
|
10477
|
+
const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
|
|
10360
10478
|
if (prevDragRow && dragRow) {
|
|
10361
10479
|
// 判断是否有拖动
|
|
10362
10480
|
if (prevDragRow !== dragRow) {
|
|
10363
|
-
Promise.resolve(
|
|
10481
|
+
Promise.resolve(dEndMethod ? dEndMethod({
|
|
10364
10482
|
oldRow: dragRow,
|
|
10365
|
-
newRow: prevDragRow
|
|
10483
|
+
newRow: prevDragRow,
|
|
10484
|
+
dragPos: prevDragPos,
|
|
10485
|
+
offsetIndex: dragOffsetIndex
|
|
10366
10486
|
}) : true).then(status => {
|
|
10367
10487
|
if (!status) {
|
|
10368
10488
|
return;
|
|
10369
10489
|
}
|
|
10370
|
-
const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
|
|
10371
10490
|
let oafIndex = -1;
|
|
10372
10491
|
let nafIndex = -1;
|
|
10373
10492
|
if (treeConfig) {
|
|
@@ -10404,18 +10523,19 @@ const Methods = {
|
|
|
10404
10523
|
if (!(treeConfig && transform)) {
|
|
10405
10524
|
$xeTable.updateAfterDataIndex();
|
|
10406
10525
|
}
|
|
10407
|
-
$xeTable.updateFooter();
|
|
10408
10526
|
$xeTable.checkSelectionStatus();
|
|
10409
10527
|
if (reactData.scrollYLoad) {
|
|
10410
10528
|
$xeTable.updateScrollYSpace();
|
|
10411
10529
|
}
|
|
10412
10530
|
$xeTable.$nextTick().then(() => {
|
|
10413
10531
|
$xeTable.updateCellAreas();
|
|
10414
|
-
|
|
10532
|
+
$xeTable.recalculate();
|
|
10415
10533
|
});
|
|
10416
10534
|
$xeTable.dispatchEvent('row-dragend', {
|
|
10417
10535
|
oldRow: dragRow,
|
|
10418
10536
|
newRow: prevDragRow,
|
|
10537
|
+
dragPos: prevDragPos,
|
|
10538
|
+
offsetIndex: dragOffsetIndex,
|
|
10419
10539
|
_index: {
|
|
10420
10540
|
newIndex: nafIndex,
|
|
10421
10541
|
oldIndex: oafIndex
|
|
@@ -10424,10 +10544,10 @@ const Methods = {
|
|
|
10424
10544
|
}).catch(() => {});
|
|
10425
10545
|
}
|
|
10426
10546
|
}
|
|
10427
|
-
|
|
10547
|
+
hideDropTip($xeTable);
|
|
10428
10548
|
clearRowDropOrigin($xeTable);
|
|
10429
|
-
clearRowDropTarget($xeTable);
|
|
10430
10549
|
reactData.dragRow = null;
|
|
10550
|
+
reactData.dragCol = null;
|
|
10431
10551
|
setTimeout(() => {
|
|
10432
10552
|
reactData.isDragRowMove = false;
|
|
10433
10553
|
}, 500);
|
|
@@ -10436,10 +10556,16 @@ const Methods = {
|
|
|
10436
10556
|
const $xeTable = this;
|
|
10437
10557
|
const internalData = $xeTable;
|
|
10438
10558
|
const reactData = $xeTable;
|
|
10559
|
+
const {
|
|
10560
|
+
dragRow
|
|
10561
|
+
} = reactData;
|
|
10562
|
+
if (!dragRow) {
|
|
10563
|
+
evnt.preventDefault();
|
|
10564
|
+
return;
|
|
10565
|
+
}
|
|
10439
10566
|
const trEl = evnt.currentTarget;
|
|
10440
10567
|
const rowid = trEl.getAttribute('rowid');
|
|
10441
10568
|
const row = $xeTable.getRowById(rowid);
|
|
10442
|
-
clearRowDropTarget($xeTable);
|
|
10443
10569
|
if (row) {
|
|
10444
10570
|
evnt.preventDefault();
|
|
10445
10571
|
evnt.preventDefault();
|
|
@@ -10448,43 +10574,48 @@ const Methods = {
|
|
|
10448
10574
|
} = reactData;
|
|
10449
10575
|
const offsetY = evnt.clientY - trEl.getBoundingClientRect().y;
|
|
10450
10576
|
const dragPos = offsetY < trEl.clientHeight / 2 ? 'top' : 'bottom';
|
|
10451
|
-
updateRowDropTarget($xeTable, row, dragPos);
|
|
10452
10577
|
internalData.prevDragRow = row;
|
|
10453
10578
|
internalData.prevDragPos = dragPos;
|
|
10579
|
+
showDropTip($xeTable, evnt, trEl, null, dragPos);
|
|
10454
10580
|
$xeTable.dispatchEvent('row-dragover', {
|
|
10455
10581
|
oldRow: dragRow,
|
|
10456
10582
|
targetRow: row,
|
|
10457
10583
|
dragPos
|
|
10458
10584
|
}, evnt);
|
|
10459
10585
|
}
|
|
10460
|
-
showRowDropTip(evnt, $xeTable);
|
|
10461
10586
|
},
|
|
10462
10587
|
handleCellDragMousedownEvent(evnt, params) {
|
|
10463
10588
|
const $xeTable = this;
|
|
10589
|
+
const props = $xeTable;
|
|
10464
10590
|
const reactData = $xeTable;
|
|
10465
10591
|
evnt.stopPropagation();
|
|
10466
|
-
const
|
|
10592
|
+
const {
|
|
10593
|
+
dragConfig
|
|
10594
|
+
} = props;
|
|
10595
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
10467
10596
|
const {
|
|
10468
10597
|
dragStartMethod
|
|
10469
|
-
} =
|
|
10598
|
+
} = rowDragOpts;
|
|
10470
10599
|
const {
|
|
10471
10600
|
row
|
|
10472
10601
|
} = params;
|
|
10473
10602
|
const dragEl = evnt.currentTarget;
|
|
10474
|
-
const tdEl = dragEl.
|
|
10475
|
-
const trEl = tdEl.
|
|
10603
|
+
const tdEl = dragEl.parentElement?.parentElement;
|
|
10604
|
+
const trEl = tdEl.parentElement;
|
|
10605
|
+
const dStartMethod = dragStartMethod || (dragConfig ? dragConfig.dragStartMethod : null);
|
|
10476
10606
|
reactData.isDragRowMove = false;
|
|
10477
10607
|
clearRowDropOrigin($xeTable);
|
|
10478
|
-
if (
|
|
10608
|
+
if (dStartMethod && !dStartMethod(params)) {
|
|
10479
10609
|
trEl.draggable = false;
|
|
10480
10610
|
reactData.dragRow = null;
|
|
10481
|
-
|
|
10611
|
+
reactData.dragCol = null;
|
|
10612
|
+
hideDropTip($xeTable);
|
|
10482
10613
|
return;
|
|
10483
10614
|
}
|
|
10484
10615
|
reactData.dragRow = row;
|
|
10616
|
+
reactData.dragCol = null;
|
|
10485
10617
|
trEl.draggable = true;
|
|
10486
10618
|
updateRowDropOrigin($xeTable, row);
|
|
10487
|
-
showRowDropTip(evnt, $xeTable);
|
|
10488
10619
|
updateRowDropTipContent($xeTable, tdEl);
|
|
10489
10620
|
$xeTable.dispatchEvent('row-dragstart', params, evnt);
|
|
10490
10621
|
},
|
|
@@ -10492,10 +10623,175 @@ const Methods = {
|
|
|
10492
10623
|
const $xeTable = this;
|
|
10493
10624
|
const reactData = $xeTable;
|
|
10494
10625
|
clearRowDropOrigin($xeTable);
|
|
10495
|
-
|
|
10626
|
+
hideDropTip($xeTable);
|
|
10496
10627
|
reactData.dragRow = null;
|
|
10628
|
+
reactData.dragCol = null;
|
|
10497
10629
|
reactData.isDragRowMove = false;
|
|
10498
10630
|
},
|
|
10631
|
+
/**
|
|
10632
|
+
* 列拖拽
|
|
10633
|
+
*/
|
|
10634
|
+
handleHeaderCellDragDragstartEvent(evnt) {
|
|
10635
|
+
const img = new Image();
|
|
10636
|
+
if (evnt.dataTransfer) {
|
|
10637
|
+
evnt.dataTransfer.setDragImage(img, 0, 0);
|
|
10638
|
+
}
|
|
10639
|
+
},
|
|
10640
|
+
handleHeaderCellDragDragendEvent(evnt) {
|
|
10641
|
+
const $xeTable = this;
|
|
10642
|
+
const props = $xeTable;
|
|
10643
|
+
const reactData = $xeTable;
|
|
10644
|
+
const internalData = $xeTable;
|
|
10645
|
+
const {
|
|
10646
|
+
mouseConfig
|
|
10647
|
+
} = props;
|
|
10648
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
10649
|
+
const {
|
|
10650
|
+
dragEndMethod
|
|
10651
|
+
} = columnDragOpts;
|
|
10652
|
+
const {
|
|
10653
|
+
dragCol
|
|
10654
|
+
} = reactData;
|
|
10655
|
+
const {
|
|
10656
|
+
collectColumn,
|
|
10657
|
+
prevDragCol,
|
|
10658
|
+
prevDragPos
|
|
10659
|
+
} = internalData;
|
|
10660
|
+
const dragOffsetIndex = prevDragPos === 'right' ? 1 : 0;
|
|
10661
|
+
if (prevDragCol && dragCol) {
|
|
10662
|
+
// 判断是否有拖动
|
|
10663
|
+
if (prevDragCol !== dragCol) {
|
|
10664
|
+
Promise.resolve(dragEndMethod ? dragEndMethod({
|
|
10665
|
+
oldColumn: dragCol,
|
|
10666
|
+
newColumn: prevDragCol,
|
|
10667
|
+
dragPos: prevDragPos,
|
|
10668
|
+
offsetIndex: dragOffsetIndex
|
|
10669
|
+
}) : true).then(status => {
|
|
10670
|
+
if (!status) {
|
|
10671
|
+
return;
|
|
10672
|
+
}
|
|
10673
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, (column, index, items, path, parent) => {
|
|
10674
|
+
if (!parent) {
|
|
10675
|
+
const sortIndex = index + 1;
|
|
10676
|
+
column.renderSortNumber = sortIndex;
|
|
10677
|
+
}
|
|
10678
|
+
});
|
|
10679
|
+
const oafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(collectColumn, item => item.id === dragCol.id);
|
|
10680
|
+
const nafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(collectColumn, item => item.id === prevDragCol.id) + dragOffsetIndex;
|
|
10681
|
+
const newTargetCol = collectColumn[nafIndex];
|
|
10682
|
+
if (newTargetCol) {
|
|
10683
|
+
// 插入最后位置
|
|
10684
|
+
dragCol.renderSortNumber = newTargetCol.renderSortNumber;
|
|
10685
|
+
newTargetCol.renderSortNumber = dragCol.renderSortNumber + 0.5;
|
|
10686
|
+
} else {
|
|
10687
|
+
// 插入新位置
|
|
10688
|
+
dragCol.renderSortNumber = collectColumn.length + 1.5;
|
|
10689
|
+
}
|
|
10690
|
+
reactData.isDragColMove = true;
|
|
10691
|
+
if (mouseConfig) {
|
|
10692
|
+
if ($xeTable.clearSelected) {
|
|
10693
|
+
$xeTable.clearSelected();
|
|
10694
|
+
}
|
|
10695
|
+
if ($xeTable.clearCellAreas) {
|
|
10696
|
+
$xeTable.clearCellAreas();
|
|
10697
|
+
$xeTable.clearCopyCellArea();
|
|
10698
|
+
}
|
|
10699
|
+
}
|
|
10700
|
+
$xeTable.analyColumnWidth();
|
|
10701
|
+
$xeTable.$nextTick().then(() => {
|
|
10702
|
+
$xeTable.updateCellAreas();
|
|
10703
|
+
$xeTable.refreshColumn(true);
|
|
10704
|
+
});
|
|
10705
|
+
$xeTable.dispatchEvent('column-dragend', {
|
|
10706
|
+
oldColumn: dragCol,
|
|
10707
|
+
newColumn: prevDragCol,
|
|
10708
|
+
dragPos: prevDragPos,
|
|
10709
|
+
offsetIndex: dragOffsetIndex,
|
|
10710
|
+
_index: {
|
|
10711
|
+
newIndex: nafIndex,
|
|
10712
|
+
oldIndex: oafIndex
|
|
10713
|
+
}
|
|
10714
|
+
}, evnt);
|
|
10715
|
+
}).catch(() => {});
|
|
10716
|
+
}
|
|
10717
|
+
}
|
|
10718
|
+
hideDropTip($xeTable);
|
|
10719
|
+
clearColDropOrigin($xeTable);
|
|
10720
|
+
reactData.dragRow = null;
|
|
10721
|
+
reactData.dragCol = null;
|
|
10722
|
+
setTimeout(() => {
|
|
10723
|
+
reactData.isDragColMove = false;
|
|
10724
|
+
}, 500);
|
|
10725
|
+
},
|
|
10726
|
+
handleHeaderCellDragDragoverEvent(evnt) {
|
|
10727
|
+
const $xeTable = this;
|
|
10728
|
+
const reactData = $xeTable;
|
|
10729
|
+
const internalData = $xeTable;
|
|
10730
|
+
const {
|
|
10731
|
+
dragCol
|
|
10732
|
+
} = reactData;
|
|
10733
|
+
if (!dragCol) {
|
|
10734
|
+
evnt.preventDefault();
|
|
10735
|
+
return;
|
|
10736
|
+
}
|
|
10737
|
+
const thEl = evnt.currentTarget;
|
|
10738
|
+
const colid = thEl.getAttribute('colid');
|
|
10739
|
+
const column = $xeTable.getColumnById(colid);
|
|
10740
|
+
if (column) {
|
|
10741
|
+
evnt.preventDefault();
|
|
10742
|
+
const {
|
|
10743
|
+
dragCol
|
|
10744
|
+
} = reactData;
|
|
10745
|
+
const offsetX = evnt.clientX - thEl.getBoundingClientRect().x;
|
|
10746
|
+
const dragPos = offsetX < thEl.clientWidth / 2 ? 'left' : 'right';
|
|
10747
|
+
internalData.prevDragCol = column;
|
|
10748
|
+
internalData.prevDragPos = dragPos;
|
|
10749
|
+
showDropTip($xeTable, evnt, null, thEl, dragPos);
|
|
10750
|
+
$xeTable.dispatchEvent('column-dragover', {
|
|
10751
|
+
oldColumn: dragCol,
|
|
10752
|
+
targetColumn: column,
|
|
10753
|
+
dragPos
|
|
10754
|
+
}, evnt);
|
|
10755
|
+
}
|
|
10756
|
+
},
|
|
10757
|
+
handleHeaderCellDragMousedownEvent(evnt, params) {
|
|
10758
|
+
const $xeTable = this;
|
|
10759
|
+
const reactData = $xeTable;
|
|
10760
|
+
evnt.stopPropagation();
|
|
10761
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
10762
|
+
const {
|
|
10763
|
+
dragStartMethod
|
|
10764
|
+
} = columnDragOpts;
|
|
10765
|
+
const {
|
|
10766
|
+
column
|
|
10767
|
+
} = params;
|
|
10768
|
+
const dragEl = evnt.currentTarget;
|
|
10769
|
+
const thEl = dragEl.parentElement?.parentElement;
|
|
10770
|
+
reactData.isDragColMove = false;
|
|
10771
|
+
clearColDropOrigin($xeTable);
|
|
10772
|
+
if (dragStartMethod && !dragStartMethod(params)) {
|
|
10773
|
+
thEl.draggable = false;
|
|
10774
|
+
reactData.dragRow = null;
|
|
10775
|
+
reactData.dragCol = null;
|
|
10776
|
+
hideDropTip($xeTable);
|
|
10777
|
+
return;
|
|
10778
|
+
}
|
|
10779
|
+
reactData.dragCol = column;
|
|
10780
|
+
reactData.dragRow = null;
|
|
10781
|
+
thEl.draggable = true;
|
|
10782
|
+
updateColDropOrigin($xeTable, column);
|
|
10783
|
+
updateColDropTipContent($xeTable, thEl);
|
|
10784
|
+
$xeTable.dispatchEvent('column-dragstart', params, evnt);
|
|
10785
|
+
},
|
|
10786
|
+
handleHeaderCellDragMouseupEvent() {
|
|
10787
|
+
const $xeTable = this;
|
|
10788
|
+
const reactData = $xeTable;
|
|
10789
|
+
clearColDropOrigin($xeTable);
|
|
10790
|
+
hideDropTip($xeTable);
|
|
10791
|
+
reactData.dragRow = null;
|
|
10792
|
+
reactData.dragCol = null;
|
|
10793
|
+
reactData.isDragColMove = false;
|
|
10794
|
+
},
|
|
10499
10795
|
setPendingRow(rows, status) {
|
|
10500
10796
|
const pendingMaps = {
|
|
10501
10797
|
...this.pendingRowMaps
|
|
@@ -12326,8 +12622,8 @@ const Methods = {
|
|
|
12326
12622
|
}
|
|
12327
12623
|
},
|
|
12328
12624
|
updateCellAreas() {
|
|
12329
|
-
if (this.mouseConfig && this.mouseOpts.area && this.
|
|
12330
|
-
return this.
|
|
12625
|
+
if (this.mouseConfig && this.mouseOpts.area && this.handleRecalculateCellAreas) {
|
|
12626
|
+
return this.handleRecalculateCellAreas();
|
|
12331
12627
|
}
|
|
12332
12628
|
return this.$nextTick();
|
|
12333
12629
|
},
|
|
@@ -12785,7 +13081,9 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
12785
13081
|
fullAllDataRowIdData,
|
|
12786
13082
|
rowOpts,
|
|
12787
13083
|
pendingRowList,
|
|
12788
|
-
pendingRowMaps
|
|
13084
|
+
pendingRowMaps,
|
|
13085
|
+
columnOpts,
|
|
13086
|
+
isDragColMove
|
|
12789
13087
|
} = $xeTable;
|
|
12790
13088
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
12791
13089
|
const rows = [];
|
|
@@ -12854,26 +13152,40 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
12854
13152
|
rowChildren = row[childrenField];
|
|
12855
13153
|
isExpandTree = rowChildren && rowChildren.length && !!treeExpandedMaps[rowid];
|
|
12856
13154
|
}
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
|
|
12860
|
-
|
|
12861
|
-
|
|
12862
|
-
|
|
12863
|
-
|
|
12864
|
-
|
|
12865
|
-
|
|
12866
|
-
|
|
12867
|
-
|
|
13155
|
+
const trClass = ['vxe-body--row', treeConfig ? `row--level-${rowLevel}` : '', {
|
|
13156
|
+
'row--stripe': stripe && ($xeTable.getVTRowIndex(row) + 1) % 2 === 0,
|
|
13157
|
+
'is--new': isNewRow,
|
|
13158
|
+
'is--expand-row': isExpandRow,
|
|
13159
|
+
'is--expand-tree': isExpandTree,
|
|
13160
|
+
'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
|
|
13161
|
+
'row--radio': radioOpts.highlight && $xeTable.selectRadioRow === row,
|
|
13162
|
+
'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
|
|
13163
|
+
'row--pending': pendingRowList.length && !!pendingRowMaps[rowid]
|
|
13164
|
+
}, rowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rowClassName) ? rowClassName(params) : rowClassName : ''];
|
|
13165
|
+
const tdVNs = tableColumn.map((column, $columnIndex) => {
|
|
13166
|
+
return renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
13167
|
+
});
|
|
13168
|
+
rows.push(columnOpts.drag ? h('transition-group', {
|
|
13169
|
+
props: {
|
|
13170
|
+
tag: 'tr',
|
|
13171
|
+
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`
|
|
13172
|
+
},
|
|
13173
|
+
class: trClass,
|
|
13174
|
+
attrs: {
|
|
13175
|
+
rowid
|
|
13176
|
+
},
|
|
13177
|
+
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
|
|
13178
|
+
key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
13179
|
+
nativeOn: trOn
|
|
13180
|
+
}, tdVNs) : h('tr', {
|
|
13181
|
+
class: trClass,
|
|
12868
13182
|
attrs: {
|
|
12869
13183
|
rowid
|
|
12870
13184
|
},
|
|
12871
13185
|
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
|
|
12872
13186
|
key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
12873
13187
|
on: trOn
|
|
12874
|
-
},
|
|
12875
|
-
return renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
12876
|
-
})));
|
|
13188
|
+
}, tdVNs));
|
|
12877
13189
|
// 如果行被展开了
|
|
12878
13190
|
if (isExpandRow) {
|
|
12879
13191
|
const {
|
|
@@ -13337,6 +13649,173 @@ const {
|
|
|
13337
13649
|
renderer: header_renderer
|
|
13338
13650
|
} = core_.VxeUI;
|
|
13339
13651
|
const cellType = 'header';
|
|
13652
|
+
const header_renderRows = (h, _vm, cols, $rowIndex) => {
|
|
13653
|
+
const {
|
|
13654
|
+
$parent: $xetable,
|
|
13655
|
+
fixedType
|
|
13656
|
+
} = _vm;
|
|
13657
|
+
const {
|
|
13658
|
+
$listeners: tableListeners,
|
|
13659
|
+
resizable: allResizable,
|
|
13660
|
+
border,
|
|
13661
|
+
columnKey,
|
|
13662
|
+
headerCellClassName,
|
|
13663
|
+
headerCellStyle,
|
|
13664
|
+
showHeaderOverflow: allColumnHeaderOverflow,
|
|
13665
|
+
headerAlign: allHeaderAlign,
|
|
13666
|
+
align: allAlign,
|
|
13667
|
+
highlightCurrentColumn,
|
|
13668
|
+
currentColumn,
|
|
13669
|
+
scrollXLoad,
|
|
13670
|
+
overflowX,
|
|
13671
|
+
scrollbarWidth,
|
|
13672
|
+
sortOpts,
|
|
13673
|
+
mouseConfig,
|
|
13674
|
+
columnOpts
|
|
13675
|
+
} = $xetable;
|
|
13676
|
+
return cols.map((column, $columnIndex) => {
|
|
13677
|
+
const {
|
|
13678
|
+
type,
|
|
13679
|
+
showHeaderOverflow,
|
|
13680
|
+
headerAlign,
|
|
13681
|
+
align,
|
|
13682
|
+
headerClassName,
|
|
13683
|
+
editRender,
|
|
13684
|
+
cellRender
|
|
13685
|
+
} = column;
|
|
13686
|
+
// const { enabled } = tooltipOpts
|
|
13687
|
+
const colid = column.id;
|
|
13688
|
+
const renderOpts = editRender || cellRender;
|
|
13689
|
+
const compConf = renderOpts ? header_renderer.get(renderOpts.name) : null;
|
|
13690
|
+
const isColGroup = column.children && column.children.length;
|
|
13691
|
+
const fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
13692
|
+
const headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showHeaderOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
13693
|
+
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
13694
|
+
let showEllipsis = headOverflow === 'ellipsis';
|
|
13695
|
+
const showTitle = headOverflow === 'title';
|
|
13696
|
+
const showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
13697
|
+
let hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
13698
|
+
const thOns = {};
|
|
13699
|
+
const hasFilter = column.filters && column.filters.some(item => item.checked);
|
|
13700
|
+
const columnIndex = $xetable.getColumnIndex(column);
|
|
13701
|
+
const _columnIndex = $xetable.getVTColumnIndex(column);
|
|
13702
|
+
const params = {
|
|
13703
|
+
$table: $xetable,
|
|
13704
|
+
$grid: $xetable.xegrid,
|
|
13705
|
+
$rowIndex,
|
|
13706
|
+
column,
|
|
13707
|
+
columnIndex,
|
|
13708
|
+
$columnIndex,
|
|
13709
|
+
_columnIndex,
|
|
13710
|
+
fixed: fixedType,
|
|
13711
|
+
type: cellType,
|
|
13712
|
+
isHidden: fixedHiddenColumn,
|
|
13713
|
+
hasFilter
|
|
13714
|
+
};
|
|
13715
|
+
// 虚拟滚动不支持动态高度
|
|
13716
|
+
if (scrollXLoad && !hasEllipsis) {
|
|
13717
|
+
showEllipsis = hasEllipsis = true;
|
|
13718
|
+
}
|
|
13719
|
+
if (columnOpts.isCurrent || highlightCurrentColumn || tableListeners['header-cell-click'] || sortOpts.trigger === 'cell') {
|
|
13720
|
+
thOns.click = evnt => $xetable.triggerHeaderCellClickEvent(evnt, params);
|
|
13721
|
+
}
|
|
13722
|
+
if (tableListeners['header-cell-dblclick']) {
|
|
13723
|
+
thOns.dblclick = evnt => $xetable.triggerHeaderCellDblclickEvent(evnt, params);
|
|
13724
|
+
}
|
|
13725
|
+
// 按下事件处理
|
|
13726
|
+
if (mouseConfig) {
|
|
13727
|
+
thOns.mousedown = evnt => $xetable.triggerHeaderCellMousedownEvent(evnt, params);
|
|
13728
|
+
}
|
|
13729
|
+
// 拖拽行事件
|
|
13730
|
+
if (columnOpts.drag && !column.parentId) {
|
|
13731
|
+
thOns.dragstart = $xetable.handleHeaderCellDragDragstartEvent;
|
|
13732
|
+
thOns.dragend = $xetable.handleHeaderCellDragDragendEvent;
|
|
13733
|
+
thOns.dragover = $xetable.handleHeaderCellDragDragoverEvent;
|
|
13734
|
+
}
|
|
13735
|
+
return h('th', {
|
|
13736
|
+
class: ['vxe-header--column', colid, {
|
|
13737
|
+
[`col--${headAlign}`]: headAlign,
|
|
13738
|
+
[`col--${type}`]: type,
|
|
13739
|
+
'col--last': $columnIndex === cols.length - 1,
|
|
13740
|
+
'col--fixed': column.fixed,
|
|
13741
|
+
'col--group': isColGroup,
|
|
13742
|
+
'col--ellipsis': hasEllipsis,
|
|
13743
|
+
'fixed--hidden': fixedHiddenColumn,
|
|
13744
|
+
'is--sortable': column.sortable,
|
|
13745
|
+
'col--filter': !!column.filters,
|
|
13746
|
+
'is--filter-active': hasFilter,
|
|
13747
|
+
'col--current': currentColumn === column
|
|
13748
|
+
}, getClass(headerClassName, params), getClass(headerCellClassName, params)],
|
|
13749
|
+
attrs: {
|
|
13750
|
+
colid,
|
|
13751
|
+
colspan: column.colSpan > 1 ? column.colSpan : null,
|
|
13752
|
+
rowspan: column.rowSpan > 1 ? column.rowSpan : null
|
|
13753
|
+
},
|
|
13754
|
+
style: headerCellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle : null,
|
|
13755
|
+
on: thOns,
|
|
13756
|
+
key: columnKey || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex
|
|
13757
|
+
}, [h('div', {
|
|
13758
|
+
class: ['vxe-cell', {
|
|
13759
|
+
'c--title': showTitle,
|
|
13760
|
+
'c--tooltip': showTooltip,
|
|
13761
|
+
'c--ellipsis': showEllipsis
|
|
13762
|
+
}]
|
|
13763
|
+
}, column.renderHeader(h, params)),
|
|
13764
|
+
/**
|
|
13765
|
+
* 列宽拖动
|
|
13766
|
+
*/
|
|
13767
|
+
!fixedHiddenColumn && !isColGroup && (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? h('div', {
|
|
13768
|
+
class: ['vxe-resizable', {
|
|
13769
|
+
'is--line': !border || border === 'none'
|
|
13770
|
+
}],
|
|
13771
|
+
on: {
|
|
13772
|
+
mousedown: evnt => _vm.resizeMousedown(evnt, params)
|
|
13773
|
+
}
|
|
13774
|
+
}) : null]);
|
|
13775
|
+
}).concat(scrollbarWidth ? [h('th', {
|
|
13776
|
+
key: `gr${$rowIndex}`,
|
|
13777
|
+
class: 'vxe-header--gutter col--gutter'
|
|
13778
|
+
})] : []);
|
|
13779
|
+
};
|
|
13780
|
+
function renderHeads(h, _vm, headerGroups) {
|
|
13781
|
+
const {
|
|
13782
|
+
$parent: $xetable
|
|
13783
|
+
} = _vm;
|
|
13784
|
+
const tableProps = $xetable;
|
|
13785
|
+
const {
|
|
13786
|
+
fixedType
|
|
13787
|
+
} = _vm;
|
|
13788
|
+
const {
|
|
13789
|
+
headerRowClassName,
|
|
13790
|
+
headerRowStyle
|
|
13791
|
+
} = tableProps;
|
|
13792
|
+
const {
|
|
13793
|
+
isDragColMove
|
|
13794
|
+
} = $xetable;
|
|
13795
|
+
const columnOpts = $xetable.columnOpts;
|
|
13796
|
+
return headerGroups.map((cols, $rowIndex) => {
|
|
13797
|
+
const params = {
|
|
13798
|
+
$table: $xetable,
|
|
13799
|
+
$rowIndex,
|
|
13800
|
+
fixed: fixedType,
|
|
13801
|
+
type: cellType
|
|
13802
|
+
};
|
|
13803
|
+
if (columnOpts.drag) {
|
|
13804
|
+
return h('transition-group', {
|
|
13805
|
+
props: {
|
|
13806
|
+
tag: 'tr',
|
|
13807
|
+
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
13808
|
+
class: ['vxe-header--row', headerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ''],
|
|
13809
|
+
style: headerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle : null
|
|
13810
|
+
}
|
|
13811
|
+
}, header_renderRows(h, _vm, cols, $rowIndex));
|
|
13812
|
+
}
|
|
13813
|
+
return h('tr', {
|
|
13814
|
+
class: ['vxe-header--row', headerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ''],
|
|
13815
|
+
style: headerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle : null
|
|
13816
|
+
}, header_renderRows(h, _vm, cols, $rowIndex));
|
|
13817
|
+
});
|
|
13818
|
+
}
|
|
13340
13819
|
/* harmony default export */ var header = ({
|
|
13341
13820
|
name: 'VxeTableHeader',
|
|
13342
13821
|
props: {
|
|
@@ -13404,28 +13883,12 @@ const cellType = 'header';
|
|
|
13404
13883
|
fixedColumn
|
|
13405
13884
|
} = this;
|
|
13406
13885
|
const {
|
|
13407
|
-
$listeners: tableListeners,
|
|
13408
13886
|
tId,
|
|
13409
13887
|
isGroup,
|
|
13410
13888
|
visibleColumn,
|
|
13411
|
-
resizable: allResizable,
|
|
13412
|
-
border,
|
|
13413
|
-
columnKey,
|
|
13414
|
-
headerRowClassName,
|
|
13415
|
-
headerCellClassName,
|
|
13416
|
-
headerRowStyle,
|
|
13417
|
-
headerCellStyle,
|
|
13418
13889
|
showHeaderOverflow: allColumnHeaderOverflow,
|
|
13419
|
-
headerAlign: allHeaderAlign,
|
|
13420
|
-
align: allAlign,
|
|
13421
|
-
highlightCurrentColumn,
|
|
13422
|
-
currentColumn,
|
|
13423
13890
|
scrollXLoad,
|
|
13424
|
-
|
|
13425
|
-
scrollbarWidth,
|
|
13426
|
-
sortOpts,
|
|
13427
|
-
mouseConfig,
|
|
13428
|
-
columnOpts
|
|
13891
|
+
scrollbarWidth
|
|
13429
13892
|
} = $xetable;
|
|
13430
13893
|
let headerGroups = headerColumn;
|
|
13431
13894
|
let renderColumnList = tableColumn;
|
|
@@ -13480,117 +13943,7 @@ const cellType = 'header';
|
|
|
13480
13943
|
*/
|
|
13481
13944
|
h('thead', {
|
|
13482
13945
|
ref: 'thead'
|
|
13483
|
-
},
|
|
13484
|
-
return h('tr', {
|
|
13485
|
-
class: ['vxe-header--row', headerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(headerRowClassName) ? headerRowClassName({
|
|
13486
|
-
$table: $xetable,
|
|
13487
|
-
$rowIndex,
|
|
13488
|
-
fixed: fixedType,
|
|
13489
|
-
type: cellType
|
|
13490
|
-
}) : headerRowClassName : ''],
|
|
13491
|
-
style: headerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(headerRowStyle) ? headerRowStyle({
|
|
13492
|
-
$table: $xetable,
|
|
13493
|
-
$rowIndex,
|
|
13494
|
-
fixed: fixedType,
|
|
13495
|
-
type: cellType
|
|
13496
|
-
}) : headerRowStyle : null
|
|
13497
|
-
}, cols.map((column, $columnIndex) => {
|
|
13498
|
-
const {
|
|
13499
|
-
type,
|
|
13500
|
-
showHeaderOverflow,
|
|
13501
|
-
headerAlign,
|
|
13502
|
-
align,
|
|
13503
|
-
headerClassName,
|
|
13504
|
-
editRender,
|
|
13505
|
-
cellRender
|
|
13506
|
-
} = column;
|
|
13507
|
-
// const { enabled } = tooltipOpts
|
|
13508
|
-
const colid = column.id;
|
|
13509
|
-
const renderOpts = editRender || cellRender;
|
|
13510
|
-
const compConf = renderOpts ? header_renderer.get(renderOpts.name) : null;
|
|
13511
|
-
const isColGroup = column.children && column.children.length;
|
|
13512
|
-
const fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
13513
|
-
const headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showHeaderOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
13514
|
-
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
13515
|
-
let showEllipsis = headOverflow === 'ellipsis';
|
|
13516
|
-
const showTitle = headOverflow === 'title';
|
|
13517
|
-
const showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
13518
|
-
let hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
13519
|
-
const thOns = {};
|
|
13520
|
-
const hasFilter = column.filters && column.filters.some(item => item.checked);
|
|
13521
|
-
const columnIndex = $xetable.getColumnIndex(column);
|
|
13522
|
-
const _columnIndex = $xetable.getVTColumnIndex(column);
|
|
13523
|
-
const params = {
|
|
13524
|
-
$table: $xetable,
|
|
13525
|
-
$grid: $xetable.xegrid,
|
|
13526
|
-
$rowIndex,
|
|
13527
|
-
column,
|
|
13528
|
-
columnIndex,
|
|
13529
|
-
$columnIndex,
|
|
13530
|
-
_columnIndex,
|
|
13531
|
-
fixed: fixedType,
|
|
13532
|
-
type: cellType,
|
|
13533
|
-
isHidden: fixedHiddenColumn,
|
|
13534
|
-
hasFilter
|
|
13535
|
-
};
|
|
13536
|
-
// 虚拟滚动不支持动态高度
|
|
13537
|
-
if (scrollXLoad && !hasEllipsis) {
|
|
13538
|
-
showEllipsis = hasEllipsis = true;
|
|
13539
|
-
}
|
|
13540
|
-
if (columnOpts.isCurrent || highlightCurrentColumn || tableListeners['header-cell-click'] || sortOpts.trigger === 'cell') {
|
|
13541
|
-
thOns.click = evnt => $xetable.triggerHeaderCellClickEvent(evnt, params);
|
|
13542
|
-
}
|
|
13543
|
-
if (tableListeners['header-cell-dblclick']) {
|
|
13544
|
-
thOns.dblclick = evnt => $xetable.triggerHeaderCellDblclickEvent(evnt, params);
|
|
13545
|
-
}
|
|
13546
|
-
// 按下事件处理
|
|
13547
|
-
if (mouseConfig) {
|
|
13548
|
-
thOns.mousedown = evnt => $xetable.triggerHeaderCellMousedownEvent(evnt, params);
|
|
13549
|
-
}
|
|
13550
|
-
return h('th', {
|
|
13551
|
-
class: ['vxe-header--column', colid, {
|
|
13552
|
-
[`col--${headAlign}`]: headAlign,
|
|
13553
|
-
[`col--${type}`]: type,
|
|
13554
|
-
'col--last': $columnIndex === cols.length - 1,
|
|
13555
|
-
'col--fixed': column.fixed,
|
|
13556
|
-
'col--group': isColGroup,
|
|
13557
|
-
'col--ellipsis': hasEllipsis,
|
|
13558
|
-
'fixed--hidden': fixedHiddenColumn,
|
|
13559
|
-
'is--sortable': column.sortable,
|
|
13560
|
-
'col--filter': !!column.filters,
|
|
13561
|
-
'is--filter-active': hasFilter,
|
|
13562
|
-
'col--current': currentColumn === column
|
|
13563
|
-
}, getClass(headerClassName, params), getClass(headerCellClassName, params)],
|
|
13564
|
-
attrs: {
|
|
13565
|
-
colid,
|
|
13566
|
-
colspan: column.colSpan > 1 ? column.colSpan : null,
|
|
13567
|
-
rowspan: column.rowSpan > 1 ? column.rowSpan : null
|
|
13568
|
-
},
|
|
13569
|
-
style: headerCellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle : null,
|
|
13570
|
-
on: thOns,
|
|
13571
|
-
key: columnKey || columnOpts.useKey || isColGroup ? colid : $columnIndex
|
|
13572
|
-
}, [h('div', {
|
|
13573
|
-
class: ['vxe-cell', {
|
|
13574
|
-
'c--title': showTitle,
|
|
13575
|
-
'c--tooltip': showTooltip,
|
|
13576
|
-
'c--ellipsis': showEllipsis
|
|
13577
|
-
}]
|
|
13578
|
-
}, column.renderHeader(h, params)),
|
|
13579
|
-
/**
|
|
13580
|
-
* 列宽拖动
|
|
13581
|
-
*/
|
|
13582
|
-
!fixedHiddenColumn && !isColGroup && (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? h('div', {
|
|
13583
|
-
class: ['vxe-resizable', {
|
|
13584
|
-
'is--line': !border || border === 'none'
|
|
13585
|
-
}],
|
|
13586
|
-
on: {
|
|
13587
|
-
mousedown: evnt => this.resizeMousedown(evnt, params)
|
|
13588
|
-
}
|
|
13589
|
-
}) : null]);
|
|
13590
|
-
}).concat(scrollbarWidth ? [h('th', {
|
|
13591
|
-
class: 'vxe-header--gutter col--gutter'
|
|
13592
|
-
})] : []));
|
|
13593
|
-
}))]),
|
|
13946
|
+
}, renderHeads(h, this, headerGroups))]),
|
|
13594
13947
|
/**
|
|
13595
13948
|
* 其他
|
|
13596
13949
|
*/
|
|
@@ -13738,6 +14091,203 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
13738
14091
|
}
|
|
13739
14092
|
}
|
|
13740
14093
|
}
|
|
14094
|
+
function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIndex) {
|
|
14095
|
+
const {
|
|
14096
|
+
$parent: $xetable,
|
|
14097
|
+
fixedType
|
|
14098
|
+
} = _vm;
|
|
14099
|
+
const {
|
|
14100
|
+
$listeners: tableListeners,
|
|
14101
|
+
footerCellClassName,
|
|
14102
|
+
footerCellStyle,
|
|
14103
|
+
footerAlign: allFooterAlign,
|
|
14104
|
+
mergeFooterList,
|
|
14105
|
+
footerSpanMethod,
|
|
14106
|
+
align: allAlign,
|
|
14107
|
+
scrollXLoad,
|
|
14108
|
+
columnKey,
|
|
14109
|
+
columnOpts,
|
|
14110
|
+
showFooterOverflow: allColumnFooterOverflow,
|
|
14111
|
+
currentColumn,
|
|
14112
|
+
overflowX,
|
|
14113
|
+
scrollbarWidth,
|
|
14114
|
+
tooltipOpts
|
|
14115
|
+
} = $xetable;
|
|
14116
|
+
return tableColumn.map((column, $columnIndex) => {
|
|
14117
|
+
const {
|
|
14118
|
+
type,
|
|
14119
|
+
showFooterOverflow,
|
|
14120
|
+
footerAlign,
|
|
14121
|
+
align,
|
|
14122
|
+
footerClassName,
|
|
14123
|
+
editRender,
|
|
14124
|
+
cellRender
|
|
14125
|
+
} = column;
|
|
14126
|
+
const renderOpts = editRender || cellRender;
|
|
14127
|
+
const compConf = renderOpts ? footer_renderer.get(renderOpts.name) : null;
|
|
14128
|
+
const showAllTip = tooltipOpts.showAll || tooltipOpts.enabled;
|
|
14129
|
+
const isColGroup = column.children && column.children.length;
|
|
14130
|
+
const fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
14131
|
+
const footOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showFooterOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
14132
|
+
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
14133
|
+
let showEllipsis = footOverflow === 'ellipsis';
|
|
14134
|
+
const showTitle = footOverflow === 'title';
|
|
14135
|
+
const showTooltip = footOverflow === true || footOverflow === 'tooltip';
|
|
14136
|
+
let hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
14137
|
+
const attrs = {
|
|
14138
|
+
colid: column.id
|
|
14139
|
+
};
|
|
14140
|
+
const tfOns = {};
|
|
14141
|
+
const columnIndex = $xetable.getColumnIndex(column);
|
|
14142
|
+
const _columnIndex = $xetable.getVTColumnIndex(column);
|
|
14143
|
+
const itemIndex = _columnIndex;
|
|
14144
|
+
const cellParams = {
|
|
14145
|
+
$table: $xetable,
|
|
14146
|
+
$grid: $xetable.xegrid,
|
|
14147
|
+
row,
|
|
14148
|
+
_rowIndex,
|
|
14149
|
+
$rowIndex,
|
|
14150
|
+
column,
|
|
14151
|
+
columnIndex,
|
|
14152
|
+
$columnIndex,
|
|
14153
|
+
_columnIndex,
|
|
14154
|
+
itemIndex,
|
|
14155
|
+
items: row,
|
|
14156
|
+
fixed: fixedType,
|
|
14157
|
+
type: footer_renderType,
|
|
14158
|
+
data: footerTableData
|
|
14159
|
+
};
|
|
14160
|
+
// 虚拟滚动不支持动态高度
|
|
14161
|
+
if (scrollXLoad && !hasEllipsis) {
|
|
14162
|
+
showEllipsis = hasEllipsis = true;
|
|
14163
|
+
}
|
|
14164
|
+
if (showTitle || showTooltip || showAllTip) {
|
|
14165
|
+
tfOns.mouseenter = evnt => {
|
|
14166
|
+
if (showTitle) {
|
|
14167
|
+
updateCellTitle(evnt.currentTarget, column);
|
|
14168
|
+
} else if (showTooltip || showAllTip) {
|
|
14169
|
+
$xetable.triggerFooterTooltipEvent(evnt, cellParams);
|
|
14170
|
+
}
|
|
14171
|
+
};
|
|
14172
|
+
}
|
|
14173
|
+
if (showTooltip || showAllTip) {
|
|
14174
|
+
tfOns.mouseleave = evnt => {
|
|
14175
|
+
if (showTooltip || showAllTip) {
|
|
14176
|
+
$xetable.handleTargetLeaveEvent(evnt);
|
|
14177
|
+
}
|
|
14178
|
+
};
|
|
14179
|
+
}
|
|
14180
|
+
if (tableListeners['footer-cell-click']) {
|
|
14181
|
+
tfOns.click = evnt => {
|
|
14182
|
+
$xetable.emitEvent('footer-cell-click', Object.assign({
|
|
14183
|
+
cell: evnt.currentTarget
|
|
14184
|
+
}, cellParams), evnt);
|
|
14185
|
+
};
|
|
14186
|
+
}
|
|
14187
|
+
if (tableListeners['footer-cell-dblclick']) {
|
|
14188
|
+
tfOns.dblclick = evnt => {
|
|
14189
|
+
$xetable.emitEvent('footer-cell-dblclick', Object.assign({
|
|
14190
|
+
cell: evnt.currentTarget
|
|
14191
|
+
}, cellParams), evnt);
|
|
14192
|
+
};
|
|
14193
|
+
}
|
|
14194
|
+
// 合并行或列
|
|
14195
|
+
if (mergeFooterList.length) {
|
|
14196
|
+
const spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex);
|
|
14197
|
+
if (spanRest) {
|
|
14198
|
+
const {
|
|
14199
|
+
rowspan,
|
|
14200
|
+
colspan
|
|
14201
|
+
} = spanRest;
|
|
14202
|
+
if (!rowspan || !colspan) {
|
|
14203
|
+
return null;
|
|
14204
|
+
}
|
|
14205
|
+
if (rowspan > 1) {
|
|
14206
|
+
attrs.rowspan = rowspan;
|
|
14207
|
+
}
|
|
14208
|
+
if (colspan > 1) {
|
|
14209
|
+
attrs.colspan = colspan;
|
|
14210
|
+
}
|
|
14211
|
+
}
|
|
14212
|
+
} else if (footerSpanMethod) {
|
|
14213
|
+
// 自定义合并方法
|
|
14214
|
+
const {
|
|
14215
|
+
rowspan = 1,
|
|
14216
|
+
colspan = 1
|
|
14217
|
+
} = footerSpanMethod(cellParams) || {};
|
|
14218
|
+
if (!rowspan || !colspan) {
|
|
14219
|
+
return null;
|
|
14220
|
+
}
|
|
14221
|
+
if (rowspan > 1) {
|
|
14222
|
+
attrs.rowspan = rowspan;
|
|
14223
|
+
}
|
|
14224
|
+
if (colspan > 1) {
|
|
14225
|
+
attrs.colspan = colspan;
|
|
14226
|
+
}
|
|
14227
|
+
}
|
|
14228
|
+
return h('td', {
|
|
14229
|
+
class: ['vxe-footer--column', column.id, {
|
|
14230
|
+
[`col--${footAlign}`]: footAlign,
|
|
14231
|
+
[`col--${type}`]: type,
|
|
14232
|
+
'col--last': $columnIndex === tableColumn.length - 1,
|
|
14233
|
+
'fixed--hidden': fixedHiddenColumn,
|
|
14234
|
+
'col--ellipsis': hasEllipsis,
|
|
14235
|
+
'col--current': currentColumn === column
|
|
14236
|
+
}, getClass(footerClassName, cellParams), getClass(footerCellClassName, cellParams)],
|
|
14237
|
+
attrs,
|
|
14238
|
+
style: footerCellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerCellStyle) ? footerCellStyle(cellParams) : footerCellStyle : null,
|
|
14239
|
+
on: tfOns,
|
|
14240
|
+
key: columnKey || columnOpts.useKey || columnOpts.drag ? column.id : $columnIndex
|
|
14241
|
+
}, [h('div', {
|
|
14242
|
+
class: ['vxe-cell', {
|
|
14243
|
+
'c--title': showTitle,
|
|
14244
|
+
'c--tooltip': showTooltip,
|
|
14245
|
+
'c--ellipsis': showEllipsis
|
|
14246
|
+
}]
|
|
14247
|
+
}, column.renderFooter(h, cellParams))]);
|
|
14248
|
+
}).concat(scrollbarWidth ? [h('td', {
|
|
14249
|
+
key: `gr${$rowIndex}`,
|
|
14250
|
+
class: 'vxe-footer--gutter col--gutter'
|
|
14251
|
+
})] : []);
|
|
14252
|
+
}
|
|
14253
|
+
function footer_renderHeads(h, _vm, footerTableData) {
|
|
14254
|
+
const {
|
|
14255
|
+
$parent: $xetable,
|
|
14256
|
+
fixedType,
|
|
14257
|
+
tableColumn
|
|
14258
|
+
} = _vm;
|
|
14259
|
+
const {
|
|
14260
|
+
footerRowClassName,
|
|
14261
|
+
footerRowStyle,
|
|
14262
|
+
isDragColMove
|
|
14263
|
+
} = $xetable;
|
|
14264
|
+
const columnOpts = $xetable.columnOpts;
|
|
14265
|
+
return footerTableData.map((row, $rowIndex) => {
|
|
14266
|
+
const _rowIndex = $rowIndex;
|
|
14267
|
+
const rowParams = {
|
|
14268
|
+
$table: $xetable,
|
|
14269
|
+
row,
|
|
14270
|
+
_rowIndex,
|
|
14271
|
+
$rowIndex,
|
|
14272
|
+
fixed: fixedType,
|
|
14273
|
+
type: footer_renderType
|
|
14274
|
+
};
|
|
14275
|
+
if (columnOpts.drag) {
|
|
14276
|
+
return h('transition-group', {
|
|
14277
|
+
props: {
|
|
14278
|
+
tag: 'tr',
|
|
14279
|
+
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
14280
|
+
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
|
|
14281
|
+
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
|
|
14282
|
+
}
|
|
14283
|
+
}, footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIndex));
|
|
14284
|
+
}
|
|
14285
|
+
return h('tr', {
|
|
14286
|
+
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
|
|
14287
|
+
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
|
|
14288
|
+
}, footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIndex));
|
|
14289
|
+
});
|
|
14290
|
+
}
|
|
13741
14291
|
/* harmony default export */ var footer = ({
|
|
13742
14292
|
name: 'VxeTableFooter',
|
|
13743
14293
|
props: {
|
|
@@ -13789,24 +14339,12 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
13789
14339
|
footerTableData
|
|
13790
14340
|
} = this;
|
|
13791
14341
|
const {
|
|
13792
|
-
$listeners: tableListeners,
|
|
13793
14342
|
tId,
|
|
13794
|
-
footerRowClassName,
|
|
13795
|
-
footerCellClassName,
|
|
13796
|
-
footerRowStyle,
|
|
13797
|
-
footerCellStyle,
|
|
13798
|
-
footerAlign: allFooterAlign,
|
|
13799
14343
|
mergeFooterList,
|
|
13800
14344
|
footerSpanMethod,
|
|
13801
|
-
align: allAlign,
|
|
13802
14345
|
scrollXLoad,
|
|
13803
|
-
columnKey,
|
|
13804
|
-
columnOpts,
|
|
13805
14346
|
showFooterOverflow: allColumnFooterOverflow,
|
|
13806
|
-
currentColumn,
|
|
13807
|
-
overflowX,
|
|
13808
14347
|
scrollbarWidth,
|
|
13809
|
-
tooltipOpts,
|
|
13810
14348
|
visibleColumn,
|
|
13811
14349
|
expandColumn
|
|
13812
14350
|
} = $xetable;
|
|
@@ -13866,155 +14404,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
13866
14404
|
*/
|
|
13867
14405
|
h('tfoot', {
|
|
13868
14406
|
ref: 'tfoot'
|
|
13869
|
-
},
|
|
13870
|
-
const $rowIndex = _rowIndex;
|
|
13871
|
-
const rowParams = {
|
|
13872
|
-
$table: $xetable,
|
|
13873
|
-
row: list,
|
|
13874
|
-
_rowIndex,
|
|
13875
|
-
$rowIndex,
|
|
13876
|
-
fixed: fixedType,
|
|
13877
|
-
type: footer_renderType
|
|
13878
|
-
};
|
|
13879
|
-
return h('tr', {
|
|
13880
|
-
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
|
|
13881
|
-
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
|
|
13882
|
-
}, tableColumn.map((column, $columnIndex) => {
|
|
13883
|
-
const {
|
|
13884
|
-
type,
|
|
13885
|
-
showFooterOverflow,
|
|
13886
|
-
footerAlign,
|
|
13887
|
-
align,
|
|
13888
|
-
footerClassName,
|
|
13889
|
-
editRender,
|
|
13890
|
-
cellRender
|
|
13891
|
-
} = column;
|
|
13892
|
-
const renderOpts = editRender || cellRender;
|
|
13893
|
-
const compConf = renderOpts ? footer_renderer.get(renderOpts.name) : null;
|
|
13894
|
-
const showAllTip = tooltipOpts.showAll || tooltipOpts.enabled;
|
|
13895
|
-
const isColGroup = column.children && column.children.length;
|
|
13896
|
-
const fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
13897
|
-
const footOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showFooterOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
13898
|
-
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
13899
|
-
let showEllipsis = footOverflow === 'ellipsis';
|
|
13900
|
-
const showTitle = footOverflow === 'title';
|
|
13901
|
-
const showTooltip = footOverflow === true || footOverflow === 'tooltip';
|
|
13902
|
-
let hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
13903
|
-
const attrs = {
|
|
13904
|
-
colid: column.id
|
|
13905
|
-
};
|
|
13906
|
-
const tfOns = {};
|
|
13907
|
-
const columnIndex = $xetable.getColumnIndex(column);
|
|
13908
|
-
const _columnIndex = $xetable.getVTColumnIndex(column);
|
|
13909
|
-
const itemIndex = _columnIndex;
|
|
13910
|
-
const cellParams = {
|
|
13911
|
-
$table: $xetable,
|
|
13912
|
-
$grid: $xetable.xegrid,
|
|
13913
|
-
row: list,
|
|
13914
|
-
_rowIndex,
|
|
13915
|
-
$rowIndex,
|
|
13916
|
-
column,
|
|
13917
|
-
columnIndex,
|
|
13918
|
-
$columnIndex,
|
|
13919
|
-
_columnIndex,
|
|
13920
|
-
itemIndex,
|
|
13921
|
-
items: list,
|
|
13922
|
-
fixed: fixedType,
|
|
13923
|
-
type: footer_renderType,
|
|
13924
|
-
data: footerTableData
|
|
13925
|
-
};
|
|
13926
|
-
// 虚拟滚动不支持动态高度
|
|
13927
|
-
if (scrollXLoad && !hasEllipsis) {
|
|
13928
|
-
showEllipsis = hasEllipsis = true;
|
|
13929
|
-
}
|
|
13930
|
-
if (showTitle || showTooltip || showAllTip) {
|
|
13931
|
-
tfOns.mouseenter = evnt => {
|
|
13932
|
-
if (showTitle) {
|
|
13933
|
-
updateCellTitle(evnt.currentTarget, column);
|
|
13934
|
-
} else if (showTooltip || showAllTip) {
|
|
13935
|
-
$xetable.triggerFooterTooltipEvent(evnt, cellParams);
|
|
13936
|
-
}
|
|
13937
|
-
};
|
|
13938
|
-
}
|
|
13939
|
-
if (showTooltip || showAllTip) {
|
|
13940
|
-
tfOns.mouseleave = evnt => {
|
|
13941
|
-
if (showTooltip || showAllTip) {
|
|
13942
|
-
$xetable.handleTargetLeaveEvent(evnt);
|
|
13943
|
-
}
|
|
13944
|
-
};
|
|
13945
|
-
}
|
|
13946
|
-
if (tableListeners['footer-cell-click']) {
|
|
13947
|
-
tfOns.click = evnt => {
|
|
13948
|
-
$xetable.emitEvent('footer-cell-click', Object.assign({
|
|
13949
|
-
cell: evnt.currentTarget
|
|
13950
|
-
}, cellParams), evnt);
|
|
13951
|
-
};
|
|
13952
|
-
}
|
|
13953
|
-
if (tableListeners['footer-cell-dblclick']) {
|
|
13954
|
-
tfOns.dblclick = evnt => {
|
|
13955
|
-
$xetable.emitEvent('footer-cell-dblclick', Object.assign({
|
|
13956
|
-
cell: evnt.currentTarget
|
|
13957
|
-
}, cellParams), evnt);
|
|
13958
|
-
};
|
|
13959
|
-
}
|
|
13960
|
-
// 合并行或列
|
|
13961
|
-
if (mergeFooterList.length) {
|
|
13962
|
-
const spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex);
|
|
13963
|
-
if (spanRest) {
|
|
13964
|
-
const {
|
|
13965
|
-
rowspan,
|
|
13966
|
-
colspan
|
|
13967
|
-
} = spanRest;
|
|
13968
|
-
if (!rowspan || !colspan) {
|
|
13969
|
-
return null;
|
|
13970
|
-
}
|
|
13971
|
-
if (rowspan > 1) {
|
|
13972
|
-
attrs.rowspan = rowspan;
|
|
13973
|
-
}
|
|
13974
|
-
if (colspan > 1) {
|
|
13975
|
-
attrs.colspan = colspan;
|
|
13976
|
-
}
|
|
13977
|
-
}
|
|
13978
|
-
} else if (footerSpanMethod) {
|
|
13979
|
-
// 自定义合并方法
|
|
13980
|
-
const {
|
|
13981
|
-
rowspan = 1,
|
|
13982
|
-
colspan = 1
|
|
13983
|
-
} = footerSpanMethod(cellParams) || {};
|
|
13984
|
-
if (!rowspan || !colspan) {
|
|
13985
|
-
return null;
|
|
13986
|
-
}
|
|
13987
|
-
if (rowspan > 1) {
|
|
13988
|
-
attrs.rowspan = rowspan;
|
|
13989
|
-
}
|
|
13990
|
-
if (colspan > 1) {
|
|
13991
|
-
attrs.colspan = colspan;
|
|
13992
|
-
}
|
|
13993
|
-
}
|
|
13994
|
-
return h('td', {
|
|
13995
|
-
class: ['vxe-footer--column', column.id, {
|
|
13996
|
-
[`col--${footAlign}`]: footAlign,
|
|
13997
|
-
[`col--${type}`]: type,
|
|
13998
|
-
'col--last': $columnIndex === tableColumn.length - 1,
|
|
13999
|
-
'fixed--hidden': fixedHiddenColumn,
|
|
14000
|
-
'col--ellipsis': hasEllipsis,
|
|
14001
|
-
'col--current': currentColumn === column
|
|
14002
|
-
}, getClass(footerClassName, cellParams), getClass(footerCellClassName, cellParams)],
|
|
14003
|
-
attrs,
|
|
14004
|
-
style: footerCellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerCellStyle) ? footerCellStyle(cellParams) : footerCellStyle : null,
|
|
14005
|
-
on: tfOns,
|
|
14006
|
-
key: columnKey || columnOpts.useKey ? column.id : $columnIndex
|
|
14007
|
-
}, [h('div', {
|
|
14008
|
-
class: ['vxe-cell', {
|
|
14009
|
-
'c--title': showTitle,
|
|
14010
|
-
'c--tooltip': showTooltip,
|
|
14011
|
-
'c--ellipsis': showEllipsis
|
|
14012
|
-
}]
|
|
14013
|
-
}, column.renderFooter(h, cellParams))]);
|
|
14014
|
-
}).concat(scrollbarWidth ? [h('td', {
|
|
14015
|
-
class: 'vxe-footer--gutter col--gutter'
|
|
14016
|
-
})] : []));
|
|
14017
|
-
}))])]);
|
|
14407
|
+
}, footer_renderHeads(h, this, footerTableData))])]);
|
|
14018
14408
|
},
|
|
14019
14409
|
methods: {
|
|
14020
14410
|
/**
|
|
@@ -14241,8 +14631,12 @@ const {
|
|
|
14241
14631
|
cellConfig: Object,
|
|
14242
14632
|
// 行配置信息
|
|
14243
14633
|
rowConfig: Object,
|
|
14244
|
-
//
|
|
14634
|
+
// 已废弃,被 rowDragConfig 替换
|
|
14245
14635
|
dragConfig: Object,
|
|
14636
|
+
// 行拖拽排序配置项
|
|
14637
|
+
rowDragConfig: Object,
|
|
14638
|
+
// 列拖拽排序配置项
|
|
14639
|
+
columnDragConfig: Object,
|
|
14246
14640
|
// 列调整配置项
|
|
14247
14641
|
resizableConfig: Object,
|
|
14248
14642
|
// 序号配置项
|
|
@@ -17610,7 +18004,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
17610
18004
|
}
|
|
17611
18005
|
this.closeTooltip();
|
|
17612
18006
|
if (actived.column) {
|
|
17613
|
-
this.
|
|
18007
|
+
this.handleClearEdit(evnt);
|
|
17614
18008
|
}
|
|
17615
18009
|
type = 'edit-activated';
|
|
17616
18010
|
column.renderHeight = cell.offsetHeight;
|
|
@@ -17719,17 +18113,23 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
17719
18113
|
}
|
|
17720
18114
|
}
|
|
17721
18115
|
},
|
|
17722
|
-
_clearActived(
|
|
18116
|
+
_clearActived(row) {
|
|
17723
18117
|
if (true) {
|
|
17724
18118
|
warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit']);
|
|
17725
18119
|
}
|
|
17726
18120
|
// 即将废弃
|
|
17727
|
-
return this.clearEdit(
|
|
18121
|
+
return this.clearEdit(row);
|
|
17728
18122
|
},
|
|
17729
18123
|
/**
|
|
17730
18124
|
* 清除激活的编辑
|
|
17731
18125
|
*/
|
|
17732
|
-
_clearEdit(
|
|
18126
|
+
_clearEdit(row) {
|
|
18127
|
+
return this.handleClearEdit(null, row);
|
|
18128
|
+
},
|
|
18129
|
+
/**
|
|
18130
|
+
* 取消编辑
|
|
18131
|
+
*/
|
|
18132
|
+
handleClearEdit(evnt, targetRow) {
|
|
17733
18133
|
const $xeTable = this;
|
|
17734
18134
|
const reactData = $xeTable;
|
|
17735
18135
|
const {
|
|
@@ -17745,30 +18145,33 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
17745
18145
|
} = actived;
|
|
17746
18146
|
const validOpts = $xeTable.validOpts;
|
|
17747
18147
|
if (row || column) {
|
|
17748
|
-
|
|
18148
|
+
if (targetRow && getRowid($xeTable, targetRow) !== getRowid($xeTable, row)) {
|
|
18149
|
+
return $xeTable.$nextTick();
|
|
18150
|
+
}
|
|
18151
|
+
$xeTable._syncActivedCell();
|
|
17749
18152
|
actived.args = null;
|
|
17750
18153
|
actived.row = null;
|
|
17751
18154
|
actived.column = null;
|
|
17752
|
-
|
|
17753
|
-
|
|
18155
|
+
$xeTable.updateFooter();
|
|
18156
|
+
$xeTable.emitEvent('edit-closed', {
|
|
17754
18157
|
row,
|
|
17755
|
-
rowIndex:
|
|
17756
|
-
$rowIndex:
|
|
18158
|
+
rowIndex: $xeTable.getRowIndex(row),
|
|
18159
|
+
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
17757
18160
|
column,
|
|
17758
|
-
columnIndex:
|
|
17759
|
-
$columnIndex:
|
|
18161
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
18162
|
+
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
17760
18163
|
}, evnt);
|
|
17761
18164
|
}
|
|
17762
18165
|
focused.row = null;
|
|
17763
18166
|
focused.column = null;
|
|
17764
18167
|
if (validOpts.autoClear) {
|
|
17765
18168
|
if (validOpts.msgMode !== 'full' || mixin_getConfig().cellVaildMode === 'obsolete') {
|
|
17766
|
-
if (
|
|
17767
|
-
return
|
|
18169
|
+
if ($xeTable.clearValidate) {
|
|
18170
|
+
return $xeTable.clearValidate();
|
|
17768
18171
|
}
|
|
17769
18172
|
}
|
|
17770
18173
|
}
|
|
17771
|
-
return
|
|
18174
|
+
return $xeTable.$nextTick();
|
|
17772
18175
|
},
|
|
17773
18176
|
_getActiveRecord() {
|
|
17774
18177
|
if (true) {
|
|
@@ -17972,7 +18375,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
17972
18375
|
const selectMethod = () => {
|
|
17973
18376
|
if (isMouseSelected && (selected.row !== row || selected.column !== column)) {
|
|
17974
18377
|
if (actived.row !== row || (editOpts.mode === 'cell' ? actived.column !== column : false)) {
|
|
17975
|
-
this.
|
|
18378
|
+
this.handleClearEdit(evnt);
|
|
17976
18379
|
this.clearSelected(evnt);
|
|
17977
18380
|
this.clearCellAreas(evnt);
|
|
17978
18381
|
this.clearCopyCellArea(evnt);
|
|
@@ -20911,6 +21314,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
20911
21314
|
},
|
|
20912
21315
|
_saveCustom() {
|
|
20913
21316
|
const $xeTable = this;
|
|
21317
|
+
const reactData = $xeTable;
|
|
20914
21318
|
const {
|
|
20915
21319
|
customOpts,
|
|
20916
21320
|
customColumnList
|
|
@@ -20946,7 +21350,10 @@ function validErrorRuleValue(rule, val) {
|
|
|
20946
21350
|
column.visible = column.renderVisible;
|
|
20947
21351
|
}
|
|
20948
21352
|
});
|
|
20949
|
-
|
|
21353
|
+
reactData.isDragColMove = true;
|
|
21354
|
+
setTimeout(() => {
|
|
21355
|
+
reactData.isDragColMove = false;
|
|
21356
|
+
}, 1000);
|
|
20950
21357
|
return $xeTable.saveCustomStore('confirm');
|
|
20951
21358
|
},
|
|
20952
21359
|
_cancelCustom() {
|
|
@@ -21265,6 +21672,54 @@ function renderEmptyBody(h, _vm) {
|
|
|
21265
21672
|
}
|
|
21266
21673
|
return emptyContent;
|
|
21267
21674
|
}
|
|
21675
|
+
const renderDragTipContents = (h, $xeTable) => {
|
|
21676
|
+
const props = $xeTable;
|
|
21677
|
+
const reactData = $xeTable;
|
|
21678
|
+
const {
|
|
21679
|
+
dragConfig
|
|
21680
|
+
} = props;
|
|
21681
|
+
const {
|
|
21682
|
+
dragRow,
|
|
21683
|
+
dragCol,
|
|
21684
|
+
dragTipText
|
|
21685
|
+
} = reactData;
|
|
21686
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
21687
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
21688
|
+
const rowDragSlots = rowDragOpts.slots || {};
|
|
21689
|
+
const rTipSlot = rowDragSlots.tip || (dragConfig && dragConfig.slots ? dragConfig.slots.rowTip : null);
|
|
21690
|
+
const columnDragSlots = columnDragOpts.slots || {};
|
|
21691
|
+
const cTipSlot = columnDragSlots.tip;
|
|
21692
|
+
if (dragRow && rTipSlot) {
|
|
21693
|
+
return $xeTable.callSlot(rTipSlot, {
|
|
21694
|
+
row: dragRow
|
|
21695
|
+
}, h);
|
|
21696
|
+
}
|
|
21697
|
+
if (dragCol && cTipSlot) {
|
|
21698
|
+
return $xeTable.callSlot(cTipSlot, {
|
|
21699
|
+
column: dragCol
|
|
21700
|
+
}, h);
|
|
21701
|
+
}
|
|
21702
|
+
return [h('span', dragTipText)];
|
|
21703
|
+
};
|
|
21704
|
+
const renderDragTip = (h, $xeTable) => {
|
|
21705
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
21706
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
21707
|
+
if (rowOpts.drag || columnOpts.drag) {
|
|
21708
|
+
return h('div', {
|
|
21709
|
+
class: 'vxe-table--drag-wrapper'
|
|
21710
|
+
}, [h('div', {
|
|
21711
|
+
ref: 'refDragRowLineElem',
|
|
21712
|
+
class: 'vxe-table--drag-row-line'
|
|
21713
|
+
}), h('div', {
|
|
21714
|
+
ref: 'refDragColLineElem',
|
|
21715
|
+
class: 'vxe-table--drag-col-line'
|
|
21716
|
+
}), h('div', {
|
|
21717
|
+
ref: 'refDragTipElem',
|
|
21718
|
+
class: 'vxe-table--drag-sort-tip'
|
|
21719
|
+
}, renderDragTipContents(h, $xeTable))]);
|
|
21720
|
+
}
|
|
21721
|
+
return table_renderEmptyElement($xeTable);
|
|
21722
|
+
};
|
|
21268
21723
|
function handleUupdateResize(_vm) {
|
|
21269
21724
|
const {
|
|
21270
21725
|
$el
|
|
@@ -21511,9 +21966,13 @@ function handleUupdateResize(_vm) {
|
|
|
21511
21966
|
isHeader: false,
|
|
21512
21967
|
isFooter: false
|
|
21513
21968
|
},
|
|
21969
|
+
scrollVMLoading: false,
|
|
21514
21970
|
isDragRowMove: false,
|
|
21515
21971
|
dragRow: null,
|
|
21972
|
+
isDragColMove: false,
|
|
21973
|
+
dragCol: null,
|
|
21516
21974
|
dragTipText: '',
|
|
21975
|
+
_isResize: false,
|
|
21517
21976
|
_isLoading: false
|
|
21518
21977
|
};
|
|
21519
21978
|
},
|
|
@@ -21598,8 +22057,11 @@ function handleUupdateResize(_vm) {
|
|
|
21598
22057
|
computeRowOpts() {
|
|
21599
22058
|
return Object.assign({}, table_getConfig().table.rowConfig, this.rowConfig);
|
|
21600
22059
|
},
|
|
21601
|
-
|
|
21602
|
-
return Object.assign({}, table_getConfig().table.
|
|
22060
|
+
computeRowDragOpts() {
|
|
22061
|
+
return Object.assign({}, table_getConfig().table.rowDragConfig, this.rowDragConfig);
|
|
22062
|
+
},
|
|
22063
|
+
computeColumnDragOpts() {
|
|
22064
|
+
return Object.assign({}, table_getConfig().table.columnDragConfig, this.columnDragConfig);
|
|
21603
22065
|
},
|
|
21604
22066
|
resizeOpts() {
|
|
21605
22067
|
return this.computeResizeOpts;
|
|
@@ -22068,7 +22530,7 @@ function handleUupdateResize(_vm) {
|
|
|
22068
22530
|
if (this.rowOpts.height && !this.showOverflow) {
|
|
22069
22531
|
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
22070
22532
|
}
|
|
22071
|
-
if (!this.
|
|
22533
|
+
if (!this.handleRecalculateCellAreas) {
|
|
22072
22534
|
if (this.clipConfig) {
|
|
22073
22535
|
warnLog('vxe.error.notProp', ['clip-config']);
|
|
22074
22536
|
}
|
|
@@ -22080,6 +22542,9 @@ function handleUupdateResize(_vm) {
|
|
|
22080
22542
|
return;
|
|
22081
22543
|
}
|
|
22082
22544
|
}
|
|
22545
|
+
if (this.dragConfig) {
|
|
22546
|
+
warnLog('vxe.error.delProp', ['drag-config', 'row-drag-config']);
|
|
22547
|
+
}
|
|
22083
22548
|
if (this.treeConfig && treeOpts.children) {
|
|
22084
22549
|
warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField']);
|
|
22085
22550
|
}
|
|
@@ -22268,7 +22733,6 @@ function handleUupdateResize(_vm) {
|
|
|
22268
22733
|
const VxeUILoadingComponent = core_.VxeUI.getComponent('VxeLoading');
|
|
22269
22734
|
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
22270
22735
|
const $xeTable = this;
|
|
22271
|
-
const reactData = $xeTable;
|
|
22272
22736
|
const {
|
|
22273
22737
|
_e,
|
|
22274
22738
|
$scopedSlots,
|
|
@@ -22287,6 +22751,7 @@ function handleUupdateResize(_vm) {
|
|
|
22287
22751
|
treeConfig,
|
|
22288
22752
|
mouseConfig,
|
|
22289
22753
|
mouseOpts,
|
|
22754
|
+
areaOpts,
|
|
22290
22755
|
computeSize,
|
|
22291
22756
|
validOpts,
|
|
22292
22757
|
showFooter,
|
|
@@ -22313,28 +22778,25 @@ function handleUupdateResize(_vm) {
|
|
|
22313
22778
|
loadingOpts,
|
|
22314
22779
|
editRules
|
|
22315
22780
|
} = $xeTable;
|
|
22316
|
-
const {
|
|
22317
|
-
dragRow,
|
|
22318
|
-
dragTipText
|
|
22319
|
-
} = reactData;
|
|
22320
22781
|
const {
|
|
22321
22782
|
leftList,
|
|
22322
22783
|
rightList
|
|
22323
22784
|
} = columnStore;
|
|
22324
22785
|
const currLoading = this._isLoading || loading;
|
|
22325
22786
|
const vSize = computeSize;
|
|
22326
|
-
const dragOpts = $xeTable.computeDragOpts;
|
|
22327
22787
|
const virtualScrollBars = $xeTable.computeVirtualScrollBars;
|
|
22328
|
-
const
|
|
22329
|
-
const rowTipSlot = dragSlots.rowTip;
|
|
22788
|
+
const isArea = mouseConfig && mouseOpts.area;
|
|
22330
22789
|
return h('div', {
|
|
22790
|
+
ref: 'refElem',
|
|
22331
22791
|
class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
|
|
22332
22792
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
22333
22793
|
'vxe-editable': !!editConfig,
|
|
22334
22794
|
'old-cell-valid': editRules && table_getConfig().cellVaildMode === 'obsolete',
|
|
22335
22795
|
'cell--highlight': highlightCell,
|
|
22336
22796
|
'cell--selected': mouseConfig && mouseOpts.selected,
|
|
22337
|
-
'cell--area':
|
|
22797
|
+
'cell--area': isArea,
|
|
22798
|
+
'header-cell--area': isArea && areaOpts.selectCellByHeader,
|
|
22799
|
+
'body-cell--area': isArea && areaOpts.selectCellByBody,
|
|
22338
22800
|
'row--highlight': rowOpts.isHover || highlightHoverRow,
|
|
22339
22801
|
'column--highlight': columnOpts.isHover || highlightHoverColumn,
|
|
22340
22802
|
'checkbox--range': checkboxOpts.range,
|
|
@@ -22529,14 +22991,9 @@ function handleUupdateResize(_vm) {
|
|
|
22529
22991
|
}
|
|
22530
22992
|
}) : _e(),
|
|
22531
22993
|
/**
|
|
22532
|
-
|
|
22533
|
-
|
|
22534
|
-
|
|
22535
|
-
ref: 'refRowDragTipElem',
|
|
22536
|
-
class: 'vxe-table--row-drag-tip'
|
|
22537
|
-
}, rowTipSlot ? dragRow ? this.callSlot(rowTipSlot, {
|
|
22538
|
-
row: dragRow
|
|
22539
|
-
}, h) : [table_renderEmptyElement($xeTable)] : dragTipText ? [h('span', dragTipText)] : [table_renderEmptyElement($xeTable)]) : _e(), h('div', {}, [
|
|
22994
|
+
* 拖拽提示
|
|
22995
|
+
*/
|
|
22996
|
+
renderDragTip(h, this), h('div', {}, [
|
|
22540
22997
|
/**
|
|
22541
22998
|
* 提示相关
|
|
22542
22999
|
*/
|