vxe-table 4.6.5 → 4.6.6
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/button/style.css +6 -6
- package/es/checkbox/src/group.js +7 -1
- package/es/custom/src/hook.js +1 -0
- package/es/custom/src/panel.js +207 -45
- package/es/custom/style.css +326 -80
- package/es/export/src/export-panel.js +1 -1
- package/es/export/src/import-panel.js +1 -1
- package/es/icon/style.css +1 -1
- package/es/input/style.css +0 -1
- package/es/loading/src/loading.js +1 -1
- package/es/loading/style.css +1 -1
- package/es/locale/lang/en-US.js +18 -7
- package/es/locale/lang/es-ES.js +18 -7
- package/es/locale/lang/ja-JP.js +18 -6
- package/es/locale/lang/pt-BR.js +18 -7
- package/es/locale/lang/zh-CN.js +18 -7
- package/es/locale/lang/zh-TC.js +18 -7
- package/es/modal/src/modal.js +1 -1
- package/es/radio/src/group.js +7 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/columnInfo.js +3 -3
- package/es/table/src/table.js +60 -36
- package/es/table/style.css +4 -4
- package/es/tools/log.js +1 -1
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/style.css +1 -1
- package/es/vxe-button/style.css +6 -6
- package/es/vxe-input/style.css +0 -1
- package/es/vxe-loading/style.css +1 -1
- package/es/vxe-table/style.css +4 -4
- package/es/vxe-table-custom-module/style.css +326 -80
- package/lib/button/style/style.css +6 -6
- package/lib/button/style/style.min.css +1 -1
- package/lib/checkbox/src/group.js +7 -1
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/custom/src/hook.js +1 -0
- package/lib/custom/src/hook.min.js +1 -1
- package/lib/custom/src/panel.js +185 -30
- package/lib/custom/src/panel.min.js +1 -1
- package/lib/custom/style/style.css +326 -80
- package/lib/custom/style/style.min.css +1 -1
- package/lib/export/src/export-panel.js +1 -1
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/src/import-panel.js +1 -1
- package/lib/export/src/import-panel.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +288 -84
- package/lib/index.umd.min.js +1 -1
- package/lib/input/style/style.css +0 -1
- package/lib/input/style/style.min.css +1 -1
- package/lib/loading/src/loading.js +1 -1
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/loading/style/style.css +1 -1
- package/lib/loading/style/style.min.css +1 -1
- package/lib/locale/lang/en-US.js +18 -7
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +18 -7
- package/lib/locale/lang/es-ES.js +18 -7
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +18 -7
- package/lib/locale/lang/ja-JP.js +18 -6
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +18 -6
- package/lib/locale/lang/pt-BR.js +18 -7
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +18 -7
- package/lib/locale/lang/zh-CN.js +18 -7
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +18 -7
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +18 -7
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +18 -7
- package/lib/locale/lang/zh-TC.js +18 -7
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +18 -7
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +18 -7
- package/lib/modal/src/modal.js +1 -1
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/radio/src/group.js +7 -1
- package/lib/radio/src/group.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/columnInfo.js +3 -3
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +61 -36
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +4 -4
- package/lib/table/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +1 -1
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/lib/vxe-button/style/style.css +6 -6
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-input/style/style.css +0 -1
- package/lib/vxe-input/style/style.min.css +1 -1
- package/lib/vxe-loading/style/style.css +1 -1
- package/lib/vxe-loading/style/style.min.css +1 -1
- package/lib/vxe-table/style/style.css +4 -4
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-table-custom-module/style/style.css +326 -80
- package/lib/vxe-table-custom-module/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/checkbox/src/group.ts +8 -1
- package/packages/custom/src/hook.ts +1 -0
- package/packages/custom/src/panel.ts +213 -45
- package/packages/export/src/export-panel.ts +1 -1
- package/packages/export/src/import-panel.ts +1 -1
- package/packages/loading/src/loading.ts +1 -1
- package/packages/locale/lang/en-US.ts +18 -7
- package/packages/locale/lang/es-ES.ts +18 -7
- package/packages/locale/lang/ja-JP.ts +18 -6
- package/packages/locale/lang/pt-BR.ts +18 -7
- package/packages/locale/lang/zh-CN.ts +18 -7
- package/packages/locale/lang/zh-TC.ts +18 -7
- package/packages/modal/src/modal.ts +1 -1
- package/packages/radio/src/group.ts +8 -1
- package/packages/table/src/columnInfo.ts +9 -6
- package/packages/table/src/table.ts +62 -39
- package/packages/table/src/util.ts +1 -1
- package/styles/base/common.scss +4 -4
- package/styles/button.scss +5 -5
- package/styles/custom.scss +192 -86
- package/styles/helpers/mixin.scss +1 -1
- package/styles/input.scss +1 -2
- package/styles/loading.scss +1 -1
- package/styles/modal.scss +2 -2
- package/styles/select.scss +1 -1
- package/styles/table.scss +2 -2
- package/types/table.d.ts +32 -22
- package/types/v-x-e-table/renderer.d.ts +1 -0
- /package/es/icon/style/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
- /package/es/icon/style/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
- /package/es/icon/style/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
- /package/es/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
- /package/es/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
- /package/es/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
- /package/lib/icon/style/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
- /package/lib/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
- /package/lib/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
- /package/lib/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
package/es/button/style.css
CHANGED
|
@@ -381,13 +381,13 @@
|
|
|
381
381
|
min-width: var(--vxe-font-size-mini);
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
-
.vxe-input + .vxe-button-
|
|
385
|
-
.vxe-button + .vxe-button-
|
|
384
|
+
.vxe-input + .vxe-button-wrapper, .vxe-input + .vxe-button.type--button, .vxe-input + .vxe-button--dropdown,
|
|
385
|
+
.vxe-button + .vxe-button-wrapper,
|
|
386
386
|
.vxe-button + .vxe-button.type--button,
|
|
387
387
|
.vxe-button + .vxe-button--dropdown,
|
|
388
|
-
.vxe-button-
|
|
389
|
-
.vxe-button-
|
|
390
|
-
.vxe-button-
|
|
388
|
+
.vxe-button-wrapper + .vxe-button-wrapper,
|
|
389
|
+
.vxe-button-wrapper + .vxe-button.type--button,
|
|
390
|
+
.vxe-button-wrapper + .vxe-button--dropdown {
|
|
391
391
|
margin-left: 12px;
|
|
392
392
|
}
|
|
393
393
|
|
|
@@ -408,7 +408,7 @@
|
|
|
408
408
|
.vxe-button--dropdown {
|
|
409
409
|
position: relative;
|
|
410
410
|
}
|
|
411
|
-
.vxe-button--dropdown + .vxe-button-
|
|
411
|
+
.vxe-button--dropdown + .vxe-button-wrapper, .vxe-button--dropdown + .vxe-button.type--button, .vxe-button--dropdown + .vxe-button--dropdown {
|
|
412
412
|
margin-left: 12px;
|
|
413
413
|
}
|
|
414
414
|
.vxe-button--dropdown > .vxe-button.type--button.theme--primary {
|
package/es/checkbox/src/group.js
CHANGED
|
@@ -40,6 +40,10 @@ export default defineComponent({
|
|
|
40
40
|
const propsOpts = computePropsOpts.value;
|
|
41
41
|
return propsOpts.value || 'value';
|
|
42
42
|
});
|
|
43
|
+
const computeDisabledField = computed(() => {
|
|
44
|
+
const propsOpts = computePropsOpts.value;
|
|
45
|
+
return propsOpts.disabled || 'disabled';
|
|
46
|
+
});
|
|
43
47
|
const computeMaps = {
|
|
44
48
|
computeIsMaximize
|
|
45
49
|
};
|
|
@@ -82,12 +86,14 @@ export default defineComponent({
|
|
|
82
86
|
const defaultSlot = slots.default;
|
|
83
87
|
const valueField = computeValueField.value;
|
|
84
88
|
const labelField = computeLabelField.value;
|
|
89
|
+
const disabledField = computeDisabledField.value;
|
|
85
90
|
return h('div', {
|
|
86
91
|
class: 'vxe-checkbox-group'
|
|
87
92
|
}, defaultSlot ? defaultSlot({}) : (options ? options.map(item => {
|
|
88
93
|
return h(VxeCheckboxComponent, {
|
|
89
94
|
label: item[valueField],
|
|
90
|
-
content: item[labelField]
|
|
95
|
+
content: item[labelField],
|
|
96
|
+
disabled: item[disabledField]
|
|
91
97
|
});
|
|
92
98
|
}) : []));
|
|
93
99
|
};
|
package/es/custom/src/hook.js
CHANGED
|
@@ -28,6 +28,7 @@ const customHook = {
|
|
|
28
28
|
const { initStore, customStore } = reactData;
|
|
29
29
|
customStore.visible = true;
|
|
30
30
|
initStore.custom = true;
|
|
31
|
+
reactData.customColumnList = internalData.collectColumn.slice(0);
|
|
31
32
|
checkCustomStatus();
|
|
32
33
|
calcMaxHeight();
|
|
33
34
|
return nextTick().then(() => calcMaxHeight());
|
package/es/custom/src/panel.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { defineComponent, h, inject, ref } from 'vue';
|
|
1
|
+
import { defineComponent, h, inject, ref, TransitionGroup } from 'vue';
|
|
2
|
+
import { VXETable } from '../../v-x-e-table';
|
|
2
3
|
import { formatText } from '../../tools/utils';
|
|
4
|
+
import { addClass, removeClass } from '../../tools/dom';
|
|
3
5
|
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
4
6
|
import VxeModalComponent from '../../modal/src/modal';
|
|
5
7
|
import VxeButtonComponent from '../../button/src/button';
|
|
@@ -15,9 +17,13 @@ export default defineComponent({
|
|
|
15
17
|
},
|
|
16
18
|
setup(props) {
|
|
17
19
|
const $xetable = inject('$xetable', {});
|
|
18
|
-
const {
|
|
20
|
+
const { reactData } = $xetable;
|
|
19
21
|
const { computeCustomOpts, computeIsMaxFixedColumn } = $xetable.getComputeMaps();
|
|
20
22
|
const refElem = ref();
|
|
23
|
+
const bodyElemRef = ref();
|
|
24
|
+
const dragHintElemRef = ref();
|
|
25
|
+
const dragColumn = ref();
|
|
26
|
+
let prevDropTrEl;
|
|
21
27
|
const handleWrapperMouseenterEvent = (evnt) => {
|
|
22
28
|
const { customStore } = props;
|
|
23
29
|
customStore.activeWrapper = true;
|
|
@@ -46,11 +52,24 @@ export default defineComponent({
|
|
|
46
52
|
$xetable.emitCustomEvent('reset', evnt);
|
|
47
53
|
};
|
|
48
54
|
const resetPopupCustomEvent = (evnt) => {
|
|
49
|
-
|
|
55
|
+
if (VXETable.modal) {
|
|
56
|
+
VXETable.modal.confirm({
|
|
57
|
+
content: GlobalConfig.i18n('vxe.custom.cstmConfirmRestore'),
|
|
58
|
+
className: 'vxe-table--ignore-clear',
|
|
59
|
+
escClosable: true
|
|
60
|
+
}).then(type => {
|
|
61
|
+
if (type === 'confirm') {
|
|
62
|
+
resetCustomEvent(evnt);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
resetCustomEvent(evnt);
|
|
68
|
+
}
|
|
50
69
|
};
|
|
51
70
|
const handleOptionCheck = (column) => {
|
|
52
|
-
const {
|
|
53
|
-
const matchObj = XEUtils.findTree(
|
|
71
|
+
const { customColumnList } = reactData;
|
|
72
|
+
const matchObj = XEUtils.findTree(customColumnList, item => item === column);
|
|
54
73
|
if (matchObj && matchObj.parent) {
|
|
55
74
|
const { parent } = matchObj;
|
|
56
75
|
if (parent.children && parent.children.length) {
|
|
@@ -92,11 +111,11 @@ export default defineComponent({
|
|
|
92
111
|
};
|
|
93
112
|
const allCustomEvent = () => {
|
|
94
113
|
const { customStore } = props;
|
|
95
|
-
const {
|
|
114
|
+
const { customColumnList } = reactData;
|
|
96
115
|
const customOpts = computeCustomOpts.value;
|
|
97
116
|
const { checkMethod } = customOpts;
|
|
98
117
|
const isAll = !customStore.isAll;
|
|
99
|
-
XEUtils.eachTree(
|
|
118
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
100
119
|
if (!checkMethod || checkMethod({ column })) {
|
|
101
120
|
column.visible = isAll;
|
|
102
121
|
column.halfVisible = false;
|
|
@@ -105,9 +124,111 @@ export default defineComponent({
|
|
|
105
124
|
customStore.isAll = isAll;
|
|
106
125
|
$xetable.checkCustomStatus();
|
|
107
126
|
};
|
|
127
|
+
const sortMousedownEvent = (evnt) => {
|
|
128
|
+
const btnEl = evnt.currentTarget;
|
|
129
|
+
const tdEl = btnEl.parentNode;
|
|
130
|
+
const trEl = tdEl.parentNode;
|
|
131
|
+
const colid = trEl.getAttribute('colid');
|
|
132
|
+
const column = $xetable.getColumnById(colid);
|
|
133
|
+
trEl.draggable = true;
|
|
134
|
+
dragColumn.value = column;
|
|
135
|
+
addClass(trEl, 'active--drag-origin');
|
|
136
|
+
};
|
|
137
|
+
const sortMouseupEvent = (evnt) => {
|
|
138
|
+
const btnEl = evnt.currentTarget;
|
|
139
|
+
const tdEl = btnEl.parentNode;
|
|
140
|
+
const trEl = tdEl.parentNode;
|
|
141
|
+
const dragHintEl = dragHintElemRef.value;
|
|
142
|
+
trEl.draggable = false;
|
|
143
|
+
dragColumn.value = null;
|
|
144
|
+
removeClass(trEl, 'active--drag-origin');
|
|
145
|
+
if (dragHintEl) {
|
|
146
|
+
dragHintEl.style.display = '';
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const sortDragstartEvent = (evnt) => {
|
|
150
|
+
const img = new Image();
|
|
151
|
+
if (evnt.dataTransfer) {
|
|
152
|
+
evnt.dataTransfer.setDragImage(img, 0, 0);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
const sortDragendEvent = (evnt) => {
|
|
156
|
+
const { customColumnList } = reactData;
|
|
157
|
+
const trEl = evnt.currentTarget;
|
|
158
|
+
const dragHintEl = dragHintElemRef.value;
|
|
159
|
+
if (prevDropTrEl) {
|
|
160
|
+
// 判断是否有拖动
|
|
161
|
+
if (prevDropTrEl !== trEl) {
|
|
162
|
+
const dragOffset = prevDropTrEl.getAttribute('drag-pos');
|
|
163
|
+
const colid = trEl.getAttribute('colid');
|
|
164
|
+
const column = $xetable.getColumnById(colid);
|
|
165
|
+
if (!column) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const cIndex = XEUtils.findIndexOf(customColumnList, item => item.id === column.id);
|
|
169
|
+
const targetColid = prevDropTrEl.getAttribute('colid');
|
|
170
|
+
const targetColumn = $xetable.getColumnById(targetColid);
|
|
171
|
+
if (!targetColumn) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
// 移出源位置
|
|
175
|
+
customColumnList.splice(cIndex, 1);
|
|
176
|
+
const tcIndex = XEUtils.findIndexOf(customColumnList, item => item.id === targetColumn.id);
|
|
177
|
+
// 插新位置
|
|
178
|
+
customColumnList.splice(tcIndex + (dragOffset === 'bottom' ? 1 : 0), 0, column);
|
|
179
|
+
}
|
|
180
|
+
prevDropTrEl.draggable = false;
|
|
181
|
+
prevDropTrEl.removeAttribute('drag-pos');
|
|
182
|
+
removeClass(prevDropTrEl, 'active--drag-target');
|
|
183
|
+
}
|
|
184
|
+
dragColumn.value = null;
|
|
185
|
+
trEl.draggable = false;
|
|
186
|
+
trEl.removeAttribute('drag-pos');
|
|
187
|
+
if (dragHintEl) {
|
|
188
|
+
dragHintEl.style.display = '';
|
|
189
|
+
}
|
|
190
|
+
removeClass(trEl, 'active--drag-target');
|
|
191
|
+
removeClass(trEl, 'active--drag-origin');
|
|
192
|
+
// 更新顺序
|
|
193
|
+
customColumnList.forEach((column, index) => {
|
|
194
|
+
column.renderSortNumber = index;
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
const sortDragoverEvent = (evnt) => {
|
|
198
|
+
const trEl = evnt.currentTarget;
|
|
199
|
+
if (prevDropTrEl !== trEl) {
|
|
200
|
+
removeClass(prevDropTrEl, 'active--drag-target');
|
|
201
|
+
}
|
|
202
|
+
const colid = trEl.getAttribute('colid');
|
|
203
|
+
const column = $xetable.getColumnById(colid);
|
|
204
|
+
// 是否移入有效元行
|
|
205
|
+
if (column && column.level === 1) {
|
|
206
|
+
evnt.preventDefault();
|
|
207
|
+
const offsetY = evnt.clientY - trEl.getBoundingClientRect().y;
|
|
208
|
+
const dragOffset = offsetY < trEl.clientHeight / 2 ? 'top' : 'bottom';
|
|
209
|
+
addClass(trEl, 'active--drag-target');
|
|
210
|
+
trEl.setAttribute('drag-pos', dragOffset);
|
|
211
|
+
prevDropTrEl = trEl;
|
|
212
|
+
}
|
|
213
|
+
updateDropHint(evnt);
|
|
214
|
+
};
|
|
215
|
+
const updateDropHint = (evnt) => {
|
|
216
|
+
const dragHintEl = dragHintElemRef.value;
|
|
217
|
+
const bodyEl = bodyElemRef.value;
|
|
218
|
+
if (!bodyEl) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
if (dragHintEl) {
|
|
222
|
+
const warpperEl = bodyEl.parentNode;
|
|
223
|
+
const warpperRect = warpperEl.getBoundingClientRect();
|
|
224
|
+
dragHintEl.style.display = 'block';
|
|
225
|
+
dragHintEl.style.top = `${Math.min(warpperEl.clientHeight - warpperEl.scrollTop - dragHintEl.clientHeight, evnt.clientY - warpperRect.y)}px`;
|
|
226
|
+
dragHintEl.style.left = `${Math.min(warpperEl.clientWidth - warpperEl.scrollLeft - dragHintEl.clientWidth - 16, evnt.clientX - warpperRect.x)}px`;
|
|
227
|
+
}
|
|
228
|
+
};
|
|
108
229
|
const renderSimplePanel = () => {
|
|
109
230
|
const { customStore } = props;
|
|
110
|
-
const {
|
|
231
|
+
const { customColumnList } = reactData;
|
|
111
232
|
const customOpts = computeCustomOpts.value;
|
|
112
233
|
const { maxHeight } = customStore;
|
|
113
234
|
const { checkMethod, visibleMethod, trigger } = customOpts;
|
|
@@ -119,7 +240,7 @@ export default defineComponent({
|
|
|
119
240
|
customWrapperOns.onMouseenter = handleWrapperMouseenterEvent;
|
|
120
241
|
customWrapperOns.onMouseleave = handleWrapperMouseleaveEvent;
|
|
121
242
|
}
|
|
122
|
-
XEUtils.eachTree(
|
|
243
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
123
244
|
const isVisible = visibleMethod ? visibleMethod({ column }) : true;
|
|
124
245
|
if (isVisible) {
|
|
125
246
|
const isChecked = column.visible;
|
|
@@ -235,12 +356,12 @@ export default defineComponent({
|
|
|
235
356
|
};
|
|
236
357
|
const renderPopupPanel = () => {
|
|
237
358
|
const { customStore } = props;
|
|
238
|
-
const {
|
|
359
|
+
const { customColumnList } = reactData;
|
|
239
360
|
const customOpts = computeCustomOpts.value;
|
|
240
361
|
const { checkMethod, visibleMethod } = customOpts;
|
|
241
362
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
242
363
|
const trVNs = [];
|
|
243
|
-
XEUtils.eachTree(
|
|
364
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
244
365
|
const isVisible = visibleMethod ? visibleMethod({ column }) : true;
|
|
245
366
|
if (isVisible) {
|
|
246
367
|
const isChecked = column.visible;
|
|
@@ -250,12 +371,29 @@ export default defineComponent({
|
|
|
250
371
|
const isDisabled = checkMethod ? !checkMethod({ column }) : false;
|
|
251
372
|
trVNs.push(h('tr', {
|
|
252
373
|
key: column.id,
|
|
253
|
-
|
|
374
|
+
colid: column.id,
|
|
375
|
+
class: [`vxe-table-custom-popup--row level--${column.level}`, {
|
|
254
376
|
'is--group': isColGroup
|
|
255
|
-
}]
|
|
377
|
+
}],
|
|
378
|
+
onDragstart: sortDragstartEvent,
|
|
379
|
+
onDragend: sortDragendEvent,
|
|
380
|
+
onDragover: sortDragoverEvent
|
|
256
381
|
}, [
|
|
257
382
|
h('td', {
|
|
258
|
-
class: 'vxe-table-custom-popup--column-
|
|
383
|
+
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
384
|
+
}, [
|
|
385
|
+
column.level === 1 ? h('span', {
|
|
386
|
+
class: 'vxe-table-custom-popup--column-sort-btn',
|
|
387
|
+
onMousedown: sortMousedownEvent,
|
|
388
|
+
onMouseup: sortMouseupEvent
|
|
389
|
+
}, [
|
|
390
|
+
h('i', {
|
|
391
|
+
class: 'vxe-icon-sort'
|
|
392
|
+
})
|
|
393
|
+
]) : null
|
|
394
|
+
]),
|
|
395
|
+
h('td', {
|
|
396
|
+
class: 'vxe-table-custom-popup--column-item col--name'
|
|
259
397
|
}, [
|
|
260
398
|
h('div', {
|
|
261
399
|
class: 'vxe-table-custom-popup--name',
|
|
@@ -263,7 +401,7 @@ export default defineComponent({
|
|
|
263
401
|
}, colTitle)
|
|
264
402
|
]),
|
|
265
403
|
h('td', {
|
|
266
|
-
class: 'vxe-table-custom-popup--column-
|
|
404
|
+
class: 'vxe-table-custom-popup--column-item col--visible'
|
|
267
405
|
}, [
|
|
268
406
|
h('div', {
|
|
269
407
|
class: ['vxe-table-custom--checkbox-option', {
|
|
@@ -283,17 +421,16 @@ export default defineComponent({
|
|
|
283
421
|
])
|
|
284
422
|
]),
|
|
285
423
|
h('td', {
|
|
286
|
-
class: 'vxe-table-custom-popup--column-fixed'
|
|
424
|
+
class: 'vxe-table-custom-popup--column-item col--fixed'
|
|
287
425
|
}, [
|
|
288
426
|
!parent && customOpts.allowFixed ? h(VxeRadioGroupComponent, {
|
|
289
427
|
modelValue: column.fixed || '',
|
|
290
|
-
disabled: isMaxFixedColumn,
|
|
291
428
|
type: 'button',
|
|
292
429
|
size: 'mini',
|
|
293
430
|
options: [
|
|
294
|
-
{ label: '
|
|
295
|
-
{ label: '
|
|
296
|
-
{ label: '
|
|
431
|
+
{ label: GlobalConfig.i18n('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isMaxFixedColumn },
|
|
432
|
+
{ label: GlobalConfig.i18n('vxe.custom.setting.fixedUnset'), value: '' },
|
|
433
|
+
{ label: GlobalConfig.i18n('vxe.custom.setting.fixedRight'), value: 'right', disabled: isMaxFixedColumn }
|
|
297
434
|
],
|
|
298
435
|
'onUpdate:modelValue'(value) {
|
|
299
436
|
column.fixed = value;
|
|
@@ -308,46 +445,71 @@ export default defineComponent({
|
|
|
308
445
|
});
|
|
309
446
|
return h(VxeModalComponent, {
|
|
310
447
|
key: 'popup',
|
|
311
|
-
className: 'vxe-table-custom-popup-
|
|
448
|
+
className: 'vxe-table-custom-popup-wrapper vxe-table--ignore-clear',
|
|
312
449
|
modelValue: customStore.visible,
|
|
313
450
|
title: GlobalConfig.i18n('vxe.custom.cstmTitle'),
|
|
314
|
-
width:
|
|
315
|
-
|
|
451
|
+
width: '40vw',
|
|
452
|
+
minWidth: 500,
|
|
453
|
+
height: '50vh',
|
|
454
|
+
minHeight: 300,
|
|
316
455
|
mask: true,
|
|
317
456
|
lockView: true,
|
|
318
457
|
showFooter: true,
|
|
458
|
+
resize: true,
|
|
319
459
|
escClosable: true,
|
|
460
|
+
destroyOnClose: true,
|
|
320
461
|
'onUpdate:modelValue'(value) {
|
|
321
462
|
customStore.visible = value;
|
|
322
463
|
}
|
|
323
464
|
}, {
|
|
324
465
|
default: () => {
|
|
325
466
|
return h('div', {
|
|
467
|
+
ref: bodyElemRef,
|
|
326
468
|
class: 'vxe-table-custom-popup--body'
|
|
327
469
|
}, [
|
|
328
|
-
h('
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
470
|
+
h('div', {
|
|
471
|
+
class: 'vxe-table-custom-popup--table-wrapper'
|
|
472
|
+
}, [
|
|
473
|
+
h('table', {}, [
|
|
474
|
+
h('colgroup', {}, [
|
|
475
|
+
h('col', {
|
|
476
|
+
style: {
|
|
477
|
+
width: '60px'
|
|
478
|
+
}
|
|
479
|
+
}),
|
|
480
|
+
h('col'),
|
|
481
|
+
h('col', {
|
|
482
|
+
style: {
|
|
483
|
+
width: '80px'
|
|
484
|
+
}
|
|
485
|
+
}),
|
|
486
|
+
h('col', {
|
|
487
|
+
style: {
|
|
488
|
+
width: '200px'
|
|
489
|
+
}
|
|
490
|
+
})
|
|
491
|
+
]),
|
|
492
|
+
h('thead', {}, [
|
|
493
|
+
h('tr', {}, [
|
|
494
|
+
h('th', {}, GlobalConfig.i18n('vxe.custom.setting.colSort')),
|
|
495
|
+
h('th', {}, GlobalConfig.i18n('vxe.custom.setting.colTitle')),
|
|
496
|
+
h('th', {}, GlobalConfig.i18n('vxe.custom.setting.colVisible')),
|
|
497
|
+
h('th', {}, GlobalConfig.i18n('vxe.custom.setting.colFixed'))
|
|
498
|
+
])
|
|
499
|
+
]),
|
|
500
|
+
h(TransitionGroup, {
|
|
501
|
+
class: 'vxe-table-custom--body',
|
|
502
|
+
tag: 'tbody',
|
|
503
|
+
name: 'vxe-table-custom--flip'
|
|
504
|
+
}, {
|
|
505
|
+
default: () => trVNs
|
|
340
506
|
})
|
|
341
|
-
])
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
])
|
|
348
|
-
]),
|
|
349
|
-
h('tbody', {}, trVNs)
|
|
350
|
-
])
|
|
507
|
+
])
|
|
508
|
+
]),
|
|
509
|
+
h('div', {
|
|
510
|
+
ref: dragHintElemRef,
|
|
511
|
+
class: 'vxe-table-custom-popup--drag-hint'
|
|
512
|
+
}, GlobalConfig.i18n('vxe.custom.cstmDragTarget', [dragColumn.value ? dragColumn.value.getTitle() : '']))
|
|
351
513
|
]);
|
|
352
514
|
},
|
|
353
515
|
footer: () => {
|