vxe-table 4.19.22 → 4.19.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/dist/all.esm.js +630 -332
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/{iconfont.1782890314097.ttf → iconfont.1783046321610.ttf} +0 -0
- package/es/iconfont.1783046321610.woff +0 -0
- package/es/iconfont.1783046321610.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +12 -3
- package/es/locale/lang/de-DE.js +12 -3
- package/es/locale/lang/en-US.js +16 -7
- package/es/locale/lang/es-ES.js +12 -3
- package/es/locale/lang/fr-FR.js +12 -3
- package/es/locale/lang/hu-HU.js +12 -3
- package/es/locale/lang/hy-AM.js +12 -3
- package/es/locale/lang/id-ID.js +12 -3
- package/es/locale/lang/it-IT.js +11 -2
- package/es/locale/lang/ja-JP.js +12 -3
- package/es/locale/lang/ko-KR.js +12 -3
- package/es/locale/lang/ms-MY.js +12 -3
- package/es/locale/lang/nb-NO.js +12 -3
- package/es/locale/lang/pt-BR.js +12 -3
- package/es/locale/lang/ru-RU.js +12 -3
- package/es/locale/lang/th-TH.js +12 -3
- package/es/locale/lang/ug-CN.js +12 -3
- package/es/locale/lang/uk-UA.js +12 -3
- package/es/locale/lang/uz-UZ.js +12 -3
- package/es/locale/lang/vi-VN.js +11 -2
- package/es/locale/lang/zh-CHT.js +14 -5
- package/es/locale/lang/zh-CN.js +14 -5
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +83 -12
- package/es/table/module/custom/panel.js +398 -257
- package/es/table/src/columnInfo.js +14 -8
- package/es/table/src/emits.js +3 -0
- package/es/table/src/table.js +76 -45
- package/es/table/src/util.js +32 -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.1782890314097.ttf → iconfont.1783046321610.ttf} +0 -0
- package/lib/iconfont.1783046321610.woff +0 -0
- package/lib/iconfont.1783046321610.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +518 -179
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +12 -3
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +12 -3
- package/lib/locale/lang/de-DE.js +12 -3
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +12 -3
- package/lib/locale/lang/en-US.js +16 -7
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +16 -7
- package/lib/locale/lang/es-ES.js +12 -3
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +12 -3
- package/lib/locale/lang/fr-FR.js +12 -3
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +12 -3
- package/lib/locale/lang/hu-HU.js +12 -3
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +12 -3
- package/lib/locale/lang/hy-AM.js +12 -3
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +12 -3
- package/lib/locale/lang/id-ID.js +12 -3
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +12 -3
- package/lib/locale/lang/it-IT.js +11 -2
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +11 -2
- package/lib/locale/lang/ja-JP.js +12 -3
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +12 -3
- package/lib/locale/lang/ko-KR.js +12 -3
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +12 -3
- package/lib/locale/lang/ms-MY.js +12 -3
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +12 -3
- package/lib/locale/lang/nb-NO.js +12 -3
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +12 -3
- package/lib/locale/lang/pt-BR.js +12 -3
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +12 -3
- package/lib/locale/lang/ru-RU.js +12 -3
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +12 -3
- package/lib/locale/lang/th-TH.js +12 -3
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +12 -3
- package/lib/locale/lang/ug-CN.js +12 -3
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +12 -3
- package/lib/locale/lang/uk-UA.js +12 -3
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +12 -3
- package/lib/locale/lang/uz-UZ.js +12 -3
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +12 -3
- package/lib/locale/lang/vi-VN.js +11 -2
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +11 -2
- package/lib/locale/lang/zh-CHT.js +14 -5
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +14 -5
- package/lib/locale/lang/zh-CN.js +14 -5
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +14 -5
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +90 -10
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +333 -141
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/columnInfo.js +17 -7
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/table.js +9 -9
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +38 -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 +12 -3
- package/packages/locale/lang/de-DE.ts +12 -3
- package/packages/locale/lang/en-US.ts +16 -7
- package/packages/locale/lang/es-ES.ts +12 -3
- package/packages/locale/lang/fr-FR.ts +12 -3
- package/packages/locale/lang/hu-HU.ts +12 -3
- package/packages/locale/lang/hy-AM.ts +12 -3
- package/packages/locale/lang/id-ID.ts +12 -3
- package/packages/locale/lang/it-IT.ts +11 -2
- package/packages/locale/lang/ja-JP.ts +12 -3
- package/packages/locale/lang/ko-KR.ts +12 -3
- package/packages/locale/lang/ms-MY.ts +12 -3
- package/packages/locale/lang/nb-NO.ts +12 -3
- package/packages/locale/lang/pt-BR.ts +12 -3
- package/packages/locale/lang/ru-RU.ts +12 -3
- package/packages/locale/lang/th-TH.ts +12 -3
- package/packages/locale/lang/ug-CN.ts +12 -3
- package/packages/locale/lang/uk-UA.ts +12 -3
- package/packages/locale/lang/uz-UZ.ts +12 -3
- package/packages/locale/lang/vi-VN.ts +11 -2
- package/packages/locale/lang/zh-CHT.ts +14 -5
- package/packages/locale/lang/zh-CN.ts +14 -5
- package/packages/table/module/custom/hook.ts +83 -12
- package/packages/table/module/custom/panel.ts +481 -286
- package/packages/table/src/columnInfo.ts +14 -8
- package/packages/table/src/emits.ts +3 -0
- package/packages/table/src/table.ts +87 -46
- package/packages/table/src/util.ts +35 -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 +11 -0
- package/es/iconfont.1782890314097.woff +0 -0
- package/es/iconfont.1782890314097.woff2 +0 -0
- package/lib/iconfont.1782890314097.woff +0 -0
- package/lib/iconfont.1782890314097.woff2 +0 -0
|
@@ -208,6 +208,20 @@ export default defineVxeComponent({
|
|
|
208
208
|
$xeTable.dispatchEvent('custom-fixed-change', { column, fixed: targetFixed }, evnt);
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
+
const changeAlignOption = (column, targetAlign, colProperty, renderProperty, eName, evnt) => {
|
|
212
|
+
const customOpts = computeCustomOpts.value;
|
|
213
|
+
if (customOpts.immediate) {
|
|
214
|
+
column[colProperty] = targetAlign;
|
|
215
|
+
column[renderProperty] = targetAlign;
|
|
216
|
+
tableReactData.isCustomStatus = true;
|
|
217
|
+
$xeTable.handleCustom();
|
|
218
|
+
$xeTable.saveCustomStore(`update:${colProperty}`);
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
column[renderProperty] = targetAlign;
|
|
222
|
+
}
|
|
223
|
+
$xeTable.dispatchEvent(eName, { column, [colProperty]: targetAlign }, evnt);
|
|
224
|
+
};
|
|
211
225
|
const allOptionEvent = (evnt) => {
|
|
212
226
|
const { customStore } = tableReactData;
|
|
213
227
|
const isAll = !customStore.isAll;
|
|
@@ -665,7 +679,7 @@ export default defineVxeComponent({
|
|
|
665
679
|
const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
|
|
666
680
|
const customOpts = computeCustomOpts.value;
|
|
667
681
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
668
|
-
const {
|
|
682
|
+
const { defPopupStyle } = customStore;
|
|
669
683
|
const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
|
|
670
684
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
671
685
|
const vSize = computeSize.value;
|
|
@@ -823,9 +837,9 @@ export default defineVxeComponent({
|
|
|
823
837
|
!parentItem && allowFixed
|
|
824
838
|
? h('div', {
|
|
825
839
|
class: 'vxe-table-custom--fixed-option'
|
|
826
|
-
},
|
|
827
|
-
|
|
828
|
-
|
|
840
|
+
}, VxeUIButtonComponent
|
|
841
|
+
? [
|
|
842
|
+
h(VxeUIButtonComponent, {
|
|
829
843
|
mode: 'text',
|
|
830
844
|
icon: column.renderFixed === 'left' ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
831
845
|
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
@@ -834,10 +848,8 @@ export default defineVxeComponent({
|
|
|
834
848
|
onClick: ({ $event }) => {
|
|
835
849
|
changeFixedOption(column, 'left', $event);
|
|
836
850
|
}
|
|
837
|
-
})
|
|
838
|
-
|
|
839
|
-
VxeUIButtonComponent
|
|
840
|
-
? h(VxeUIButtonComponent, {
|
|
851
|
+
}),
|
|
852
|
+
h(VxeUIButtonComponent, {
|
|
841
853
|
mode: 'text',
|
|
842
854
|
icon: column.renderFixed === 'right' ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
843
855
|
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
@@ -847,8 +859,8 @@ export default defineVxeComponent({
|
|
|
847
859
|
changeFixedOption(column, 'right', $event);
|
|
848
860
|
}
|
|
849
861
|
})
|
|
850
|
-
|
|
851
|
-
|
|
862
|
+
]
|
|
863
|
+
: [])
|
|
852
864
|
: renderEmptyElement($xeTable)
|
|
853
865
|
]));
|
|
854
866
|
}
|
|
@@ -860,7 +872,7 @@ export default defineVxeComponent({
|
|
|
860
872
|
[`size--${vSize}`]: vSize,
|
|
861
873
|
'is--active': customStore.visible
|
|
862
874
|
}],
|
|
863
|
-
style:
|
|
875
|
+
style: defPopupStyle
|
|
864
876
|
}, customStore.visible
|
|
865
877
|
? [
|
|
866
878
|
h('div', {
|
|
@@ -981,44 +993,18 @@ export default defineVxeComponent({
|
|
|
981
993
|
]
|
|
982
994
|
: []);
|
|
983
995
|
};
|
|
984
|
-
const
|
|
985
|
-
const
|
|
986
|
-
const
|
|
987
|
-
const { customStore } = props;
|
|
988
|
-
const { treeConfig, rowGroupConfig, aggregateConfig, resizable: allResizable } = tableProps;
|
|
989
|
-
const { isCustomStatus, customColumnList } = tableReactData;
|
|
996
|
+
const renderPopupBodys = () => {
|
|
997
|
+
const { resizable: allResizable } = tableProps;
|
|
998
|
+
const { customColumnList } = tableReactData;
|
|
990
999
|
const customOpts = computeCustomOpts.value;
|
|
991
1000
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
992
|
-
const
|
|
993
|
-
const { placement: aggPlacement } = aggregateOpts;
|
|
994
|
-
const { mode, immediate, showSortDragButton, showSortMoveButton, showSortPutButton, modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
|
|
1001
|
+
const { immediate, showSortDragButton, showSortMoveButton, showSortPutButton, allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
|
|
995
1002
|
const columnOpts = computeColumnOpts.value;
|
|
996
|
-
const { maxFixedSize } = columnOpts;
|
|
997
1003
|
const resizableOpts = computeResizableOpts.value;
|
|
998
1004
|
const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts;
|
|
999
|
-
const modalOpts = Object.assign({}, modalOptions);
|
|
1000
|
-
const drawerOpts = Object.assign({}, drawerOptions);
|
|
1001
1005
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
1002
1006
|
const { isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
1003
|
-
const slots = customOpts.slots || {};
|
|
1004
|
-
const headerSlot = slots.header;
|
|
1005
|
-
const topSlot = slots.top;
|
|
1006
|
-
const bottomSlot = slots.bottom;
|
|
1007
|
-
const defaultSlot = slots.default;
|
|
1008
|
-
const footerSlot = slots.footer;
|
|
1009
1007
|
const trVNs = [];
|
|
1010
|
-
const isAllChecked = customStore.isAll;
|
|
1011
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
1012
|
-
const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
|
|
1013
|
-
const params = {
|
|
1014
|
-
$table: $xeTable,
|
|
1015
|
-
$grid: $xeGrid,
|
|
1016
|
-
$gantt: $xeGantt,
|
|
1017
|
-
columns: customColumnList,
|
|
1018
|
-
isAllChecked,
|
|
1019
|
-
isAllIndeterminate,
|
|
1020
|
-
isCustomStatus
|
|
1021
|
-
};
|
|
1022
1008
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parentItem) => {
|
|
1023
1009
|
const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true;
|
|
1024
1010
|
if (isVisible) {
|
|
@@ -1050,6 +1036,243 @@ export default defineVxeComponent({
|
|
|
1050
1036
|
const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
|
|
1051
1037
|
const isHidden = !isChecked;
|
|
1052
1038
|
const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
|
|
1039
|
+
const alignList = [
|
|
1040
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_LEFT, value: 'left', title: getI18n('vxe.custom.setting.anLeftTitle'), disabled: isHidden },
|
|
1041
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_CENTER, value: 'center', title: getI18n('vxe.custom.setting.anCenterTitle'), disabled: isHidden },
|
|
1042
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_RIGHT, value: 'right', title: getI18n('vxe.custom.setting.anRightTitle'), disabled: isHidden }
|
|
1043
|
+
];
|
|
1044
|
+
const tdVNs = [];
|
|
1045
|
+
if (allowVisible) {
|
|
1046
|
+
tdVNs.push(h('td', {
|
|
1047
|
+
key: 'av',
|
|
1048
|
+
class: 'vxe-table-custom-popup--column-td col--visible'
|
|
1049
|
+
}, [
|
|
1050
|
+
h('div', {
|
|
1051
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
1052
|
+
'is--checked': isChecked,
|
|
1053
|
+
'is--indeterminate': isIndeterminate,
|
|
1054
|
+
'is--disabled': isDisabled
|
|
1055
|
+
}],
|
|
1056
|
+
title: getI18n('vxe.custom.setting.colVisible'),
|
|
1057
|
+
onClick: (evnt) => {
|
|
1058
|
+
if (!isDisabled) {
|
|
1059
|
+
changeCheckboxOption(column, evnt);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}, [
|
|
1063
|
+
h('span', {
|
|
1064
|
+
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
1065
|
+
})
|
|
1066
|
+
])
|
|
1067
|
+
]));
|
|
1068
|
+
}
|
|
1069
|
+
tdVNs.push(h('td', {
|
|
1070
|
+
key: 'at',
|
|
1071
|
+
class: 'vxe-table-custom-popup--column-td col--name'
|
|
1072
|
+
}, [
|
|
1073
|
+
h('div', {
|
|
1074
|
+
class: 'vxe-table-custom-popup--name'
|
|
1075
|
+
}, [
|
|
1076
|
+
(allowSort && showSortDragButton) || (allowGroup || allowValues)
|
|
1077
|
+
? (showSortBtn || ((allowGroup || allowValues) && !isColGroup)
|
|
1078
|
+
? h('div', Object.assign({ class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
1079
|
+
'is--disabled': isHidden
|
|
1080
|
+
}], title: getI18n('vxe.custom.setting.sortHelpTip') }, (isHidden
|
|
1081
|
+
? {}
|
|
1082
|
+
: {
|
|
1083
|
+
onMousedown: sortMousedownEvent,
|
|
1084
|
+
onMouseup: sortMouseupEvent
|
|
1085
|
+
})), [
|
|
1086
|
+
h('i', {
|
|
1087
|
+
class: getIcon().TABLE_CUSTOM_SORT
|
|
1088
|
+
})
|
|
1089
|
+
])
|
|
1090
|
+
: h('div', {
|
|
1091
|
+
class: 'vxe-table-custom-popup--column-sort-placeholder'
|
|
1092
|
+
}))
|
|
1093
|
+
: renderEmptyElement($xeTable),
|
|
1094
|
+
column.type === 'html'
|
|
1095
|
+
? h('div', {
|
|
1096
|
+
key: '1',
|
|
1097
|
+
class: 'vxe-table-custom-popup--title',
|
|
1098
|
+
innerHTML: colTitle
|
|
1099
|
+
})
|
|
1100
|
+
: h('div', {
|
|
1101
|
+
key: '0',
|
|
1102
|
+
class: 'vxe-table-custom-popup--title',
|
|
1103
|
+
title: colTitle
|
|
1104
|
+
}, colTitle),
|
|
1105
|
+
showSortBtn && (showSortMoveButton || showSortPutButton)
|
|
1106
|
+
? h('div', {
|
|
1107
|
+
class: 'vxe-table-custom-popup--move-btn'
|
|
1108
|
+
}, VxeUIButtonComponent
|
|
1109
|
+
? [
|
|
1110
|
+
showSortMoveButton
|
|
1111
|
+
? h(VxeUIButtonComponent, {
|
|
1112
|
+
mode: 'text',
|
|
1113
|
+
icon: 'vxe-icon-arrows-up',
|
|
1114
|
+
title: getI18n('vxe.custom.setting.moveUpTitle'),
|
|
1115
|
+
disabled: index <= 0,
|
|
1116
|
+
onClick(evntParame) {
|
|
1117
|
+
sortMoveUpEvent(evntParame, column);
|
|
1118
|
+
}
|
|
1119
|
+
})
|
|
1120
|
+
: renderEmptyElement($xeTable),
|
|
1121
|
+
showSortMoveButton
|
|
1122
|
+
? h(VxeUIButtonComponent, {
|
|
1123
|
+
mode: 'text',
|
|
1124
|
+
icon: 'vxe-icon-arrows-down',
|
|
1125
|
+
title: getI18n('vxe.custom.setting.moveDnTitle'),
|
|
1126
|
+
disabled: index >= items.length - 1,
|
|
1127
|
+
onClick(evntParame) {
|
|
1128
|
+
sortMoveDnEvent(evntParame, column);
|
|
1129
|
+
}
|
|
1130
|
+
})
|
|
1131
|
+
: renderEmptyElement($xeTable),
|
|
1132
|
+
showSortPutButton && !parentItem
|
|
1133
|
+
? h(VxeUIButtonComponent, {
|
|
1134
|
+
mode: 'text',
|
|
1135
|
+
icon: 'vxe-icon-top',
|
|
1136
|
+
title: getI18n('vxe.custom.setting.putTopTitle'),
|
|
1137
|
+
disabled: index <= 0,
|
|
1138
|
+
onClick(evntParame) {
|
|
1139
|
+
sortMoveTopEvent(evntParame, column);
|
|
1140
|
+
}
|
|
1141
|
+
})
|
|
1142
|
+
: renderEmptyElement($xeTable),
|
|
1143
|
+
showSortPutButton && !parentItem
|
|
1144
|
+
? h(VxeUIButtonComponent, {
|
|
1145
|
+
mode: 'text',
|
|
1146
|
+
icon: 'vxe-icon-bottom',
|
|
1147
|
+
title: getI18n('vxe.custom.setting.putBottomTitle'),
|
|
1148
|
+
disabled: index >= items.length - 1,
|
|
1149
|
+
onClick(evntParame) {
|
|
1150
|
+
sortMoveBottomEvent(evntParame, column);
|
|
1151
|
+
}
|
|
1152
|
+
})
|
|
1153
|
+
: renderEmptyElement($xeTable)
|
|
1154
|
+
]
|
|
1155
|
+
: [])
|
|
1156
|
+
: renderEmptyElement($xeTable)
|
|
1157
|
+
])
|
|
1158
|
+
]));
|
|
1159
|
+
if (allowResizable) {
|
|
1160
|
+
tdVNs.push(h('td', {
|
|
1161
|
+
key: 'aw',
|
|
1162
|
+
class: 'vxe-table-custom-popup--column-td col--resizable'
|
|
1163
|
+
}, [
|
|
1164
|
+
((column.children && column.children.length) ||
|
|
1165
|
+
!(XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable)))
|
|
1166
|
+
? h('span', '-')
|
|
1167
|
+
: (VxeUINumberInputComponent
|
|
1168
|
+
? h(VxeUINumberInputComponent, {
|
|
1169
|
+
type: 'integer',
|
|
1170
|
+
immediate: false,
|
|
1171
|
+
disabled: isHidden,
|
|
1172
|
+
modelValue: column.renderResizeWidth,
|
|
1173
|
+
min: customMinWidth || undefined,
|
|
1174
|
+
max: customMaxWidth || undefined,
|
|
1175
|
+
'onUpdate:modelValue'(value) {
|
|
1176
|
+
const width = Math.max(0, Number(value));
|
|
1177
|
+
column.renderResizeWidth = width;
|
|
1178
|
+
},
|
|
1179
|
+
onChange() {
|
|
1180
|
+
changeColumnWidth(column);
|
|
1181
|
+
}
|
|
1182
|
+
})
|
|
1183
|
+
: renderEmptyElement($xeTable))
|
|
1184
|
+
]));
|
|
1185
|
+
}
|
|
1186
|
+
if (allowFixed) {
|
|
1187
|
+
tdVNs.push(h('td', {
|
|
1188
|
+
key: 'af',
|
|
1189
|
+
class: 'vxe-table-custom-popup--column-td col--fixed'
|
|
1190
|
+
}, parentItem
|
|
1191
|
+
? [h('span', '-')]
|
|
1192
|
+
: (VxeUIRadioGroupComponent
|
|
1193
|
+
? [
|
|
1194
|
+
h(VxeUIButtonComponent, {
|
|
1195
|
+
icon: column.renderFixed === 'left' ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
1196
|
+
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
1197
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
1198
|
+
title: getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
|
|
1199
|
+
onClick: ({ $event }) => {
|
|
1200
|
+
changeFixedOption(column, 'left', $event);
|
|
1201
|
+
}
|
|
1202
|
+
}),
|
|
1203
|
+
h(VxeUIButtonComponent, {
|
|
1204
|
+
icon: column.renderFixed === 'right' ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
1205
|
+
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
1206
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
1207
|
+
title: getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
|
|
1208
|
+
onClick: ({ $event }) => {
|
|
1209
|
+
changeFixedOption(column, 'right', $event);
|
|
1210
|
+
}
|
|
1211
|
+
})
|
|
1212
|
+
]
|
|
1213
|
+
: [])));
|
|
1214
|
+
}
|
|
1215
|
+
if (allowAlign) {
|
|
1216
|
+
tdVNs.push(h('td', {
|
|
1217
|
+
key: 'aa',
|
|
1218
|
+
class: 'vxe-table-custom-popup--column-td col--align'
|
|
1219
|
+
}, VxeUIRadioGroupComponent
|
|
1220
|
+
? [
|
|
1221
|
+
h(VxeUIRadioGroupComponent, {
|
|
1222
|
+
modelValue: column.renderAlign || '',
|
|
1223
|
+
type: 'button',
|
|
1224
|
+
strict: false,
|
|
1225
|
+
disabled: isHidden,
|
|
1226
|
+
options: alignList,
|
|
1227
|
+
onChange({ value, $event }) {
|
|
1228
|
+
changeAlignOption(column, value, 'align', 'renderAlign', 'custom-align-change', $event);
|
|
1229
|
+
}
|
|
1230
|
+
})
|
|
1231
|
+
]
|
|
1232
|
+
: []));
|
|
1233
|
+
}
|
|
1234
|
+
if (allowHeaderAlign) {
|
|
1235
|
+
tdVNs.push(h('td', {
|
|
1236
|
+
key: 'aha',
|
|
1237
|
+
class: 'vxe-table-custom-popup--column-td col--header-align'
|
|
1238
|
+
}, isColGroup
|
|
1239
|
+
? [h('span', '-')]
|
|
1240
|
+
: (VxeUIRadioGroupComponent
|
|
1241
|
+
? [
|
|
1242
|
+
h(VxeUIRadioGroupComponent, {
|
|
1243
|
+
modelValue: column.renderHeaderAlign || '',
|
|
1244
|
+
type: 'button',
|
|
1245
|
+
strict: false,
|
|
1246
|
+
disabled: isHidden,
|
|
1247
|
+
options: alignList,
|
|
1248
|
+
onChange({ value, $event }) {
|
|
1249
|
+
changeAlignOption(column, value, 'headerAlign', 'renderHeaderAlign', 'custom-header-align-change', $event);
|
|
1250
|
+
}
|
|
1251
|
+
})
|
|
1252
|
+
]
|
|
1253
|
+
: [])));
|
|
1254
|
+
}
|
|
1255
|
+
if (allowFooterAlign) {
|
|
1256
|
+
tdVNs.push(h('td', {
|
|
1257
|
+
key: 'afa',
|
|
1258
|
+
class: 'vxe-table-custom-popup--column-td col--footer-align'
|
|
1259
|
+
}, isColGroup
|
|
1260
|
+
? [h('span', '-')]
|
|
1261
|
+
: (VxeUIRadioGroupComponent
|
|
1262
|
+
? [
|
|
1263
|
+
h(VxeUIRadioGroupComponent, {
|
|
1264
|
+
modelValue: column.renderFooterAlign || '',
|
|
1265
|
+
type: 'button',
|
|
1266
|
+
strict: false,
|
|
1267
|
+
disabled: isHidden,
|
|
1268
|
+
options: alignList,
|
|
1269
|
+
onChange({ value, $event }) {
|
|
1270
|
+
changeAlignOption(column, value, 'footerAlign', 'renderFooterAlign', 'custom-footer-align-change', $event);
|
|
1271
|
+
}
|
|
1272
|
+
})
|
|
1273
|
+
]
|
|
1274
|
+
: [])));
|
|
1275
|
+
}
|
|
1053
1276
|
trVNs.push(h('tr', {
|
|
1054
1277
|
key: column.id,
|
|
1055
1278
|
colid: column.id,
|
|
@@ -1059,177 +1282,139 @@ export default defineVxeComponent({
|
|
|
1059
1282
|
onDragstart: sortDragstartEvent,
|
|
1060
1283
|
onDragend: sortDragendEvent,
|
|
1061
1284
|
onDragover: sortDragoverEvent
|
|
1062
|
-
},
|
|
1063
|
-
allowVisible
|
|
1064
|
-
? h('td', {
|
|
1065
|
-
class: 'vxe-table-custom-popup--column-item col--visible'
|
|
1066
|
-
}, [
|
|
1067
|
-
h('div', {
|
|
1068
|
-
class: ['vxe-table-custom--checkbox-option', {
|
|
1069
|
-
'is--checked': isChecked,
|
|
1070
|
-
'is--indeterminate': isIndeterminate,
|
|
1071
|
-
'is--disabled': isDisabled
|
|
1072
|
-
}],
|
|
1073
|
-
title: getI18n('vxe.custom.setting.colVisible'),
|
|
1074
|
-
onClick: (evnt) => {
|
|
1075
|
-
if (!isDisabled) {
|
|
1076
|
-
changeCheckboxOption(column, evnt);
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
}, [
|
|
1080
|
-
h('span', {
|
|
1081
|
-
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
1082
|
-
})
|
|
1083
|
-
])
|
|
1084
|
-
])
|
|
1085
|
-
: renderEmptyElement($xeTable),
|
|
1086
|
-
h('td', {
|
|
1087
|
-
class: 'vxe-table-custom-popup--column-item col--name'
|
|
1088
|
-
}, [
|
|
1089
|
-
h('div', {
|
|
1090
|
-
class: 'vxe-table-custom-popup--name'
|
|
1091
|
-
}, [
|
|
1092
|
-
(allowSort && showSortDragButton) || (allowGroup || allowValues)
|
|
1093
|
-
? (showSortBtn || ((allowGroup || allowValues) && !isColGroup)
|
|
1094
|
-
? h('div', Object.assign({ class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
1095
|
-
'is--disabled': isHidden
|
|
1096
|
-
}], title: getI18n('vxe.custom.setting.sortHelpTip') }, (isHidden
|
|
1097
|
-
? {}
|
|
1098
|
-
: {
|
|
1099
|
-
onMousedown: sortMousedownEvent,
|
|
1100
|
-
onMouseup: sortMouseupEvent
|
|
1101
|
-
})), [
|
|
1102
|
-
h('i', {
|
|
1103
|
-
class: getIcon().TABLE_CUSTOM_SORT
|
|
1104
|
-
})
|
|
1105
|
-
])
|
|
1106
|
-
: h('div', {
|
|
1107
|
-
class: 'vxe-table-custom-popup--column-sort-placeholder'
|
|
1108
|
-
}))
|
|
1109
|
-
: renderEmptyElement($xeTable),
|
|
1110
|
-
column.type === 'html'
|
|
1111
|
-
? h('div', {
|
|
1112
|
-
key: '1',
|
|
1113
|
-
class: 'vxe-table-custom-popup--title',
|
|
1114
|
-
innerHTML: colTitle
|
|
1115
|
-
})
|
|
1116
|
-
: h('div', {
|
|
1117
|
-
key: '0',
|
|
1118
|
-
class: 'vxe-table-custom-popup--title',
|
|
1119
|
-
title: colTitle
|
|
1120
|
-
}, colTitle),
|
|
1121
|
-
showSortBtn && (showSortMoveButton || showSortPutButton)
|
|
1122
|
-
? h('div', {
|
|
1123
|
-
class: 'vxe-table-custom-popup--move-btn'
|
|
1124
|
-
}, VxeUIButtonComponent
|
|
1125
|
-
? [
|
|
1126
|
-
showSortMoveButton
|
|
1127
|
-
? h(VxeUIButtonComponent, {
|
|
1128
|
-
mode: 'text',
|
|
1129
|
-
content: getI18n('vxe.custom.setting.moveUp'),
|
|
1130
|
-
title: getI18n('vxe.custom.setting.moveUpTitle'),
|
|
1131
|
-
disabled: index <= 0,
|
|
1132
|
-
onClick(evntParame) {
|
|
1133
|
-
sortMoveUpEvent(evntParame, column);
|
|
1134
|
-
}
|
|
1135
|
-
})
|
|
1136
|
-
: renderEmptyElement($xeTable),
|
|
1137
|
-
showSortMoveButton
|
|
1138
|
-
? h(VxeUIButtonComponent, {
|
|
1139
|
-
mode: 'text',
|
|
1140
|
-
content: getI18n('vxe.custom.setting.moveDn'),
|
|
1141
|
-
title: getI18n('vxe.custom.setting.moveDnTitle'),
|
|
1142
|
-
disabled: index >= items.length - 1,
|
|
1143
|
-
onClick(evntParame) {
|
|
1144
|
-
sortMoveDnEvent(evntParame, column);
|
|
1145
|
-
}
|
|
1146
|
-
})
|
|
1147
|
-
: renderEmptyElement($xeTable),
|
|
1148
|
-
showSortPutButton && !parentItem
|
|
1149
|
-
? h(VxeUIButtonComponent, {
|
|
1150
|
-
mode: 'text',
|
|
1151
|
-
content: getI18n('vxe.custom.setting.putTop'),
|
|
1152
|
-
title: getI18n('vxe.custom.setting.putTopTitle'),
|
|
1153
|
-
disabled: index <= 0,
|
|
1154
|
-
onClick(evntParame) {
|
|
1155
|
-
sortMoveTopEvent(evntParame, column);
|
|
1156
|
-
}
|
|
1157
|
-
})
|
|
1158
|
-
: renderEmptyElement($xeTable),
|
|
1159
|
-
showSortPutButton && !parentItem
|
|
1160
|
-
? h(VxeUIButtonComponent, {
|
|
1161
|
-
mode: 'text',
|
|
1162
|
-
content: getI18n('vxe.custom.setting.putBottom'),
|
|
1163
|
-
title: getI18n('vxe.custom.setting.putBottomTitle'),
|
|
1164
|
-
disabled: index >= items.length - 1,
|
|
1165
|
-
onClick(evntParame) {
|
|
1166
|
-
sortMoveBottomEvent(evntParame, column);
|
|
1167
|
-
}
|
|
1168
|
-
})
|
|
1169
|
-
: renderEmptyElement($xeTable)
|
|
1170
|
-
]
|
|
1171
|
-
: [])
|
|
1172
|
-
: renderEmptyElement($xeTable)
|
|
1173
|
-
])
|
|
1174
|
-
]),
|
|
1175
|
-
allowResizable
|
|
1176
|
-
? h('td', {
|
|
1177
|
-
class: 'vxe-table-custom-popup--column-item col--resizable'
|
|
1178
|
-
}, [
|
|
1179
|
-
((column.children && column.children.length) ||
|
|
1180
|
-
!(XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable)))
|
|
1181
|
-
? h('span', '-')
|
|
1182
|
-
: (VxeUINumberInputComponent
|
|
1183
|
-
? h(VxeUINumberInputComponent, {
|
|
1184
|
-
type: 'integer',
|
|
1185
|
-
immediate: false,
|
|
1186
|
-
disabled: isHidden,
|
|
1187
|
-
modelValue: column.renderResizeWidth,
|
|
1188
|
-
min: customMinWidth || undefined,
|
|
1189
|
-
max: customMaxWidth || undefined,
|
|
1190
|
-
'onUpdate:modelValue'(value) {
|
|
1191
|
-
const width = Math.max(0, Number(value));
|
|
1192
|
-
column.renderResizeWidth = width;
|
|
1193
|
-
},
|
|
1194
|
-
onChange() {
|
|
1195
|
-
changeColumnWidth(column);
|
|
1196
|
-
}
|
|
1197
|
-
})
|
|
1198
|
-
: renderEmptyElement($xeTable))
|
|
1199
|
-
])
|
|
1200
|
-
: renderEmptyElement($xeTable),
|
|
1201
|
-
allowFixed
|
|
1202
|
-
? h('td', {
|
|
1203
|
-
class: 'vxe-table-custom-popup--column-item col--fixed'
|
|
1204
|
-
}, [
|
|
1205
|
-
parentItem
|
|
1206
|
-
? h('span', '-')
|
|
1207
|
-
: (VxeUIRadioGroupComponent
|
|
1208
|
-
? h(VxeUIRadioGroupComponent, {
|
|
1209
|
-
modelValue: column.renderFixed || '',
|
|
1210
|
-
type: 'button',
|
|
1211
|
-
size: 'mini',
|
|
1212
|
-
disabled: isHidden,
|
|
1213
|
-
options: [
|
|
1214
|
-
{ label: getI18n('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isHidden || isMaxFixedColumn },
|
|
1215
|
-
{ label: getI18n('vxe.custom.setting.fixedUnset'), value: '', disabled: isHidden },
|
|
1216
|
-
{ label: getI18n('vxe.custom.setting.fixedRight'), value: 'right', disabled: isHidden || isMaxFixedColumn }
|
|
1217
|
-
],
|
|
1218
|
-
onChange({ label, $event }) {
|
|
1219
|
-
changeFixedOption(column, label, $event);
|
|
1220
|
-
}
|
|
1221
|
-
})
|
|
1222
|
-
: renderEmptyElement($xeTable))
|
|
1223
|
-
])
|
|
1224
|
-
: renderEmptyElement($xeTable)
|
|
1225
|
-
]));
|
|
1285
|
+
}, tdVNs));
|
|
1226
1286
|
}
|
|
1227
1287
|
});
|
|
1288
|
+
return trVNs;
|
|
1289
|
+
};
|
|
1290
|
+
const renderPopupPanel = () => {
|
|
1291
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
1292
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
1293
|
+
const { customStore } = props;
|
|
1294
|
+
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
|
|
1295
|
+
const { isCustomStatus, customColumnList } = tableReactData;
|
|
1296
|
+
const vSize = computeSize.value;
|
|
1297
|
+
const customOpts = computeCustomOpts.value;
|
|
1298
|
+
const aggregateOpts = computeAggregateOpts.value;
|
|
1299
|
+
const { panePopupStyle } = customStore;
|
|
1300
|
+
const { placement: aggPlacement } = aggregateOpts;
|
|
1301
|
+
const { mode, immediate, modalOptions, drawerOptions, allowVisible, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable } = customOpts;
|
|
1302
|
+
const columnOpts = computeColumnOpts.value;
|
|
1303
|
+
const { maxFixedSize } = columnOpts;
|
|
1304
|
+
const modalOpts = Object.assign({}, modalOptions);
|
|
1305
|
+
const drawerOpts = Object.assign({}, drawerOptions);
|
|
1306
|
+
const slots = customOpts.slots || {};
|
|
1307
|
+
const headerSlot = slots.header;
|
|
1308
|
+
const topSlot = slots.top;
|
|
1309
|
+
const bottomSlot = slots.bottom;
|
|
1310
|
+
const defaultSlot = slots.default;
|
|
1311
|
+
const footerSlot = slots.footer;
|
|
1312
|
+
const isAllChecked = customStore.isAll;
|
|
1313
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
1314
|
+
const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
|
|
1315
|
+
const params = {
|
|
1316
|
+
$table: $xeTable,
|
|
1317
|
+
$grid: $xeGrid,
|
|
1318
|
+
$gantt: $xeGantt,
|
|
1319
|
+
columns: customColumnList,
|
|
1320
|
+
isAllChecked,
|
|
1321
|
+
isAllIndeterminate,
|
|
1322
|
+
isCustomStatus
|
|
1323
|
+
};
|
|
1324
|
+
const colVNs = [];
|
|
1325
|
+
const headVNs = [];
|
|
1326
|
+
if (allowVisible) {
|
|
1327
|
+
colVNs.push(h('col', {
|
|
1328
|
+
key: 'av',
|
|
1329
|
+
class: 'vxe-table-custom-popup--column-col col--checkbox'
|
|
1330
|
+
}));
|
|
1331
|
+
headVNs.push(h('th', {
|
|
1332
|
+
key: 'av',
|
|
1333
|
+
class: 'vxe-table-custom-popup--column-th col--checkbox'
|
|
1334
|
+
}, [
|
|
1335
|
+
h('div', {
|
|
1336
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
1337
|
+
'is--checked': isAllChecked,
|
|
1338
|
+
'is--indeterminate': isAllIndeterminate
|
|
1339
|
+
}],
|
|
1340
|
+
title: getI18n('vxe.table.allTitle'),
|
|
1341
|
+
onClick: allOptionEvent
|
|
1342
|
+
}, [
|
|
1343
|
+
h('span', {
|
|
1344
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
1345
|
+
})
|
|
1346
|
+
// h('span', {
|
|
1347
|
+
// class: 'vxe-checkbox--label'
|
|
1348
|
+
// }, getI18n('vxe.toolbar.customAll'))
|
|
1349
|
+
])
|
|
1350
|
+
]));
|
|
1351
|
+
}
|
|
1352
|
+
colVNs.push(h('col', {
|
|
1353
|
+
key: 'at',
|
|
1354
|
+
class: 'vxe-table-custom-popup--column-col col--title'
|
|
1355
|
+
}));
|
|
1356
|
+
headVNs.push(h('th', {
|
|
1357
|
+
key: 'at',
|
|
1358
|
+
class: 'vxe-table-custom-popup--column-th col--title'
|
|
1359
|
+
}, getI18n('vxe.custom.setting.colTitle')));
|
|
1360
|
+
if (allowResizable) {
|
|
1361
|
+
colVNs.push(h('col', {
|
|
1362
|
+
key: 'aw',
|
|
1363
|
+
class: 'vxe-table-custom-popup--column-col col--width'
|
|
1364
|
+
}));
|
|
1365
|
+
headVNs.push(h('th', {
|
|
1366
|
+
key: 'aw',
|
|
1367
|
+
class: 'vxe-table-custom-popup--column-th col--width'
|
|
1368
|
+
}, getI18n('vxe.custom.setting.colResizable')));
|
|
1369
|
+
}
|
|
1370
|
+
if (allowFixed) {
|
|
1371
|
+
colVNs.push(h('col', {
|
|
1372
|
+
key: 'af',
|
|
1373
|
+
class: 'vxe-table-custom-popup--column-col col--fixed'
|
|
1374
|
+
}));
|
|
1375
|
+
headVNs.push(h('th', {
|
|
1376
|
+
key: 'af',
|
|
1377
|
+
class: 'vxe-table-custom-popup--column-th col--fixed'
|
|
1378
|
+
}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])));
|
|
1379
|
+
}
|
|
1380
|
+
if (allowAlign) {
|
|
1381
|
+
colVNs.push(h('col', {
|
|
1382
|
+
key: 'aa',
|
|
1383
|
+
class: 'vxe-table-custom-popup--column-col col--align'
|
|
1384
|
+
}));
|
|
1385
|
+
headVNs.push(h('th', {
|
|
1386
|
+
key: 'aa',
|
|
1387
|
+
class: 'vxe-table-custom-popup--column-th col--align'
|
|
1388
|
+
}, getI18n('vxe.custom.setting.colAlign')));
|
|
1389
|
+
}
|
|
1390
|
+
if (allowHeaderAlign) {
|
|
1391
|
+
colVNs.push(h('col', {
|
|
1392
|
+
key: 'aha',
|
|
1393
|
+
class: 'vxe-table-custom-popup--column-col col--header-align'
|
|
1394
|
+
}));
|
|
1395
|
+
headVNs.push(h('th', {
|
|
1396
|
+
key: 'aha',
|
|
1397
|
+
class: 'vxe-table-custom-popup--column-th col--header-align'
|
|
1398
|
+
}, getI18n('vxe.custom.setting.colHeadAlign')));
|
|
1399
|
+
}
|
|
1400
|
+
if (allowFooterAlign) {
|
|
1401
|
+
colVNs.push(h('col', {
|
|
1402
|
+
key: 'afa',
|
|
1403
|
+
class: 'vxe-table-custom-popup--column-col col--footer-align'
|
|
1404
|
+
}));
|
|
1405
|
+
headVNs.push(h('th', {
|
|
1406
|
+
key: 'afa',
|
|
1407
|
+
class: 'vxe-table-custom-popup--column-th col--footer-align'
|
|
1408
|
+
}, getI18n('vxe.custom.setting.colFootAlign')));
|
|
1409
|
+
}
|
|
1228
1410
|
const scopedSlots = {
|
|
1229
1411
|
default: () => {
|
|
1230
1412
|
return h('div', {
|
|
1231
1413
|
ref: refBodyWrapperElem,
|
|
1232
|
-
class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}
|
|
1414
|
+
class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`, {
|
|
1415
|
+
[`size--${vSize}`]: vSize
|
|
1416
|
+
}],
|
|
1417
|
+
style: panePopupStyle
|
|
1233
1418
|
}, defaultSlot
|
|
1234
1419
|
? $xeTable.callSlot(defaultSlot, params)
|
|
1235
1420
|
: [
|
|
@@ -1251,62 +1436,16 @@ export default defineVxeComponent({
|
|
|
1251
1436
|
class: 'vxe-table-custom-popup--table-wrapper'
|
|
1252
1437
|
}, [
|
|
1253
1438
|
h('table', {}, [
|
|
1254
|
-
h('colgroup', {},
|
|
1255
|
-
allowVisible
|
|
1256
|
-
? h('col', {
|
|
1257
|
-
class: 'vxe-table-custom-popup--table-col-seq'
|
|
1258
|
-
})
|
|
1259
|
-
: renderEmptyElement($xeTable),
|
|
1260
|
-
h('col', {
|
|
1261
|
-
class: 'vxe-table-custom-popup--table-col-title'
|
|
1262
|
-
}),
|
|
1263
|
-
allowResizable
|
|
1264
|
-
? h('col', {
|
|
1265
|
-
class: 'vxe-table-custom-popup--table-col-width'
|
|
1266
|
-
})
|
|
1267
|
-
: renderEmptyElement($xeTable),
|
|
1268
|
-
allowFixed
|
|
1269
|
-
? h('col', {
|
|
1270
|
-
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
1271
|
-
})
|
|
1272
|
-
: renderEmptyElement($xeTable)
|
|
1273
|
-
]),
|
|
1439
|
+
h('colgroup', {}, colVNs),
|
|
1274
1440
|
h('thead', {}, [
|
|
1275
|
-
h('tr', {},
|
|
1276
|
-
allowVisible
|
|
1277
|
-
? h('th', {}, [
|
|
1278
|
-
h('div', {
|
|
1279
|
-
class: ['vxe-table-custom--checkbox-option', {
|
|
1280
|
-
'is--checked': isAllChecked,
|
|
1281
|
-
'is--indeterminate': isAllIndeterminate
|
|
1282
|
-
}],
|
|
1283
|
-
title: getI18n('vxe.table.allTitle'),
|
|
1284
|
-
onClick: allOptionEvent
|
|
1285
|
-
}, [
|
|
1286
|
-
h('span', {
|
|
1287
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
1288
|
-
}),
|
|
1289
|
-
h('span', {
|
|
1290
|
-
class: 'vxe-checkbox--label'
|
|
1291
|
-
}, getI18n('vxe.toolbar.customAll'))
|
|
1292
|
-
])
|
|
1293
|
-
])
|
|
1294
|
-
: renderEmptyElement($xeTable),
|
|
1295
|
-
h('th', {}, getI18n('vxe.custom.setting.colTitle')),
|
|
1296
|
-
allowResizable
|
|
1297
|
-
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
|
1298
|
-
: renderEmptyElement($xeTable),
|
|
1299
|
-
allowFixed
|
|
1300
|
-
? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
|
1301
|
-
: renderEmptyElement($xeTable)
|
|
1302
|
-
])
|
|
1441
|
+
h('tr', {}, headVNs)
|
|
1303
1442
|
]),
|
|
1304
1443
|
h(TransitionGroup, {
|
|
1305
1444
|
class: 'vxe-table-custom--panel-list',
|
|
1306
1445
|
tag: 'tbody',
|
|
1307
1446
|
name: 'vxe-table-custom--list'
|
|
1308
1447
|
}, {
|
|
1309
|
-
default: () =>
|
|
1448
|
+
default: () => renderPopupBodys()
|
|
1310
1449
|
})
|
|
1311
1450
|
])
|
|
1312
1451
|
]),
|
|
@@ -1341,6 +1480,7 @@ export default defineVxeComponent({
|
|
|
1341
1480
|
immediate
|
|
1342
1481
|
? (VxeUIButtonComponent
|
|
1343
1482
|
? h(VxeUIButtonComponent, {
|
|
1483
|
+
status: 'primary',
|
|
1344
1484
|
content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
|
|
1345
1485
|
onClick: cancelCloseEvent
|
|
1346
1486
|
})
|
|
@@ -1392,8 +1532,8 @@ export default defineVxeComponent({
|
|
|
1392
1532
|
className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
1393
1533
|
modelValue: customStore.visible,
|
|
1394
1534
|
title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
1395
|
-
width: modalOpts.width || Math.min(
|
|
1396
|
-
minWidth: modalOpts.minWidth ||
|
|
1535
|
+
width: modalOpts.width || Math.min(1000, document.documentElement.clientWidth),
|
|
1536
|
+
minWidth: modalOpts.minWidth || 800,
|
|
1397
1537
|
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
1398
1538
|
minHeight: modalOpts.minHeight || 400,
|
|
1399
1539
|
showZoom: modalOpts.showZoom,
|
|
@@ -1402,6 +1542,7 @@ export default defineVxeComponent({
|
|
|
1402
1542
|
mask: modalOpts.mask,
|
|
1403
1543
|
lockView: modalOpts.lockView,
|
|
1404
1544
|
resize: modalOpts.resize,
|
|
1545
|
+
transfer: modalOpts.transfer,
|
|
1405
1546
|
escClosable: !!modalOpts.escClosable,
|
|
1406
1547
|
maskClosable: !!modalOpts.maskClosable,
|
|
1407
1548
|
destroyOnClose: true,
|