vxe-table 4.7.71 → 4.7.73
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/grid/src/grid.js +1 -1
- package/es/locale/lang/en-US.js +19 -2
- package/es/locale/lang/es-ES.js +19 -2
- package/es/locale/lang/hu-HU.js +23 -2
- package/es/locale/lang/ja-JP.js +19 -2
- package/es/locale/lang/ko-KR.js +19 -2
- package/es/locale/lang/pt-BR.js +19 -2
- package/es/locale/lang/ru-RU.js +19 -2
- package/es/locale/lang/vi-VN.js +19 -2
- package/es/locale/lang/zh-CN.js +19 -2
- package/es/locale/lang/zh-TC.js +19 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +176 -89
- package/es/table/module/export/export-panel.js +13 -4
- package/es/table/style.css +16 -37
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +16 -37
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +1 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +197 -74
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +19 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +19 -2
- package/lib/locale/lang/es-ES.js +19 -2
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +19 -2
- package/lib/locale/lang/hu-HU.js +23 -2
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +19 -2
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +19 -2
- package/lib/locale/lang/ko-KR.js +19 -2
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +19 -2
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +19 -2
- package/lib/locale/lang/ru-RU.js +19 -2
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/vi-VN.js +19 -2
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CN.js +19 -2
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +19 -2
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +19 -2
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +19 -2
- package/lib/locale/lang/zh-TC.js +19 -2
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +19 -2
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +19 -2
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +140 -68
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/export-panel.js +9 -2
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/style/style.css +16 -37
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +2 -2
- 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 +16 -37
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +1 -1
- package/packages/locale/lang/en-US.ts +19 -2
- package/packages/locale/lang/es-ES.ts +19 -2
- package/packages/locale/lang/hu-HU.ts +23 -2
- package/packages/locale/lang/ja-JP.ts +19 -2
- package/packages/locale/lang/ko-KR.ts +19 -2
- package/packages/locale/lang/pt-BR.ts +19 -2
- package/packages/locale/lang/ru-RU.ts +19 -2
- package/packages/locale/lang/vi-VN.ts +19 -2
- package/packages/locale/lang/zh-CN.ts +19 -2
- package/packages/locale/lang/zh-TC.ts +19 -2
- package/packages/table/module/custom/panel.ts +176 -84
- package/packages/table/module/export/export-panel.ts +13 -4
- package/styles/components/table-module/custom.scss +21 -40
- /package/es/{iconfont.1724652383108.ttf → iconfont.1724892633863.ttf} +0 -0
- /package/es/{iconfont.1724652383108.woff → iconfont.1724892633863.woff} +0 -0
- /package/es/{iconfont.1724652383108.woff2 → iconfont.1724892633863.woff2} +0 -0
- /package/lib/{iconfont.1724652383108.ttf → iconfont.1724892633863.ttf} +0 -0
- /package/lib/{iconfont.1724652383108.woff → iconfont.1724892633863.woff} +0 -0
- /package/lib/{iconfont.1724652383108.woff2 → iconfont.1724892633863.woff2} +0 -0
|
@@ -26,7 +26,7 @@ export default defineComponent({
|
|
|
26
26
|
const refElem = ref();
|
|
27
27
|
const bodyElemRef = ref();
|
|
28
28
|
const dragHintElemRef = ref();
|
|
29
|
-
const
|
|
29
|
+
const dragColumnRef = ref();
|
|
30
30
|
let prevDropTrEl;
|
|
31
31
|
const handleWrapperMouseenterEvent = (evnt) => {
|
|
32
32
|
const { customStore } = props;
|
|
@@ -72,6 +72,10 @@ export default defineComponent({
|
|
|
72
72
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
73
73
|
$xeTable.saveCustomStore('confirm');
|
|
74
74
|
};
|
|
75
|
+
const cancelCloseEvent = ({ $event }) => {
|
|
76
|
+
$xeTable.closeCustom();
|
|
77
|
+
$xeTable.emitCustomEvent('close', $event);
|
|
78
|
+
};
|
|
75
79
|
const cancelCustomEvent = ({ $event }) => {
|
|
76
80
|
const { customStore } = props;
|
|
77
81
|
const { customColumnList } = reactData;
|
|
@@ -136,49 +140,79 @@ export default defineComponent({
|
|
|
136
140
|
const changeCheckboxOption = (column) => {
|
|
137
141
|
const isChecked = !column.renderVisible;
|
|
138
142
|
const customOpts = computeCustomOpts.value;
|
|
139
|
-
XEUtils.eachTree([column], (item) => {
|
|
140
|
-
item.renderVisible = isChecked;
|
|
141
|
-
item.halfVisible = false;
|
|
142
|
-
});
|
|
143
|
-
handleOptionCheck(column);
|
|
144
143
|
if (customOpts.immediate) {
|
|
144
|
+
XEUtils.eachTree([column], (item) => {
|
|
145
|
+
item.visible = isChecked;
|
|
146
|
+
item.renderVisible = isChecked;
|
|
147
|
+
item.halfVisible = false;
|
|
148
|
+
});
|
|
145
149
|
$xeTable.handleCustom();
|
|
146
150
|
$xeTable.saveCustomStore('update:visible');
|
|
147
151
|
}
|
|
152
|
+
else {
|
|
153
|
+
XEUtils.eachTree([column], (item) => {
|
|
154
|
+
item.renderVisible = isChecked;
|
|
155
|
+
item.halfVisible = false;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
handleOptionCheck(column);
|
|
148
159
|
$xeTable.checkCustomStatus();
|
|
149
160
|
};
|
|
150
161
|
const changeFixedOption = (column, colFixed) => {
|
|
151
162
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
163
|
+
const customOpts = computeCustomOpts.value;
|
|
164
|
+
if (customOpts.immediate) {
|
|
165
|
+
if (column.renderFixed === colFixed) {
|
|
166
|
+
column.fixed = '';
|
|
167
|
+
column.renderFixed = '';
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
if (!isMaxFixedColumn || column.renderFixed) {
|
|
171
|
+
column.fixed = colFixed;
|
|
172
|
+
column.renderFixed = colFixed;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
$xeTable.handleCustom();
|
|
176
|
+
$xeTable.saveCustomStore('update:fixed');
|
|
155
177
|
}
|
|
156
178
|
else {
|
|
157
|
-
if (
|
|
158
|
-
column.renderFixed =
|
|
159
|
-
|
|
179
|
+
if (column.renderFixed === colFixed) {
|
|
180
|
+
column.renderFixed = '';
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
if (!isMaxFixedColumn || column.renderFixed) {
|
|
184
|
+
column.renderFixed = colFixed;
|
|
185
|
+
}
|
|
160
186
|
}
|
|
161
187
|
}
|
|
162
188
|
};
|
|
163
|
-
// const changePopupFixedOption = () => {
|
|
164
|
-
// const isMaxFixedColumn = computeIsMaxFixedColumn.value
|
|
165
|
-
// if (!isMaxFixedColumn) {
|
|
166
|
-
// // $xeTable.setColumnFixed(column, column.fixed)
|
|
167
|
-
// }
|
|
168
|
-
// }
|
|
169
189
|
const allOptionEvent = () => {
|
|
170
190
|
const { customStore } = props;
|
|
171
191
|
const { customColumnList } = reactData;
|
|
172
192
|
const customOpts = computeCustomOpts.value;
|
|
173
193
|
const { checkMethod } = customOpts;
|
|
174
194
|
const isAll = !customStore.isAll;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
column
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
195
|
+
if (customOpts.immediate) {
|
|
196
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
197
|
+
if (!checkMethod || checkMethod({ column })) {
|
|
198
|
+
column.visible = isAll;
|
|
199
|
+
column.renderVisible = isAll;
|
|
200
|
+
column.halfVisible = false;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
customStore.isAll = isAll;
|
|
204
|
+
$xeTable.handleCustom();
|
|
205
|
+
$xeTable.saveCustomStore('update:visible');
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
209
|
+
if (!checkMethod || checkMethod({ column })) {
|
|
210
|
+
column.renderVisible = isAll;
|
|
211
|
+
column.halfVisible = false;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
customStore.isAll = isAll;
|
|
215
|
+
}
|
|
182
216
|
$xeTable.checkCustomStatus();
|
|
183
217
|
};
|
|
184
218
|
const sortMousedownEvent = (evnt) => {
|
|
@@ -188,7 +222,7 @@ export default defineComponent({
|
|
|
188
222
|
const colid = trEl.getAttribute('colid');
|
|
189
223
|
const column = $xeTable.getColumnById(colid);
|
|
190
224
|
trEl.draggable = true;
|
|
191
|
-
|
|
225
|
+
dragColumnRef.value = column;
|
|
192
226
|
addClass(trEl, 'active--drag-origin');
|
|
193
227
|
};
|
|
194
228
|
const sortMouseupEvent = (evnt) => {
|
|
@@ -197,7 +231,7 @@ export default defineComponent({
|
|
|
197
231
|
const trEl = tdEl.parentNode;
|
|
198
232
|
const dragHintEl = dragHintElemRef.value;
|
|
199
233
|
trEl.draggable = false;
|
|
200
|
-
|
|
234
|
+
dragColumnRef.value = null;
|
|
201
235
|
removeClass(trEl, 'active--drag-origin');
|
|
202
236
|
if (dragHintEl) {
|
|
203
237
|
dragHintEl.style.display = '';
|
|
@@ -211,6 +245,7 @@ export default defineComponent({
|
|
|
211
245
|
};
|
|
212
246
|
const sortDragendEvent = (evnt) => {
|
|
213
247
|
const { customColumnList } = reactData;
|
|
248
|
+
const customOpts = computeCustomOpts.value;
|
|
214
249
|
const trEl = evnt.currentTarget;
|
|
215
250
|
const dragHintEl = dragHintElemRef.value;
|
|
216
251
|
if (prevDropTrEl) {
|
|
@@ -238,7 +273,7 @@ export default defineComponent({
|
|
|
238
273
|
prevDropTrEl.removeAttribute('drag-pos');
|
|
239
274
|
removeClass(prevDropTrEl, 'active--drag-target');
|
|
240
275
|
}
|
|
241
|
-
|
|
276
|
+
dragColumnRef.value = null;
|
|
242
277
|
trEl.draggable = false;
|
|
243
278
|
trEl.removeAttribute('drag-pos');
|
|
244
279
|
if (dragHintEl) {
|
|
@@ -246,6 +281,16 @@ export default defineComponent({
|
|
|
246
281
|
}
|
|
247
282
|
removeClass(trEl, 'active--drag-target');
|
|
248
283
|
removeClass(trEl, 'active--drag-origin');
|
|
284
|
+
if (customOpts.immediate) {
|
|
285
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
286
|
+
if (!parent) {
|
|
287
|
+
const sortIndex = index + 1;
|
|
288
|
+
column.renderSortNumber = sortIndex;
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
$xeTable.handleCustom();
|
|
292
|
+
$xeTable.saveCustomStore('update:sort');
|
|
293
|
+
}
|
|
249
294
|
};
|
|
250
295
|
const sortDragoverEvent = (evnt) => {
|
|
251
296
|
const trEl = evnt.currentTarget;
|
|
@@ -301,6 +346,7 @@ export default defineComponent({
|
|
|
301
346
|
const isColGroup = column.children && column.children.length;
|
|
302
347
|
const colTitle = formatText(column.getTitle(), 1);
|
|
303
348
|
const isDisabled = checkMethod ? !checkMethod({ column }) : false;
|
|
349
|
+
const isHidden = !isChecked;
|
|
304
350
|
colVNs.push(h('li', {
|
|
305
351
|
key: column.id,
|
|
306
352
|
colid: column.id,
|
|
@@ -334,46 +380,58 @@ export default defineComponent({
|
|
|
334
380
|
? h('div', {
|
|
335
381
|
class: 'vxe-table-custom--sort-option'
|
|
336
382
|
}, [
|
|
337
|
-
h('span', {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
383
|
+
h('span', Object.assign({ class: ['vxe-table-custom--sort-btn', {
|
|
384
|
+
'is--disabled': isHidden
|
|
385
|
+
}], title: getI18n('vxe.custom.setting.sortHelpTip') }, (isHidden
|
|
386
|
+
? {}
|
|
387
|
+
: {
|
|
388
|
+
onMousedown: sortMousedownEvent,
|
|
389
|
+
onMouseup: sortMouseupEvent
|
|
390
|
+
})), [
|
|
343
391
|
h('i', {
|
|
344
392
|
class: getIcon().TABLE_CUSTOM_SORT
|
|
345
393
|
})
|
|
346
394
|
])
|
|
347
395
|
])
|
|
348
396
|
: createCommentVNode(),
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
397
|
+
column.type === 'html'
|
|
398
|
+
? h('div', {
|
|
399
|
+
key: '1',
|
|
400
|
+
class: 'vxe-table-custom--checkbox-label',
|
|
401
|
+
innerHTML: colTitle
|
|
402
|
+
})
|
|
403
|
+
: h('div', {
|
|
404
|
+
key: '0',
|
|
405
|
+
class: 'vxe-table-custom--checkbox-label'
|
|
406
|
+
}, colTitle),
|
|
353
407
|
!parent && allowFixed
|
|
354
408
|
? h('div', {
|
|
355
409
|
class: 'vxe-table-custom--fixed-option'
|
|
356
410
|
}, [
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
411
|
+
VxeUIButtonComponent
|
|
412
|
+
? h(VxeUIButtonComponent, {
|
|
413
|
+
mode: 'text',
|
|
414
|
+
icon: column.renderFixed === 'left' ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
415
|
+
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
416
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
417
|
+
title: getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
|
|
418
|
+
onClick: () => {
|
|
419
|
+
changeFixedOption(column, 'left');
|
|
420
|
+
}
|
|
421
|
+
})
|
|
422
|
+
: createCommentVNode(),
|
|
423
|
+
VxeUIButtonComponent
|
|
424
|
+
? h(VxeUIButtonComponent, {
|
|
425
|
+
mode: 'text',
|
|
426
|
+
icon: column.renderFixed === 'right' ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
427
|
+
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
428
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
429
|
+
title: getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
|
|
430
|
+
onClick: () => {
|
|
431
|
+
changeFixedOption(column, 'right');
|
|
432
|
+
}
|
|
433
|
+
})
|
|
434
|
+
: createCommentVNode()
|
|
377
435
|
])
|
|
378
436
|
: createCommentVNode()
|
|
379
437
|
]));
|
|
@@ -381,6 +439,7 @@ export default defineComponent({
|
|
|
381
439
|
});
|
|
382
440
|
const isAllChecked = customStore.isAll;
|
|
383
441
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
442
|
+
const dragColumn = dragColumnRef.value;
|
|
384
443
|
return h('div', {
|
|
385
444
|
ref: refElem,
|
|
386
445
|
key: 'simple',
|
|
@@ -431,26 +490,44 @@ export default defineComponent({
|
|
|
431
490
|
h('div', {
|
|
432
491
|
ref: dragHintElemRef,
|
|
433
492
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
434
|
-
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn.
|
|
493
|
+
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn && dragColumn.type !== 'html' ? dragColumn.getTitle() : '']))
|
|
435
494
|
]),
|
|
436
495
|
customOpts.showFooter
|
|
437
496
|
? h('div', {
|
|
438
497
|
class: 'vxe-table-custom--footer'
|
|
439
498
|
}, [
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
499
|
+
VxeUIButtonComponent
|
|
500
|
+
? h(VxeUIButtonComponent, {
|
|
501
|
+
mode: 'text',
|
|
502
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
503
|
+
onClick: resetCustomEvent
|
|
504
|
+
})
|
|
505
|
+
: createCommentVNode(),
|
|
506
|
+
customOpts.immediate
|
|
507
|
+
? (VxeUIButtonComponent
|
|
508
|
+
? h(VxeUIButtonComponent, {
|
|
509
|
+
mode: 'text',
|
|
510
|
+
content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
|
|
511
|
+
onClick: cancelCloseEvent
|
|
512
|
+
})
|
|
513
|
+
: createCommentVNode())
|
|
514
|
+
: (VxeUIButtonComponent
|
|
515
|
+
? h(VxeUIButtonComponent, {
|
|
516
|
+
mode: 'text',
|
|
517
|
+
content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
|
|
518
|
+
onClick: cancelCustomEvent
|
|
519
|
+
})
|
|
520
|
+
: createCommentVNode()),
|
|
444
521
|
customOpts.immediate
|
|
445
522
|
? createCommentVNode()
|
|
446
|
-
:
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
523
|
+
: (VxeUIButtonComponent
|
|
524
|
+
? h(VxeUIButtonComponent, {
|
|
525
|
+
mode: 'text',
|
|
526
|
+
status: 'primary',
|
|
527
|
+
content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
|
|
528
|
+
onClick: confirmCustomEvent
|
|
529
|
+
})
|
|
530
|
+
: createCommentVNode())
|
|
454
531
|
])
|
|
455
532
|
: null
|
|
456
533
|
]
|
|
@@ -476,6 +553,7 @@ export default defineComponent({
|
|
|
476
553
|
const colTitle = formatText(column.getTitle(), 1);
|
|
477
554
|
const isColGroup = column.children && column.children.length;
|
|
478
555
|
const isDisabled = checkMethod ? !checkMethod({ column }) : false;
|
|
556
|
+
const isHidden = !isChecked;
|
|
479
557
|
trVNs.push(h('tr', {
|
|
480
558
|
key: column.id,
|
|
481
559
|
colid: column.id,
|
|
@@ -514,12 +592,14 @@ export default defineComponent({
|
|
|
514
592
|
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
515
593
|
}, [
|
|
516
594
|
column.level === 1
|
|
517
|
-
? h('span', {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
595
|
+
? h('span', Object.assign({ class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
596
|
+
'is--disabled': isHidden
|
|
597
|
+
}], title: getI18n('vxe.custom.setting.sortHelpTip') }, (isHidden
|
|
598
|
+
? {}
|
|
599
|
+
: {
|
|
600
|
+
onMousedown: sortMousedownEvent,
|
|
601
|
+
onMouseup: sortMouseupEvent
|
|
602
|
+
})), [
|
|
523
603
|
h('i', {
|
|
524
604
|
class: getIcon().TABLE_CUSTOM_SORT
|
|
525
605
|
})
|
|
@@ -530,20 +610,28 @@ export default defineComponent({
|
|
|
530
610
|
h('td', {
|
|
531
611
|
class: 'vxe-table-custom-popup--column-item col--name'
|
|
532
612
|
}, [
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
613
|
+
column.type === 'html'
|
|
614
|
+
? h('div', {
|
|
615
|
+
key: '1',
|
|
616
|
+
class: 'vxe-table-custom-popup--name',
|
|
617
|
+
innerHTML: colTitle
|
|
618
|
+
})
|
|
619
|
+
: h('div', {
|
|
620
|
+
key: '0',
|
|
621
|
+
class: 'vxe-table-custom-popup--name',
|
|
622
|
+
title: colTitle
|
|
623
|
+
}, colTitle)
|
|
537
624
|
]),
|
|
538
625
|
allowResizable
|
|
539
626
|
? h('td', {
|
|
540
627
|
class: 'vxe-table-custom-popup--column-item col--resizable'
|
|
541
628
|
}, [
|
|
542
|
-
|
|
629
|
+
column.children && column.children.length
|
|
543
630
|
? h('span', '-')
|
|
544
631
|
: (VxeUIInputComponent
|
|
545
632
|
? h(VxeUIInputComponent, {
|
|
546
633
|
type: 'integer',
|
|
634
|
+
disabled: isHidden,
|
|
547
635
|
modelValue: column.renderResizeWidth,
|
|
548
636
|
'onUpdate:modelValue'(value) {
|
|
549
637
|
column.renderResizeWidth = Math.max(0, Number(value));
|
|
@@ -563,17 +651,15 @@ export default defineComponent({
|
|
|
563
651
|
modelValue: column.renderFixed || '',
|
|
564
652
|
type: 'button',
|
|
565
653
|
size: 'mini',
|
|
654
|
+
disabled: isHidden,
|
|
566
655
|
options: [
|
|
567
|
-
{ label: getI18n('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isMaxFixedColumn },
|
|
568
|
-
{ label: getI18n('vxe.custom.setting.fixedUnset'), value: '' },
|
|
569
|
-
{ label: getI18n('vxe.custom.setting.fixedRight'), value: 'right', disabled: isMaxFixedColumn }
|
|
656
|
+
{ label: getI18n('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isHidden || isMaxFixedColumn },
|
|
657
|
+
{ label: getI18n('vxe.custom.setting.fixedUnset'), value: '', disabled: isHidden },
|
|
658
|
+
{ label: getI18n('vxe.custom.setting.fixedRight'), value: 'right', disabled: isHidden || isMaxFixedColumn }
|
|
570
659
|
],
|
|
571
660
|
'onUpdate:modelValue'(value) {
|
|
572
661
|
column.renderFixed = value;
|
|
573
662
|
}
|
|
574
|
-
// onChange () {
|
|
575
|
-
// changePopupFixedOption(column)
|
|
576
|
-
// }
|
|
577
663
|
})
|
|
578
664
|
: createCommentVNode())
|
|
579
665
|
])
|
|
@@ -583,6 +669,7 @@ export default defineComponent({
|
|
|
583
669
|
});
|
|
584
670
|
const isAllChecked = customStore.isAll;
|
|
585
671
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
672
|
+
const dragColumn = dragColumnRef.value;
|
|
586
673
|
const scopedSlots = {
|
|
587
674
|
default: () => {
|
|
588
675
|
return h('div', {
|
|
@@ -690,7 +777,7 @@ export default defineComponent({
|
|
|
690
777
|
h('div', {
|
|
691
778
|
ref: dragHintElemRef,
|
|
692
779
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
693
|
-
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn
|
|
780
|
+
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn ? dragColumn.getTitle() : '']))
|
|
694
781
|
]);
|
|
695
782
|
},
|
|
696
783
|
footer: () => {
|
|
@@ -149,14 +149,16 @@ export default defineComponent({
|
|
|
149
149
|
const isColGroup = column.children && column.children.length;
|
|
150
150
|
const isChecked = column.checked;
|
|
151
151
|
const indeterminate = column.halfChecked;
|
|
152
|
+
const isHtml = column.type === 'html';
|
|
152
153
|
cols.push(h('li', {
|
|
154
|
+
key: column.id,
|
|
153
155
|
class: ['vxe-export--panel-column-option', `level--${column.level}`, {
|
|
154
156
|
'is--group': isColGroup,
|
|
155
157
|
'is--checked': isChecked,
|
|
156
158
|
'is--indeterminate': indeterminate,
|
|
157
159
|
'is--disabled': column.disabled
|
|
158
160
|
}],
|
|
159
|
-
title: colTitle,
|
|
161
|
+
title: isHtml ? '' : colTitle,
|
|
160
162
|
onClick: () => {
|
|
161
163
|
if (!column.disabled) {
|
|
162
164
|
changeOption(column);
|
|
@@ -166,9 +168,16 @@ export default defineComponent({
|
|
|
166
168
|
h('span', {
|
|
167
169
|
class: ['vxe-checkbox--icon', indeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
168
170
|
}),
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
isHtml
|
|
172
|
+
? h('span', {
|
|
173
|
+
key: '1',
|
|
174
|
+
class: 'vxe-checkbox--label',
|
|
175
|
+
innerHTML: colTitle
|
|
176
|
+
})
|
|
177
|
+
: h('span', {
|
|
178
|
+
key: '0',
|
|
179
|
+
class: 'vxe-checkbox--label'
|
|
180
|
+
}, colTitle)
|
|
172
181
|
]));
|
|
173
182
|
});
|
|
174
183
|
return VxeUIModalComponent
|
package/es/table/style.css
CHANGED
|
@@ -879,25 +879,10 @@
|
|
|
879
879
|
flex-direction: row;
|
|
880
880
|
flex-shrink: 0;
|
|
881
881
|
border-top: 1px solid var(--vxe-ui-base-popup-border-color);
|
|
882
|
-
text-align: right;
|
|
883
882
|
}
|
|
884
883
|
.vxe-table-custom--footer button {
|
|
885
|
-
|
|
886
|
-
width: 50%;
|
|
884
|
+
flex-grow: 1;
|
|
887
885
|
height: 2.8em;
|
|
888
|
-
border: 0;
|
|
889
|
-
color: var(--vxe-ui-font-color);
|
|
890
|
-
text-align: center;
|
|
891
|
-
cursor: pointer;
|
|
892
|
-
}
|
|
893
|
-
.vxe-table-custom--footer button:focus {
|
|
894
|
-
outline: none;
|
|
895
|
-
}
|
|
896
|
-
.vxe-table-custom--footer button:hover {
|
|
897
|
-
color: var(--vxe-ui-font-primary-lighten-color);
|
|
898
|
-
}
|
|
899
|
-
.vxe-table-custom--footer .btn--confirm {
|
|
900
|
-
color: var(--vxe-ui-font-primary-color);
|
|
901
886
|
}
|
|
902
887
|
|
|
903
888
|
.vxe-table-custom--checkbox-option .vxe-checkbox--icon {
|
|
@@ -957,11 +942,17 @@
|
|
|
957
942
|
.vxe-table-custom--sort-btn {
|
|
958
943
|
padding-left: 0.2em;
|
|
959
944
|
padding-right: 0.4em;
|
|
945
|
+
}
|
|
946
|
+
.vxe-table-custom--sort-btn:not(.is--disabled) {
|
|
960
947
|
cursor: grabbing;
|
|
961
948
|
}
|
|
962
|
-
.vxe-table-custom--sort-btn:hover {
|
|
949
|
+
.vxe-table-custom--sort-btn:not(.is--disabled):hover {
|
|
963
950
|
color: var(--vxe-ui-font-primary-color);
|
|
964
951
|
}
|
|
952
|
+
.vxe-table-custom--sort-btn.is--disabled {
|
|
953
|
+
color: var(--vxe-ui-input-disabled-color);
|
|
954
|
+
cursor: not-allowed;
|
|
955
|
+
}
|
|
965
956
|
|
|
966
957
|
.vxe-table-custom--checkbox-label {
|
|
967
958
|
flex-grow: 1;
|
|
@@ -981,24 +972,6 @@
|
|
|
981
972
|
user-select: none;
|
|
982
973
|
}
|
|
983
974
|
|
|
984
|
-
.vxe-table-custom--fixed-left-option,
|
|
985
|
-
.vxe-table-custom--fixed-right-option {
|
|
986
|
-
line-height: 1.34em;
|
|
987
|
-
font-size: 1.1em;
|
|
988
|
-
padding: 0 0.2em;
|
|
989
|
-
cursor: pointer;
|
|
990
|
-
}
|
|
991
|
-
.vxe-table-custom--fixed-left-option.is--checked, .vxe-table-custom--fixed-left-option:hover,
|
|
992
|
-
.vxe-table-custom--fixed-right-option.is--checked,
|
|
993
|
-
.vxe-table-custom--fixed-right-option:hover {
|
|
994
|
-
color: var(--vxe-ui-font-primary-color);
|
|
995
|
-
}
|
|
996
|
-
.vxe-table-custom--fixed-left-option.is--disabled,
|
|
997
|
-
.vxe-table-custom--fixed-right-option.is--disabled {
|
|
998
|
-
cursor: no-drop;
|
|
999
|
-
color: var(--vxe-ui-input-disabled-color);
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
975
|
.vxe-table-custom-popup--body {
|
|
1003
976
|
overflow: auto;
|
|
1004
977
|
height: 100%;
|
|
@@ -1150,14 +1123,20 @@
|
|
|
1150
1123
|
.vxe-table-custom-popup--column-sort-btn {
|
|
1151
1124
|
font-size: 1.2em;
|
|
1152
1125
|
padding: 0.2em 0.5em;
|
|
1126
|
+
}
|
|
1127
|
+
.vxe-table-custom-popup--column-sort-btn:not(.is--disabled) {
|
|
1153
1128
|
cursor: grab;
|
|
1154
1129
|
}
|
|
1155
|
-
.vxe-table-custom-popup--column-sort-btn:hover {
|
|
1130
|
+
.vxe-table-custom-popup--column-sort-btn:not(.is--disabled):hover {
|
|
1156
1131
|
color: var(--vxe-ui-font-primary-color);
|
|
1157
1132
|
}
|
|
1158
|
-
.vxe-table-custom-popup--column-sort-btn:active {
|
|
1133
|
+
.vxe-table-custom-popup--column-sort-btn:not(.is--disabled):active {
|
|
1159
1134
|
cursor: grabbing;
|
|
1160
1135
|
}
|
|
1136
|
+
.vxe-table-custom-popup--column-sort-btn.is--disabled {
|
|
1137
|
+
color: var(--vxe-ui-input-disabled-color);
|
|
1138
|
+
cursor: not-allowed;
|
|
1139
|
+
}
|
|
1161
1140
|
|
|
1162
1141
|
.vxe-table-custom-popup--table-sort-help-title,
|
|
1163
1142
|
.vxe-table-custom-popup--table-sort-help-icon {
|