vxe-table 3.21.21 → 3.21.23
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/es/{iconfont.1782656027274.ttf → iconfont.1783046294821.ttf} +0 -0
- package/es/iconfont.1783046294821.woff +0 -0
- package/es/iconfont.1783046294821.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +16 -3
- package/es/locale/lang/de-DE.js +16 -3
- package/es/locale/lang/en-US.js +20 -7
- package/es/locale/lang/es-ES.js +16 -3
- package/es/locale/lang/fr-FR.js +16 -3
- package/es/locale/lang/hu-HU.js +16 -3
- package/es/locale/lang/hy-AM.js +16 -3
- package/es/locale/lang/id-ID.js +16 -3
- package/es/locale/lang/it-IT.js +15 -2
- package/es/locale/lang/ja-JP.js +16 -3
- package/es/locale/lang/ko-KR.js +16 -3
- package/es/locale/lang/ms-MY.js +16 -3
- package/es/locale/lang/nb-NO.js +16 -3
- package/es/locale/lang/pt-BR.js +16 -3
- package/es/locale/lang/ru-RU.js +16 -3
- package/es/locale/lang/th-TH.js +16 -3
- package/es/locale/lang/ug-CN.js +16 -3
- package/es/locale/lang/uk-UA.js +16 -3
- package/es/locale/lang/uz-UZ.js +16 -3
- package/es/locale/lang/vi-VN.js +15 -2
- package/es/locale/lang/zh-CHT.js +18 -5
- package/es/locale/lang/zh-CN.js +18 -5
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +115 -38
- package/es/table/module/custom/panel.js +492 -312
- package/es/table/module/edit/mixin.js +12 -6
- package/es/table/src/columnInfo.js +13 -7
- package/es/table/src/methods.js +105 -60
- package/es/table/src/util.js +31 -1
- package/es/table/style.css +96 -49
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +16 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +96 -49
- package/es/vxe-table/style.min.css +1 -1
- package/lib/{iconfont.1782656027274.ttf → iconfont.1783046294821.ttf} +0 -0
- package/lib/iconfont.1783046294821.woff +0 -0
- package/lib/iconfont.1783046294821.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +612 -226
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +16 -3
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +16 -3
- package/lib/locale/lang/de-DE.js +16 -3
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +16 -3
- package/lib/locale/lang/en-US.js +20 -7
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +20 -7
- package/lib/locale/lang/es-ES.js +16 -3
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +16 -3
- package/lib/locale/lang/fr-FR.js +16 -3
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +16 -3
- package/lib/locale/lang/hu-HU.js +16 -3
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +16 -3
- package/lib/locale/lang/hy-AM.js +16 -3
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +16 -3
- package/lib/locale/lang/id-ID.js +16 -3
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +16 -3
- package/lib/locale/lang/it-IT.js +15 -2
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +15 -2
- package/lib/locale/lang/ja-JP.js +16 -3
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +16 -3
- package/lib/locale/lang/ko-KR.js +16 -3
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +16 -3
- package/lib/locale/lang/ms-MY.js +16 -3
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +16 -3
- package/lib/locale/lang/nb-NO.js +16 -3
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +16 -3
- package/lib/locale/lang/pt-BR.js +16 -3
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +16 -3
- package/lib/locale/lang/ru-RU.js +16 -3
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +16 -3
- package/lib/locale/lang/th-TH.js +16 -3
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +16 -3
- package/lib/locale/lang/ug-CN.js +16 -3
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +16 -3
- package/lib/locale/lang/uk-UA.js +16 -3
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +16 -3
- package/lib/locale/lang/uz-UZ.js +16 -3
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +16 -3
- package/lib/locale/lang/vi-VN.js +15 -2
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +15 -2
- package/lib/locale/lang/zh-CHT.js +18 -5
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +18 -5
- package/lib/locale/lang/zh-CN.js +18 -5
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +18 -5
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +121 -35
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +383 -158
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +12 -6
- package/lib/table/src/columnInfo.js +16 -6
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +11 -10
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/util.js +35 -1
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +96 -49
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +16 -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 +96 -49
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +16 -3
- package/packages/locale/lang/de-DE.ts +16 -3
- package/packages/locale/lang/en-US.ts +20 -7
- package/packages/locale/lang/es-ES.ts +16 -3
- package/packages/locale/lang/fr-FR.ts +16 -3
- package/packages/locale/lang/hu-HU.ts +16 -3
- package/packages/locale/lang/hy-AM.ts +16 -3
- package/packages/locale/lang/id-ID.ts +16 -3
- package/packages/locale/lang/it-IT.ts +15 -2
- package/packages/locale/lang/ja-JP.ts +16 -3
- package/packages/locale/lang/ko-KR.ts +16 -3
- package/packages/locale/lang/ms-MY.ts +16 -3
- package/packages/locale/lang/nb-NO.ts +16 -3
- package/packages/locale/lang/pt-BR.ts +16 -3
- package/packages/locale/lang/ru-RU.ts +16 -3
- package/packages/locale/lang/th-TH.ts +16 -3
- package/packages/locale/lang/ug-CN.ts +16 -3
- package/packages/locale/lang/uk-UA.ts +16 -3
- package/packages/locale/lang/uz-UZ.ts +16 -3
- package/packages/locale/lang/vi-VN.ts +15 -2
- package/packages/locale/lang/zh-CHT.ts +18 -5
- package/packages/locale/lang/zh-CN.ts +18 -5
- package/packages/table/module/custom/mixin.ts +115 -38
- package/packages/table/module/custom/panel.ts +545 -307
- package/packages/table/module/edit/mixin.ts +18 -6
- package/packages/table/src/columnInfo.ts +13 -7
- package/packages/table/src/methods.ts +120 -61
- package/packages/table/src/table.ts +6 -6
- package/packages/table/src/util.ts +34 -1
- package/packages/ui/index.ts +15 -3
- package/styles/components/icon.scss +29 -2
- package/styles/components/table-module/custom.scss +88 -67
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/theme/base.scss +13 -1
- package/es/iconfont.1782656027274.woff +0 -0
- package/es/iconfont.1782656027274.woff2 +0 -0
- package/lib/iconfont.1782656027274.woff +0 -0
- package/lib/iconfont.1782656027274.woff2 +0 -0
|
@@ -159,13 +159,16 @@ export default {
|
|
|
159
159
|
$xeTable.saveCustom();
|
|
160
160
|
$xeTable.closeCustom();
|
|
161
161
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
162
|
+
$xeTable.dispatchEvent('custom-confirm', {}, $event);
|
|
162
163
|
$xeTable.emitCustomEvent('close', $event);
|
|
164
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
163
165
|
},
|
|
164
166
|
cancelCloseEvent({ $event }) {
|
|
165
167
|
const $xeTableCustomPanel = this;
|
|
166
168
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
167
169
|
$xeTable.closeCustom();
|
|
168
170
|
$xeTable.emitCustomEvent('close', $event);
|
|
171
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
169
172
|
},
|
|
170
173
|
cancelCustomEvent({ $event }) {
|
|
171
174
|
const $xeTableCustomPanel = this;
|
|
@@ -173,7 +176,9 @@ export default {
|
|
|
173
176
|
$xeTable.cancelCustom();
|
|
174
177
|
$xeTable.closeCustom();
|
|
175
178
|
$xeTable.emitCustomEvent('cancel', $event);
|
|
179
|
+
$xeTable.dispatchEvent('custom-cancel', {}, $event);
|
|
176
180
|
$xeTable.emitCustomEvent('close', $event);
|
|
181
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
177
182
|
},
|
|
178
183
|
handleResetCustomEvent(evnt) {
|
|
179
184
|
const $xeTableCustomPanel = this;
|
|
@@ -181,7 +186,9 @@ export default {
|
|
|
181
186
|
$xeTable.resetCustom(true);
|
|
182
187
|
$xeTable.closeCustom();
|
|
183
188
|
$xeTable.emitCustomEvent('reset', evnt);
|
|
189
|
+
$xeTable.dispatchEvent('custom-reset', {}, evnt);
|
|
184
190
|
$xeTable.emitCustomEvent('close', evnt);
|
|
191
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
185
192
|
},
|
|
186
193
|
resetCustomEvent(evnt) {
|
|
187
194
|
if (VxeUI.modal) {
|
|
@@ -303,6 +310,23 @@ export default {
|
|
|
303
310
|
$xeTable.dispatchEvent('custom-fixed-change', { column, fixed: targetFixed }, evnt);
|
|
304
311
|
}
|
|
305
312
|
},
|
|
313
|
+
changeAlignOption(column, targetAlign, colProperty, renderProperty, eName, evnt) {
|
|
314
|
+
const $xeTableCustomPanel = this;
|
|
315
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
316
|
+
const tableReactData = $xeTable;
|
|
317
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
318
|
+
if (customOpts.immediate) {
|
|
319
|
+
column[colProperty] = targetAlign;
|
|
320
|
+
column[renderProperty] = targetAlign;
|
|
321
|
+
tableReactData.isCustomStatus = true;
|
|
322
|
+
$xeTable.handleCustom();
|
|
323
|
+
$xeTable.saveCustomStore(`update:${colProperty}`);
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
column[renderProperty] = targetAlign;
|
|
327
|
+
}
|
|
328
|
+
$xeTable.dispatchEvent(eName, { column, [colProperty]: targetAlign }, evnt);
|
|
329
|
+
},
|
|
306
330
|
allOptionEvent(evnt) {
|
|
307
331
|
const $xeTableCustomPanel = this;
|
|
308
332
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
@@ -757,7 +781,7 @@ export default {
|
|
|
757
781
|
const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
|
|
758
782
|
const customOpts = $xeTable.computeCustomOpts;
|
|
759
783
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
760
|
-
const {
|
|
784
|
+
const { defPopupStyle } = customStore;
|
|
761
785
|
const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
|
|
762
786
|
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
763
787
|
const vSize = $xeTable.computeSize;
|
|
@@ -950,36 +974,38 @@ export default {
|
|
|
950
974
|
!parentItem && allowFixed
|
|
951
975
|
? h('div', {
|
|
952
976
|
class: 'vxe-table-custom--fixed-option'
|
|
953
|
-
},
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
977
|
+
}, VxeUIButtonComponent
|
|
978
|
+
? [
|
|
979
|
+
h(VxeUIButtonComponent, {
|
|
980
|
+
props: {
|
|
981
|
+
mode: 'text',
|
|
982
|
+
icon: column.renderFixed === 'left' ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
983
|
+
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
984
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
985
|
+
title: getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
|
|
986
|
+
},
|
|
987
|
+
on: {
|
|
988
|
+
click: ({ $event }) => {
|
|
989
|
+
$xeTableCustomPanel.changeFixedOption(column, 'left', $event);
|
|
990
|
+
}
|
|
965
991
|
}
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
992
|
+
}),
|
|
993
|
+
h(VxeUIButtonComponent, {
|
|
994
|
+
props: {
|
|
995
|
+
mode: 'text',
|
|
996
|
+
icon: column.renderFixed === 'right' ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
997
|
+
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
998
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
999
|
+
title: getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
|
|
1000
|
+
},
|
|
1001
|
+
on: {
|
|
1002
|
+
click: ({ $event }) => {
|
|
1003
|
+
$xeTableCustomPanel.changeFixedOption(column, 'right', $event);
|
|
1004
|
+
}
|
|
979
1005
|
}
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
|
|
1006
|
+
})
|
|
1007
|
+
]
|
|
1008
|
+
: [])
|
|
983
1009
|
: renderEmptyElement($xeTable)
|
|
984
1010
|
]));
|
|
985
1011
|
}
|
|
@@ -991,7 +1017,7 @@ export default {
|
|
|
991
1017
|
[`size--${vSize}`]: vSize,
|
|
992
1018
|
'is--active': customStore.visible
|
|
993
1019
|
}],
|
|
994
|
-
style:
|
|
1020
|
+
style: defPopupStyle
|
|
995
1021
|
}, customStore.visible
|
|
996
1022
|
? [
|
|
997
1023
|
h('div', {
|
|
@@ -1131,53 +1157,25 @@ export default {
|
|
|
1131
1157
|
]
|
|
1132
1158
|
: []);
|
|
1133
1159
|
},
|
|
1134
|
-
|
|
1135
|
-
const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
|
|
1136
|
-
const VxeUIDrawerComponent = VxeUI.getComponent('VxeDrawer');
|
|
1160
|
+
renderPopupBodys(h) {
|
|
1137
1161
|
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
|
|
1138
1162
|
const VxeUINumberInputComponent = VxeUI.getComponent('VxeNumberInput');
|
|
1163
|
+
const VxeUIRadioGroupComponent = VxeUI.getComponent('VxeRadioGroup');
|
|
1139
1164
|
const $xeTableCustomPanel = this;
|
|
1140
|
-
const props = $xeTableCustomPanel;
|
|
1141
1165
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
1142
1166
|
const tableProps = $xeTable;
|
|
1143
1167
|
const tableReactData = $xeTable;
|
|
1144
|
-
const
|
|
1145
|
-
const
|
|
1146
|
-
const { customStore } = props;
|
|
1147
|
-
const { treeConfig, rowGroupConfig, aggregateConfig, resizable: allResizable } = tableProps;
|
|
1148
|
-
const { isCustomStatus, customColumnList } = tableReactData;
|
|
1168
|
+
const { resizable: allResizable } = tableProps;
|
|
1169
|
+
const { customColumnList } = tableReactData;
|
|
1149
1170
|
const customOpts = $xeTable.computeCustomOpts;
|
|
1150
1171
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
1151
|
-
const
|
|
1152
|
-
const { placement: aggPlacement } = aggregateOpts;
|
|
1153
|
-
const { mode, immediate, showSortDragButton, showSortMoveButton, showSortPutButton, modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
|
|
1172
|
+
const { immediate, showSortDragButton, showSortMoveButton, showSortPutButton, allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
|
|
1154
1173
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
1155
|
-
const { maxFixedSize } = columnOpts;
|
|
1156
1174
|
const resizableOpts = $xeTable.computeResizableOpts;
|
|
1157
1175
|
const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts;
|
|
1158
|
-
const modalOpts = Object.assign({}, modalOptions);
|
|
1159
|
-
const drawerOpts = Object.assign({}, drawerOptions);
|
|
1160
1176
|
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
1161
1177
|
const { isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
1162
|
-
const slots = customOpts.slots || {};
|
|
1163
|
-
const headerSlot = slots.header;
|
|
1164
|
-
const topSlot = slots.top;
|
|
1165
|
-
const bottomSlot = slots.bottom;
|
|
1166
|
-
const defaultSlot = slots.default;
|
|
1167
|
-
const footerSlot = slots.footer;
|
|
1168
1178
|
const trVNs = [];
|
|
1169
|
-
const isAllChecked = customStore.isAll;
|
|
1170
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
1171
|
-
const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
|
|
1172
|
-
const params = {
|
|
1173
|
-
$table: $xeTable,
|
|
1174
|
-
$grid: $xeGrid,
|
|
1175
|
-
$gantt: $xeGantt,
|
|
1176
|
-
columns: customColumnList,
|
|
1177
|
-
isAllChecked,
|
|
1178
|
-
isAllIndeterminate,
|
|
1179
|
-
isCustomStatus
|
|
1180
|
-
};
|
|
1181
1179
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parentItem) => {
|
|
1182
1180
|
const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true;
|
|
1183
1181
|
if (isVisible) {
|
|
@@ -1209,225 +1207,455 @@ export default {
|
|
|
1209
1207
|
const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
|
|
1210
1208
|
const isHidden = !isChecked;
|
|
1211
1209
|
const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
attrs: {
|
|
1237
|
-
title: getI18n('vxe.custom.setting.colVisible')
|
|
1238
|
-
},
|
|
1239
|
-
on: {
|
|
1240
|
-
click: (evnt) => {
|
|
1241
|
-
if (!isDisabled) {
|
|
1242
|
-
$xeTableCustomPanel.changeCheckboxOption(column, evnt);
|
|
1243
|
-
}
|
|
1210
|
+
const alignList = [
|
|
1211
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_LEFT, value: 'left', title: getI18n('vxe.custom.setting.anLeftTitle'), disabled: isHidden },
|
|
1212
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_CENTER, value: 'center', title: getI18n('vxe.custom.setting.anCenterTitle'), disabled: isHidden },
|
|
1213
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_RIGHT, value: 'right', title: getI18n('vxe.custom.setting.anRightTitle'), disabled: isHidden }
|
|
1214
|
+
];
|
|
1215
|
+
const tdVNs = [];
|
|
1216
|
+
if (allowVisible) {
|
|
1217
|
+
tdVNs.push(h('td', {
|
|
1218
|
+
key: 'av',
|
|
1219
|
+
class: 'vxe-table-custom-popup--column-td col--visible'
|
|
1220
|
+
}, [
|
|
1221
|
+
h('div', {
|
|
1222
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
1223
|
+
'is--checked': isChecked,
|
|
1224
|
+
'is--indeterminate': isIndeterminate,
|
|
1225
|
+
'is--disabled': isDisabled
|
|
1226
|
+
}],
|
|
1227
|
+
attrs: {
|
|
1228
|
+
title: getI18n('vxe.custom.setting.colVisible')
|
|
1229
|
+
},
|
|
1230
|
+
on: {
|
|
1231
|
+
click: (evnt) => {
|
|
1232
|
+
if (!isDisabled) {
|
|
1233
|
+
$xeTableCustomPanel.changeCheckboxOption(column, evnt);
|
|
1244
1234
|
}
|
|
1245
1235
|
}
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1236
|
+
}
|
|
1237
|
+
}, [
|
|
1238
|
+
h('span', {
|
|
1239
|
+
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
1240
|
+
})
|
|
1251
1241
|
])
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1242
|
+
]));
|
|
1243
|
+
}
|
|
1244
|
+
tdVNs.push(h('td', {
|
|
1245
|
+
key: 'at',
|
|
1246
|
+
class: 'vxe-table-custom-popup--column-td col--name'
|
|
1247
|
+
}, [
|
|
1248
|
+
h('div', {
|
|
1249
|
+
class: 'vxe-table-custom-popup--name'
|
|
1255
1250
|
}, [
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
}, [
|
|
1259
|
-
(allowSort && showSortDragButton) || (allowGroup || allowValues)
|
|
1260
|
-
? (showSortBtn || ((allowGroup || allowValues) && !isColGroup)
|
|
1261
|
-
? h('div', {
|
|
1262
|
-
class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
1263
|
-
'is--disabled': isHidden
|
|
1264
|
-
}],
|
|
1265
|
-
attrs: {
|
|
1266
|
-
title: getI18n('vxe.custom.setting.sortHelpTip')
|
|
1267
|
-
},
|
|
1268
|
-
on: (isHidden
|
|
1269
|
-
? {}
|
|
1270
|
-
: {
|
|
1271
|
-
mousedown: $xeTableCustomPanel.sortMousedownEvent,
|
|
1272
|
-
mouseup: $xeTableCustomPanel.sortMouseupEvent
|
|
1273
|
-
})
|
|
1274
|
-
}, [
|
|
1275
|
-
h('i', {
|
|
1276
|
-
class: getIcon().TABLE_CUSTOM_SORT
|
|
1277
|
-
})
|
|
1278
|
-
])
|
|
1279
|
-
: h('div', {
|
|
1280
|
-
class: 'vxe-table-custom-popup--column-sort-placeholder'
|
|
1281
|
-
}))
|
|
1282
|
-
: renderEmptyElement($xeTable),
|
|
1283
|
-
column.type === 'html'
|
|
1251
|
+
(allowSort && showSortDragButton) || (allowGroup || allowValues)
|
|
1252
|
+
? (showSortBtn || ((allowGroup || allowValues) && !isColGroup)
|
|
1284
1253
|
? h('div', {
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
innerHTML: colTitle
|
|
1289
|
-
}
|
|
1290
|
-
})
|
|
1291
|
-
: h('div', {
|
|
1292
|
-
key: '0',
|
|
1293
|
-
class: 'vxe-table-custom-popup--title',
|
|
1254
|
+
class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
1255
|
+
'is--disabled': isHidden
|
|
1256
|
+
}],
|
|
1294
1257
|
attrs: {
|
|
1295
|
-
title:
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1258
|
+
title: getI18n('vxe.custom.setting.sortHelpTip')
|
|
1259
|
+
},
|
|
1260
|
+
on: (isHidden
|
|
1261
|
+
? {}
|
|
1262
|
+
: {
|
|
1263
|
+
mousedown: $xeTableCustomPanel.sortMousedownEvent,
|
|
1264
|
+
mouseup: $xeTableCustomPanel.sortMouseupEvent
|
|
1265
|
+
})
|
|
1266
|
+
}, [
|
|
1267
|
+
h('i', {
|
|
1268
|
+
class: getIcon().TABLE_CUSTOM_SORT
|
|
1269
|
+
})
|
|
1270
|
+
])
|
|
1271
|
+
: h('div', {
|
|
1272
|
+
class: 'vxe-table-custom-popup--column-sort-placeholder'
|
|
1273
|
+
}))
|
|
1274
|
+
: renderEmptyElement($xeTable),
|
|
1275
|
+
column.type === 'html'
|
|
1276
|
+
? h('div', {
|
|
1277
|
+
key: '1',
|
|
1278
|
+
class: 'vxe-table-custom-popup--title',
|
|
1279
|
+
domProps: {
|
|
1280
|
+
innerHTML: colTitle
|
|
1281
|
+
}
|
|
1282
|
+
})
|
|
1283
|
+
: h('div', {
|
|
1284
|
+
key: '0',
|
|
1285
|
+
class: 'vxe-table-custom-popup--title',
|
|
1286
|
+
attrs: {
|
|
1287
|
+
title: colTitle
|
|
1288
|
+
}
|
|
1289
|
+
}, colTitle),
|
|
1290
|
+
showSortBtn && (showSortMoveButton || showSortPutButton)
|
|
1291
|
+
? h('div', {
|
|
1292
|
+
class: 'vxe-table-custom-popup--move-btn'
|
|
1293
|
+
}, VxeUIButtonComponent
|
|
1294
|
+
? [
|
|
1295
|
+
showSortMoveButton
|
|
1296
|
+
? h(VxeUIButtonComponent, {
|
|
1297
|
+
props: {
|
|
1298
|
+
mode: 'text',
|
|
1299
|
+
icon: 'vxe-icon-arrows-up',
|
|
1300
|
+
title: getI18n('vxe.custom.setting.moveUpTitle'),
|
|
1301
|
+
disabled: index <= 0
|
|
1302
|
+
},
|
|
1303
|
+
on: {
|
|
1304
|
+
click(evntParame) {
|
|
1305
|
+
$xeTableCustomPanel.sortMoveUpEvent(evntParame, column);
|
|
1330
1306
|
}
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1307
|
+
}
|
|
1308
|
+
})
|
|
1309
|
+
: renderEmptyElement($xeTable),
|
|
1310
|
+
showSortMoveButton
|
|
1311
|
+
? h(VxeUIButtonComponent, {
|
|
1312
|
+
props: {
|
|
1313
|
+
mode: 'text',
|
|
1314
|
+
icon: 'vxe-icon-arrows-down',
|
|
1315
|
+
title: getI18n('vxe.custom.setting.moveDnTitle'),
|
|
1316
|
+
disabled: index >= items.length - 1
|
|
1317
|
+
},
|
|
1318
|
+
on: {
|
|
1319
|
+
click(evntParame) {
|
|
1320
|
+
$xeTableCustomPanel.sortMoveDnEvent(evntParame, column);
|
|
1345
1321
|
}
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1322
|
+
}
|
|
1323
|
+
})
|
|
1324
|
+
: renderEmptyElement($xeTable),
|
|
1325
|
+
showSortPutButton && !parentItem
|
|
1326
|
+
? h(VxeUIButtonComponent, {
|
|
1327
|
+
props: {
|
|
1328
|
+
mode: 'text',
|
|
1329
|
+
icon: 'vxe-icon-top',
|
|
1330
|
+
title: getI18n('vxe.custom.setting.putTopTitle'),
|
|
1331
|
+
disabled: index <= 0
|
|
1332
|
+
},
|
|
1333
|
+
on: {
|
|
1334
|
+
click(evntParame) {
|
|
1335
|
+
$xeTableCustomPanel.sortMoveTopEvent(evntParame, column);
|
|
1360
1336
|
}
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
}, [
|
|
1372
|
-
((column.children && column.children.length) ||
|
|
1373
|
-
!(XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable)))
|
|
1374
|
-
? h('span', '-')
|
|
1375
|
-
: (VxeUINumberInputComponent
|
|
1376
|
-
? h(VxeUINumberInputComponent, {
|
|
1377
|
-
props: {
|
|
1378
|
-
type: 'integer',
|
|
1379
|
-
immediate: false,
|
|
1380
|
-
disabled: isHidden,
|
|
1381
|
-
value: column.renderResizeWidth,
|
|
1382
|
-
min: customMinWidth || undefined,
|
|
1383
|
-
max: customMaxWidth || undefined
|
|
1384
|
-
},
|
|
1385
|
-
on: {
|
|
1386
|
-
modelValue(value) {
|
|
1387
|
-
column.renderResizeWidth = Math.max(0, Number(value));
|
|
1337
|
+
}
|
|
1338
|
+
})
|
|
1339
|
+
: renderEmptyElement($xeTable),
|
|
1340
|
+
showSortPutButton && !parentItem
|
|
1341
|
+
? h(VxeUIButtonComponent, {
|
|
1342
|
+
props: {
|
|
1343
|
+
mode: 'text',
|
|
1344
|
+
icon: 'vxe-icon-bottom',
|
|
1345
|
+
title: getI18n('vxe.custom.setting.putBottomTitle'),
|
|
1346
|
+
disabled: index >= items.length - 1
|
|
1388
1347
|
},
|
|
1389
|
-
|
|
1390
|
-
|
|
1348
|
+
on: {
|
|
1349
|
+
click(evntParame) {
|
|
1350
|
+
$xeTableCustomPanel.sortMoveBottomEvent(evntParame, column);
|
|
1351
|
+
}
|
|
1391
1352
|
}
|
|
1353
|
+
})
|
|
1354
|
+
: renderEmptyElement($xeTable)
|
|
1355
|
+
]
|
|
1356
|
+
: [])
|
|
1357
|
+
: renderEmptyElement($xeTable)
|
|
1358
|
+
])
|
|
1359
|
+
]));
|
|
1360
|
+
if (allowResizable) {
|
|
1361
|
+
tdVNs.push(h('td', {
|
|
1362
|
+
key: 'aw',
|
|
1363
|
+
class: 'vxe-table-custom-popup--column-td col--resizable'
|
|
1364
|
+
}, [
|
|
1365
|
+
((column.children && column.children.length) ||
|
|
1366
|
+
!(XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable)))
|
|
1367
|
+
? h('span', '-')
|
|
1368
|
+
: (VxeUINumberInputComponent
|
|
1369
|
+
? h(VxeUINumberInputComponent, {
|
|
1370
|
+
props: {
|
|
1371
|
+
type: 'integer',
|
|
1372
|
+
immediate: false,
|
|
1373
|
+
disabled: isHidden,
|
|
1374
|
+
value: column.renderResizeWidth,
|
|
1375
|
+
min: customMinWidth || undefined,
|
|
1376
|
+
max: customMaxWidth || undefined
|
|
1377
|
+
},
|
|
1378
|
+
on: {
|
|
1379
|
+
modelValue(value) {
|
|
1380
|
+
const width = Math.max(0, Number(value));
|
|
1381
|
+
column.renderResizeWidth = width;
|
|
1382
|
+
},
|
|
1383
|
+
change() {
|
|
1384
|
+
$xeTableCustomPanel.changeColumnWidth(column);
|
|
1392
1385
|
}
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1386
|
+
}
|
|
1387
|
+
})
|
|
1388
|
+
: renderEmptyElement($xeTable))
|
|
1389
|
+
]));
|
|
1390
|
+
}
|
|
1391
|
+
if (allowFixed) {
|
|
1392
|
+
tdVNs.push(h('td', {
|
|
1393
|
+
key: 'af',
|
|
1394
|
+
class: 'vxe-table-custom-popup--column-td col--fixed'
|
|
1395
|
+
}, parentItem
|
|
1396
|
+
? [h('span', '-')]
|
|
1397
|
+
: (VxeUIRadioGroupComponent
|
|
1398
|
+
? [
|
|
1399
|
+
h(VxeUIButtonComponent, {
|
|
1404
1400
|
props: {
|
|
1405
|
-
|
|
1401
|
+
icon: column.renderFixed === 'left' ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
1402
|
+
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
1403
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
1404
|
+
title: getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
|
|
1405
|
+
},
|
|
1406
|
+
on: {
|
|
1407
|
+
click: ({ $event }) => {
|
|
1408
|
+
$xeTableCustomPanel.changeFixedOption(column, 'left', $event);
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}),
|
|
1412
|
+
h(VxeUIButtonComponent, {
|
|
1413
|
+
props: {
|
|
1414
|
+
icon: column.renderFixed === 'right' ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
1415
|
+
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
1416
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
1417
|
+
title: getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
|
|
1418
|
+
},
|
|
1419
|
+
on: {
|
|
1420
|
+
click: ({ $event }) => {
|
|
1421
|
+
$xeTableCustomPanel.changeFixedOption(column, 'right', $event);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
})
|
|
1425
|
+
]
|
|
1426
|
+
: [])));
|
|
1427
|
+
}
|
|
1428
|
+
if (allowAlign) {
|
|
1429
|
+
tdVNs.push(h('td', {
|
|
1430
|
+
key: 'aa',
|
|
1431
|
+
class: 'vxe-table-custom-popup--column-td col--align'
|
|
1432
|
+
}, VxeUIRadioGroupComponent
|
|
1433
|
+
? [
|
|
1434
|
+
h(VxeUIRadioGroupComponent, {
|
|
1435
|
+
props: {
|
|
1436
|
+
value: column.renderAlign || '',
|
|
1437
|
+
type: 'button',
|
|
1438
|
+
strict: false,
|
|
1439
|
+
disabled: isHidden,
|
|
1440
|
+
options: alignList
|
|
1441
|
+
},
|
|
1442
|
+
on: {
|
|
1443
|
+
change({ value, $event }) {
|
|
1444
|
+
$xeTableCustomPanel.changeAlignOption(column, value, 'align', 'renderAlign', 'custom-align-change', $event);
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
})
|
|
1448
|
+
]
|
|
1449
|
+
: []));
|
|
1450
|
+
}
|
|
1451
|
+
if (allowHeaderAlign) {
|
|
1452
|
+
tdVNs.push(h('td', {
|
|
1453
|
+
key: 'aha',
|
|
1454
|
+
class: 'vxe-table-custom-popup--column-td col--header-align'
|
|
1455
|
+
}, isColGroup
|
|
1456
|
+
? [h('span', '-')]
|
|
1457
|
+
: (VxeUIRadioGroupComponent
|
|
1458
|
+
? [
|
|
1459
|
+
h(VxeUIRadioGroupComponent, {
|
|
1460
|
+
props: {
|
|
1461
|
+
value: column.renderHeaderAlign || '',
|
|
1406
1462
|
type: 'button',
|
|
1407
|
-
|
|
1463
|
+
strict: false,
|
|
1408
1464
|
disabled: isHidden,
|
|
1409
|
-
options:
|
|
1410
|
-
{ label: getI18n('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isHidden || isMaxFixedColumn },
|
|
1411
|
-
{ label: getI18n('vxe.custom.setting.fixedUnset'), value: '', disabled: isHidden },
|
|
1412
|
-
{ label: getI18n('vxe.custom.setting.fixedRight'), value: 'right', disabled: isHidden || isMaxFixedColumn }
|
|
1413
|
-
]
|
|
1465
|
+
options: alignList
|
|
1414
1466
|
},
|
|
1415
1467
|
on: {
|
|
1416
|
-
change({
|
|
1417
|
-
$xeTableCustomPanel.
|
|
1468
|
+
change({ value, $event }) {
|
|
1469
|
+
$xeTableCustomPanel.changeAlignOption(column, value, 'headerAlign', 'renderHeaderAlign', 'custom-header-align-change', $event);
|
|
1418
1470
|
}
|
|
1419
1471
|
}
|
|
1420
1472
|
})
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1473
|
+
]
|
|
1474
|
+
: [])));
|
|
1475
|
+
}
|
|
1476
|
+
if (allowFooterAlign) {
|
|
1477
|
+
tdVNs.push(h('td', {
|
|
1478
|
+
key: 'afa',
|
|
1479
|
+
class: 'vxe-table-custom-popup--column-td col--footer-align'
|
|
1480
|
+
}, isColGroup
|
|
1481
|
+
? [h('span', '-')]
|
|
1482
|
+
: (VxeUIRadioGroupComponent
|
|
1483
|
+
? [
|
|
1484
|
+
h(VxeUIRadioGroupComponent, {
|
|
1485
|
+
props: {
|
|
1486
|
+
value: column.renderFooterAlign || '',
|
|
1487
|
+
type: 'button',
|
|
1488
|
+
strict: false,
|
|
1489
|
+
disabled: isHidden,
|
|
1490
|
+
options: alignList
|
|
1491
|
+
},
|
|
1492
|
+
on: {
|
|
1493
|
+
change({ value, $event }) {
|
|
1494
|
+
$xeTableCustomPanel.changeAlignOption(column, value, 'footerAlign', 'renderFooterAlign', 'custom-footer-align-change', $event);
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
})
|
|
1498
|
+
]
|
|
1499
|
+
: [])));
|
|
1500
|
+
}
|
|
1501
|
+
trVNs.push(h('tr', {
|
|
1502
|
+
key: column.id,
|
|
1503
|
+
attrs: {
|
|
1504
|
+
colid: column.id
|
|
1505
|
+
},
|
|
1506
|
+
class: [`vxe-table-custom-popup--row level--${column.level}`, {
|
|
1507
|
+
'is--group': isColGroup
|
|
1508
|
+
}],
|
|
1509
|
+
on: {
|
|
1510
|
+
dragstart: $xeTableCustomPanel.sortDragstartEvent,
|
|
1511
|
+
dragend: $xeTableCustomPanel.sortDragendEvent,
|
|
1512
|
+
dragover: $xeTableCustomPanel.sortDragoverEvent
|
|
1513
|
+
}
|
|
1514
|
+
}, tdVNs));
|
|
1424
1515
|
}
|
|
1425
1516
|
});
|
|
1517
|
+
return trVNs;
|
|
1518
|
+
},
|
|
1519
|
+
renderPopupPanel(h) {
|
|
1520
|
+
const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
|
|
1521
|
+
const VxeUIDrawerComponent = VxeUI.getComponent('VxeDrawer');
|
|
1522
|
+
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
|
|
1523
|
+
const $xeTableCustomPanel = this;
|
|
1524
|
+
const props = $xeTableCustomPanel;
|
|
1525
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
1526
|
+
const tableProps = $xeTable;
|
|
1527
|
+
const tableReactData = $xeTable;
|
|
1528
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
1529
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
1530
|
+
const { customStore } = props;
|
|
1531
|
+
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
|
|
1532
|
+
const { isCustomStatus, customColumnList } = tableReactData;
|
|
1533
|
+
const vSize = $xeTable.computeSize;
|
|
1534
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
1535
|
+
const aggregateOpts = $xeTable.computeAggregateOpts;
|
|
1536
|
+
const { panePopupStyle } = customStore;
|
|
1537
|
+
const { placement: aggPlacement } = aggregateOpts;
|
|
1538
|
+
const { mode, immediate, modalOptions, drawerOptions, allowVisible, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable } = customOpts;
|
|
1539
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
1540
|
+
const { maxFixedSize } = columnOpts;
|
|
1541
|
+
const modalOpts = Object.assign({}, modalOptions);
|
|
1542
|
+
const drawerOpts = Object.assign({}, drawerOptions);
|
|
1543
|
+
const slots = customOpts.slots || {};
|
|
1544
|
+
const headerSlot = slots.header;
|
|
1545
|
+
const topSlot = slots.top;
|
|
1546
|
+
const bottomSlot = slots.bottom;
|
|
1547
|
+
const defaultSlot = slots.default;
|
|
1548
|
+
const footerSlot = slots.footer;
|
|
1549
|
+
const isAllChecked = customStore.isAll;
|
|
1550
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
1551
|
+
const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
|
|
1552
|
+
const params = {
|
|
1553
|
+
$table: $xeTable,
|
|
1554
|
+
$grid: $xeGrid,
|
|
1555
|
+
$gantt: $xeGantt,
|
|
1556
|
+
columns: customColumnList,
|
|
1557
|
+
isAllChecked,
|
|
1558
|
+
isAllIndeterminate,
|
|
1559
|
+
isCustomStatus
|
|
1560
|
+
};
|
|
1561
|
+
const colVNs = [];
|
|
1562
|
+
const headVNs = [];
|
|
1563
|
+
if (allowVisible) {
|
|
1564
|
+
colVNs.push(h('col', {
|
|
1565
|
+
key: 'av',
|
|
1566
|
+
class: 'vxe-table-custom-popup--column-col col--checkbox'
|
|
1567
|
+
}));
|
|
1568
|
+
headVNs.push(h('th', {
|
|
1569
|
+
key: 'av',
|
|
1570
|
+
class: 'vxe-table-custom-popup--column-th col--checkbox'
|
|
1571
|
+
}, [
|
|
1572
|
+
h('div', {
|
|
1573
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
1574
|
+
'is--checked': isAllChecked,
|
|
1575
|
+
'is--indeterminate': isAllIndeterminate
|
|
1576
|
+
}],
|
|
1577
|
+
attrs: {
|
|
1578
|
+
title: getI18n('vxe.table.allTitle')
|
|
1579
|
+
},
|
|
1580
|
+
on: {
|
|
1581
|
+
click: $xeTableCustomPanel.allOptionEvent
|
|
1582
|
+
}
|
|
1583
|
+
}, [
|
|
1584
|
+
h('span', {
|
|
1585
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
1586
|
+
})
|
|
1587
|
+
// h('span', {
|
|
1588
|
+
// class: 'vxe-checkbox--label'
|
|
1589
|
+
// }, getI18n('vxe.toolbar.customAll'))
|
|
1590
|
+
])
|
|
1591
|
+
]));
|
|
1592
|
+
}
|
|
1593
|
+
colVNs.push(h('col', {
|
|
1594
|
+
key: 'at',
|
|
1595
|
+
class: 'vxe-table-custom-popup--column-col col--title'
|
|
1596
|
+
}));
|
|
1597
|
+
headVNs.push(h('th', {
|
|
1598
|
+
key: 'at',
|
|
1599
|
+
class: 'vxe-table-custom-popup--column-th col--title'
|
|
1600
|
+
}, getI18n('vxe.custom.setting.colTitle')));
|
|
1601
|
+
if (allowResizable) {
|
|
1602
|
+
colVNs.push(h('col', {
|
|
1603
|
+
key: 'aw',
|
|
1604
|
+
class: 'vxe-table-custom-popup--column-col col--width'
|
|
1605
|
+
}));
|
|
1606
|
+
headVNs.push(h('th', {
|
|
1607
|
+
key: 'aw',
|
|
1608
|
+
class: 'vxe-table-custom-popup--column-th col--width'
|
|
1609
|
+
}, getI18n('vxe.custom.setting.colResizable')));
|
|
1610
|
+
}
|
|
1611
|
+
if (allowFixed) {
|
|
1612
|
+
colVNs.push(h('col', {
|
|
1613
|
+
key: 'af',
|
|
1614
|
+
class: 'vxe-table-custom-popup--column-col col--fixed'
|
|
1615
|
+
}));
|
|
1616
|
+
headVNs.push(h('th', {
|
|
1617
|
+
key: 'af',
|
|
1618
|
+
class: 'vxe-table-custom-popup--column-th col--fixed'
|
|
1619
|
+
}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])));
|
|
1620
|
+
}
|
|
1621
|
+
if (allowAlign) {
|
|
1622
|
+
colVNs.push(h('col', {
|
|
1623
|
+
key: 'aa',
|
|
1624
|
+
class: 'vxe-table-custom-popup--column-col col--align'
|
|
1625
|
+
}));
|
|
1626
|
+
headVNs.push(h('th', {
|
|
1627
|
+
key: 'aa',
|
|
1628
|
+
class: 'vxe-table-custom-popup--column-th col--align'
|
|
1629
|
+
}, getI18n('vxe.custom.setting.colAlign')));
|
|
1630
|
+
}
|
|
1631
|
+
if (allowHeaderAlign) {
|
|
1632
|
+
colVNs.push(h('col', {
|
|
1633
|
+
key: 'aha',
|
|
1634
|
+
class: 'vxe-table-custom-popup--column-col col--header-align'
|
|
1635
|
+
}));
|
|
1636
|
+
headVNs.push(h('th', {
|
|
1637
|
+
key: 'aha',
|
|
1638
|
+
class: 'vxe-table-custom-popup--column-th col--header-align'
|
|
1639
|
+
}, getI18n('vxe.custom.setting.colHeadAlign')));
|
|
1640
|
+
}
|
|
1641
|
+
if (allowFooterAlign) {
|
|
1642
|
+
colVNs.push(h('col', {
|
|
1643
|
+
key: 'afa',
|
|
1644
|
+
class: 'vxe-table-custom-popup--column-col col--footer-align'
|
|
1645
|
+
}));
|
|
1646
|
+
headVNs.push(h('th', {
|
|
1647
|
+
key: 'afa',
|
|
1648
|
+
class: 'vxe-table-custom-popup--column-th col--footer-align'
|
|
1649
|
+
}, getI18n('vxe.custom.setting.colFootAlign')));
|
|
1650
|
+
}
|
|
1426
1651
|
const scopedSlots = {
|
|
1427
1652
|
default: () => {
|
|
1428
1653
|
return h('div', {
|
|
1429
1654
|
ref: 'refBodyWrapperElem',
|
|
1430
|
-
class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}
|
|
1655
|
+
class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`, {
|
|
1656
|
+
[`size--${vSize}`]: vSize
|
|
1657
|
+
}],
|
|
1658
|
+
style: panePopupStyle
|
|
1431
1659
|
}, defaultSlot
|
|
1432
1660
|
? $xeTable.callSlot(defaultSlot, params, h)
|
|
1433
1661
|
: [
|
|
@@ -1451,59 +1679,9 @@ export default {
|
|
|
1451
1679
|
class: 'vxe-table-custom-popup--table-wrapper'
|
|
1452
1680
|
}, [
|
|
1453
1681
|
h('table', {}, [
|
|
1454
|
-
h('colgroup', {},
|
|
1455
|
-
allowVisible
|
|
1456
|
-
? h('col', {
|
|
1457
|
-
class: 'vxe-table-custom-popup--table-col-seq'
|
|
1458
|
-
})
|
|
1459
|
-
: renderEmptyElement($xeTable),
|
|
1460
|
-
h('col', {
|
|
1461
|
-
class: 'vxe-table-custom-popup--table-col-title'
|
|
1462
|
-
}),
|
|
1463
|
-
allowResizable
|
|
1464
|
-
? h('col', {
|
|
1465
|
-
class: 'vxe-table-custom-popup--table-col-width'
|
|
1466
|
-
})
|
|
1467
|
-
: renderEmptyElement($xeTable),
|
|
1468
|
-
allowFixed
|
|
1469
|
-
? h('col', {
|
|
1470
|
-
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
1471
|
-
})
|
|
1472
|
-
: renderEmptyElement($xeTable)
|
|
1473
|
-
]),
|
|
1682
|
+
h('colgroup', {}, colVNs),
|
|
1474
1683
|
h('thead', {}, [
|
|
1475
|
-
h('tr', {},
|
|
1476
|
-
allowVisible
|
|
1477
|
-
? h('th', {}, [
|
|
1478
|
-
h('div', {
|
|
1479
|
-
class: ['vxe-table-custom--checkbox-option', {
|
|
1480
|
-
'is--checked': isAllChecked,
|
|
1481
|
-
'is--indeterminate': isAllIndeterminate
|
|
1482
|
-
}],
|
|
1483
|
-
attrs: {
|
|
1484
|
-
title: getI18n('vxe.table.allTitle')
|
|
1485
|
-
},
|
|
1486
|
-
on: {
|
|
1487
|
-
click: $xeTableCustomPanel.allOptionEvent
|
|
1488
|
-
}
|
|
1489
|
-
}, [
|
|
1490
|
-
h('span', {
|
|
1491
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
1492
|
-
}),
|
|
1493
|
-
h('span', {
|
|
1494
|
-
class: 'vxe-checkbox--label'
|
|
1495
|
-
}, getI18n('vxe.toolbar.customAll'))
|
|
1496
|
-
])
|
|
1497
|
-
])
|
|
1498
|
-
: renderEmptyElement($xeTable),
|
|
1499
|
-
h('th', {}, getI18n('vxe.custom.setting.colTitle')),
|
|
1500
|
-
allowResizable
|
|
1501
|
-
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
|
1502
|
-
: renderEmptyElement($xeTable),
|
|
1503
|
-
allowFixed
|
|
1504
|
-
? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
|
1505
|
-
: renderEmptyElement($xeTable)
|
|
1506
|
-
])
|
|
1684
|
+
h('tr', {}, headVNs)
|
|
1507
1685
|
]),
|
|
1508
1686
|
h('transition-group', {
|
|
1509
1687
|
class: 'vxe-table-custom--panel-list',
|
|
@@ -1511,7 +1689,7 @@ export default {
|
|
|
1511
1689
|
tag: 'tbody',
|
|
1512
1690
|
name: 'vxe-table-custom--list'
|
|
1513
1691
|
}
|
|
1514
|
-
},
|
|
1692
|
+
}, $xeTableCustomPanel.renderPopupBodys(h))
|
|
1515
1693
|
])
|
|
1516
1694
|
]),
|
|
1517
1695
|
bottomSlot
|
|
@@ -1549,6 +1727,7 @@ export default {
|
|
|
1549
1727
|
immediate
|
|
1550
1728
|
? h(VxeUIButtonComponent, {
|
|
1551
1729
|
props: {
|
|
1730
|
+
status: 'primary',
|
|
1552
1731
|
content: customOpts.resetButtonText || getI18n('vxe.table.customClose')
|
|
1553
1732
|
},
|
|
1554
1733
|
on: {
|
|
@@ -1609,11 +1788,11 @@ export default {
|
|
|
1609
1788
|
? h(VxeUIModalComponent, {
|
|
1610
1789
|
key: 'modal',
|
|
1611
1790
|
props: {
|
|
1612
|
-
className: ['vxe-table-custom-
|
|
1791
|
+
className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
1613
1792
|
value: customStore.visible,
|
|
1614
1793
|
title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
1615
|
-
width: modalOpts.width || Math.min(
|
|
1616
|
-
minWidth: modalOpts.minWidth ||
|
|
1794
|
+
width: modalOpts.width || Math.min(1000, document.documentElement.clientWidth),
|
|
1795
|
+
minWidth: modalOpts.minWidth || 800,
|
|
1617
1796
|
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
1618
1797
|
minHeight: modalOpts.minHeight || 400,
|
|
1619
1798
|
showZoom: modalOpts.showZoom,
|
|
@@ -1622,6 +1801,7 @@ export default {
|
|
|
1622
1801
|
mask: modalOpts.mask,
|
|
1623
1802
|
lockView: modalOpts.lockView,
|
|
1624
1803
|
resize: modalOpts.resize,
|
|
1804
|
+
transfer: modalOpts.transfer,
|
|
1625
1805
|
escClosable: !!modalOpts.escClosable,
|
|
1626
1806
|
maskClosable: !!modalOpts.maskClosable,
|
|
1627
1807
|
destroyOnClose: true,
|