vxe-table 3.11.21 → 3.11.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.1733469864818.ttf → iconfont.1733805838288.ttf} +0 -0
- package/es/iconfont.1733805838288.woff +0 -0
- package/es/iconfont.1733805838288.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +2 -0
- package/es/locale/lang/de-DE.js +2 -0
- package/es/locale/lang/en-US.js +3 -1
- package/es/locale/lang/es-ES.js +2 -0
- package/es/locale/lang/fr-FR.js +2 -0
- package/es/locale/lang/hu-HU.js +2 -0
- package/es/locale/lang/hy-AM.js +2 -0
- package/es/locale/lang/ja-JP.js +2 -0
- package/es/locale/lang/ko-KR.js +2 -0
- package/es/locale/lang/nb-NO.js +2 -0
- package/es/locale/lang/pt-BR.js +2 -0
- package/es/locale/lang/ru-RU.js +2 -0
- package/es/locale/lang/ug-CN.js +2 -0
- package/es/locale/lang/uk-UA.js +2 -0
- package/es/locale/lang/vi-VN.js +2 -0
- package/es/locale/lang/zh-CHT.js +2 -0
- package/es/locale/lang/zh-CN.js +2 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +8 -3
- package/es/table/module/custom/panel.js +44 -27
- package/es/table/render/index.js +26 -6
- package/es/table/src/body.js +2 -2
- package/es/table/src/cell.js +7 -2
- package/es/table/src/header.js +1 -1
- package/es/table/src/methods.js +195 -48
- package/es/table/src/table.js +31 -4
- package/es/table/style.css +62 -4
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +4 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +62 -4
- package/es/vxe-table/style.min.css +1 -1
- package/lib/{iconfont.1733469864818.ttf → iconfont.1733805838288.ttf} +0 -0
- package/lib/iconfont.1733805838288.woff +0 -0
- package/lib/iconfont.1733805838288.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +369 -106
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +2 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +3 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -1
- package/lib/locale/lang/es-ES.js +2 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -0
- package/lib/locale/lang/fr-FR.js +2 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +2 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -0
- package/lib/locale/lang/hy-AM.js +2 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +2 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -0
- package/lib/locale/lang/ko-KR.js +2 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -0
- package/lib/locale/lang/nb-NO.js +2 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +2 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -0
- package/lib/locale/lang/ru-RU.js +2 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -0
- package/lib/locale/lang/ug-CN.js +2 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +2 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -0
- package/lib/locale/lang/vi-VN.js +2 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -0
- package/lib/locale/lang/zh-CN.js +2 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +8 -3
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +49 -37
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/render/index.js +38 -6
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +2 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +6 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/header.js +1 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +232 -51
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +25 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +62 -4
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +4 -1
- 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 +62 -4
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +2 -0
- package/packages/locale/lang/de-DE.ts +2 -0
- package/packages/locale/lang/en-US.ts +3 -1
- package/packages/locale/lang/es-ES.ts +2 -0
- package/packages/locale/lang/fr-FR.ts +2 -0
- package/packages/locale/lang/hu-HU.ts +2 -0
- package/packages/locale/lang/hy-AM.ts +2 -0
- package/packages/locale/lang/ja-JP.ts +2 -0
- package/packages/locale/lang/ko-KR.ts +2 -0
- package/packages/locale/lang/nb-NO.ts +2 -0
- package/packages/locale/lang/pt-BR.ts +2 -0
- package/packages/locale/lang/ru-RU.ts +2 -0
- package/packages/locale/lang/ug-CN.ts +2 -0
- package/packages/locale/lang/uk-UA.ts +2 -0
- package/packages/locale/lang/vi-VN.ts +2 -0
- package/packages/locale/lang/zh-CHT.ts +2 -0
- package/packages/locale/lang/zh-CN.ts +2 -0
- package/packages/table/module/custom/mixin.ts +9 -3
- package/packages/table/module/custom/panel.ts +48 -27
- package/packages/table/render/index.ts +24 -5
- package/packages/table/src/body.ts +2 -2
- package/packages/table/src/cell.ts +8 -2
- package/packages/table/src/header.ts +1 -1
- package/packages/table/src/methods.ts +209 -50
- package/packages/table/src/table.ts +34 -4
- package/packages/ui/index.ts +3 -0
- package/styles/components/icon.scss +13 -1
- package/styles/components/table.scss +53 -3
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/theme/dark.scss +1 -0
- package/styles/theme/light.scss +1 -0
- package/styles/variable.scss +1 -0
- package/es/iconfont.1733469864818.woff +0 -0
- package/es/iconfont.1733469864818.woff2 +0 -0
- package/lib/iconfont.1733469864818.woff +0 -0
- package/lib/iconfont.1733469864818.woff2 +0 -0
|
@@ -21,11 +21,15 @@ function updateDropHint(_vm, evnt) {
|
|
|
21
21
|
}
|
|
22
22
|
const renderSimplePanel = (h, _vm) => {
|
|
23
23
|
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
|
|
24
|
+
const props = _vm;
|
|
24
25
|
const $xeTable = _vm.$xeTable;
|
|
25
|
-
const
|
|
26
|
-
const {
|
|
26
|
+
const reactData = $xeTable;
|
|
27
|
+
const { customStore } = props;
|
|
28
|
+
const { isCustomStatus, customColumnList } = reactData;
|
|
29
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
27
30
|
const { maxHeight } = customStore;
|
|
28
31
|
const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts;
|
|
32
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
29
33
|
const slots = customOpts.slots || {};
|
|
30
34
|
const headerSlot = slots.header;
|
|
31
35
|
const topSlot = slots.top;
|
|
@@ -34,19 +38,21 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
34
38
|
const footerSlot = slots.footer;
|
|
35
39
|
const colVNs = [];
|
|
36
40
|
const customWrapperOns = {};
|
|
41
|
+
const isAllChecked = customStore.isAll;
|
|
42
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
43
|
+
const dragColumn = _vm.dragColumn;
|
|
37
44
|
// hover 触发
|
|
38
45
|
if (trigger === 'hover') {
|
|
39
46
|
customWrapperOns.mouseenter = _vm.handleWrapperMouseenterEvent;
|
|
40
47
|
customWrapperOns.mouseleave = _vm.handleWrapperMouseleaveEvent;
|
|
41
48
|
}
|
|
42
|
-
const isAllChecked = customStore.isAll;
|
|
43
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
44
49
|
const params = {
|
|
45
50
|
$table: $xeTable,
|
|
46
51
|
$grid: $xeTable.xegrid,
|
|
47
52
|
columns: customColumnList,
|
|
48
53
|
isAllChecked,
|
|
49
|
-
isAllIndeterminate
|
|
54
|
+
isAllIndeterminate,
|
|
55
|
+
isCustomStatus
|
|
50
56
|
};
|
|
51
57
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
52
58
|
const isVisible = visibleMethod ? visibleMethod({ column }) : true;
|
|
@@ -94,7 +100,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
94
100
|
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
95
101
|
})
|
|
96
102
|
])
|
|
97
|
-
:
|
|
103
|
+
: renderEmptyElement($xeTable),
|
|
98
104
|
allowSort && column.level === 1
|
|
99
105
|
? h('div', {
|
|
100
106
|
class: 'vxe-table-custom--sort-option'
|
|
@@ -118,7 +124,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
118
124
|
})
|
|
119
125
|
])
|
|
120
126
|
])
|
|
121
|
-
:
|
|
127
|
+
: renderEmptyElement($xeTable),
|
|
122
128
|
column.type === 'html'
|
|
123
129
|
? h('div', {
|
|
124
130
|
key: '1',
|
|
@@ -167,7 +173,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
167
173
|
}
|
|
168
174
|
})
|
|
169
175
|
])
|
|
170
|
-
:
|
|
176
|
+
: renderEmptyElement($xeTable)
|
|
171
177
|
]));
|
|
172
178
|
}
|
|
173
179
|
});
|
|
@@ -263,7 +269,8 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
263
269
|
h(VxeUIButtonComponent, {
|
|
264
270
|
props: {
|
|
265
271
|
mode: 'text',
|
|
266
|
-
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore')
|
|
272
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
273
|
+
disabled: !isCustomStatus
|
|
267
274
|
},
|
|
268
275
|
on: {
|
|
269
276
|
click: _vm.resetCustomEvent
|
|
@@ -289,7 +296,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
289
296
|
}
|
|
290
297
|
}),
|
|
291
298
|
customOpts.immediate
|
|
292
|
-
?
|
|
299
|
+
? renderEmptyElement($xeTable)
|
|
293
300
|
: h(VxeUIButtonComponent, {
|
|
294
301
|
props: {
|
|
295
302
|
mode: 'text',
|
|
@@ -313,15 +320,22 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
313
320
|
const VxeUINumberInputComponent = VxeUI.getComponent('VxeInput');
|
|
314
321
|
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
315
322
|
const $xeTableCustomPanel = _vm;
|
|
323
|
+
const props = _vm;
|
|
316
324
|
const $xeTable = _vm.$xeTable;
|
|
317
|
-
const
|
|
318
|
-
const
|
|
325
|
+
const tableProps = $xeTable;
|
|
326
|
+
const reactData = $xeTable;
|
|
327
|
+
const { customStore } = props;
|
|
328
|
+
const { resizable: allResizable } = tableProps;
|
|
329
|
+
const { isCustomStatus, customColumnList } = reactData;
|
|
330
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
319
331
|
const { mode, modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts;
|
|
332
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
320
333
|
const { maxFixedSize } = columnOpts;
|
|
321
334
|
const resizableOpts = $xeTable.computeResizableOpts;
|
|
322
335
|
const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts;
|
|
323
336
|
const modalOpts = Object.assign({}, modalOptions);
|
|
324
337
|
const drawerOpts = Object.assign({}, drawerOptions);
|
|
338
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
325
339
|
const slots = customOpts.slots || {};
|
|
326
340
|
const headerSlot = slots.header;
|
|
327
341
|
const topSlot = slots.top;
|
|
@@ -331,12 +345,14 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
331
345
|
const trVNs = [];
|
|
332
346
|
const isAllChecked = customStore.isAll;
|
|
333
347
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
348
|
+
const dragColumn = _vm.dragColumn;
|
|
334
349
|
const params = {
|
|
335
350
|
$table: $xeTable,
|
|
336
351
|
$grid: $xeTable.xegrid,
|
|
337
352
|
columns: customColumnList,
|
|
338
353
|
isAllChecked,
|
|
339
|
-
isAllIndeterminate
|
|
354
|
+
isAllIndeterminate,
|
|
355
|
+
isCustomStatus
|
|
340
356
|
};
|
|
341
357
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
342
358
|
const isVisible = visibleMethod ? visibleMethod({ column }) : true;
|
|
@@ -405,7 +421,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
405
421
|
})
|
|
406
422
|
])
|
|
407
423
|
])
|
|
408
|
-
:
|
|
424
|
+
: renderEmptyElement($xeTable),
|
|
409
425
|
allowSort
|
|
410
426
|
? h('td', {
|
|
411
427
|
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
@@ -431,7 +447,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
431
447
|
])
|
|
432
448
|
: h('span', '-')
|
|
433
449
|
])
|
|
434
|
-
:
|
|
450
|
+
: renderEmptyElement($xeTable),
|
|
435
451
|
h('td', {
|
|
436
452
|
class: 'vxe-table-custom-popup--column-item col--name'
|
|
437
453
|
}, [
|
|
@@ -475,7 +491,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
475
491
|
})
|
|
476
492
|
: renderEmptyElement($xeTableCustomPanel))
|
|
477
493
|
])
|
|
478
|
-
:
|
|
494
|
+
: renderEmptyElement($xeTable),
|
|
479
495
|
allowFixed
|
|
480
496
|
? h('td', {
|
|
481
497
|
class: 'vxe-table-custom-popup--column-item col--fixed'
|
|
@@ -501,7 +517,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
501
517
|
}
|
|
502
518
|
})
|
|
503
519
|
])
|
|
504
|
-
:
|
|
520
|
+
: renderEmptyElement($xeTable)
|
|
505
521
|
]));
|
|
506
522
|
}
|
|
507
523
|
});
|
|
@@ -528,12 +544,12 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
528
544
|
? h('col', {
|
|
529
545
|
class: 'vxe-table-custom-popup--table-col-seq'
|
|
530
546
|
})
|
|
531
|
-
:
|
|
547
|
+
: renderEmptyElement($xeTable),
|
|
532
548
|
allowSort
|
|
533
549
|
? h('col', {
|
|
534
550
|
class: 'vxe-table-custom-popup--table-col-sort'
|
|
535
551
|
})
|
|
536
|
-
:
|
|
552
|
+
: renderEmptyElement($xeTable),
|
|
537
553
|
h('col', {
|
|
538
554
|
class: 'vxe-table-custom-popup--table-col-title'
|
|
539
555
|
}),
|
|
@@ -541,12 +557,12 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
541
557
|
? h('col', {
|
|
542
558
|
class: 'vxe-table-custom-popup--table-col-width'
|
|
543
559
|
})
|
|
544
|
-
:
|
|
560
|
+
: renderEmptyElement($xeTable),
|
|
545
561
|
allowFixed
|
|
546
562
|
? h('col', {
|
|
547
563
|
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
548
564
|
})
|
|
549
|
-
:
|
|
565
|
+
: renderEmptyElement($xeTable)
|
|
550
566
|
]),
|
|
551
567
|
h('thead', {}, [
|
|
552
568
|
h('tr', {}, [
|
|
@@ -572,7 +588,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
572
588
|
}, getI18n('vxe.toolbar.customAll'))
|
|
573
589
|
])
|
|
574
590
|
])
|
|
575
|
-
:
|
|
591
|
+
: renderEmptyElement($xeTable),
|
|
576
592
|
allowSort
|
|
577
593
|
? h('th', {}, [
|
|
578
594
|
h('span', {
|
|
@@ -595,14 +611,14 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
595
611
|
})
|
|
596
612
|
: renderEmptyElement($xeTableCustomPanel)
|
|
597
613
|
])
|
|
598
|
-
:
|
|
614
|
+
: renderEmptyElement($xeTable),
|
|
599
615
|
h('th', {}, getI18n('vxe.custom.setting.colTitle')),
|
|
600
616
|
allowResizable
|
|
601
617
|
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
|
602
|
-
:
|
|
618
|
+
: renderEmptyElement($xeTable),
|
|
603
619
|
allowFixed
|
|
604
620
|
? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
|
605
|
-
:
|
|
621
|
+
: renderEmptyElement($xeTable)
|
|
606
622
|
])
|
|
607
623
|
]),
|
|
608
624
|
h('transition-group', {
|
|
@@ -622,7 +638,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
622
638
|
h('div', {
|
|
623
639
|
ref: 'dragHintElemRef',
|
|
624
640
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
625
|
-
}, getI18n('vxe.custom.cstmDragTarget', [
|
|
641
|
+
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn ? dragColumn.getTitle() : '']))
|
|
626
642
|
]);
|
|
627
643
|
},
|
|
628
644
|
footer: () => {
|
|
@@ -634,7 +650,8 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
634
650
|
}, [
|
|
635
651
|
h(VxeUIButtonComponent, {
|
|
636
652
|
props: {
|
|
637
|
-
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore')
|
|
653
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore'),
|
|
654
|
+
disabled: !isCustomStatus
|
|
638
655
|
},
|
|
639
656
|
on: {
|
|
640
657
|
click: _vm.resetCustomEvent
|
package/es/table/render/index.js
CHANGED
|
@@ -562,20 +562,40 @@ renderer.mixin({
|
|
|
562
562
|
tableAutoFocus: 'input',
|
|
563
563
|
renderTableEdit: defaultEditRender,
|
|
564
564
|
renderTableCell(h, renderOpts, params) {
|
|
565
|
-
var _a;
|
|
566
565
|
const { props = {} } = renderOpts;
|
|
567
566
|
const { row, column } = params;
|
|
568
|
-
const
|
|
567
|
+
const { type } = props;
|
|
569
568
|
let cellValue = XEUtils.get(row, column.field);
|
|
570
569
|
if (cellValue) {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
570
|
+
if (type === 'float') {
|
|
571
|
+
const digits = props.digits || getConfig().numberInput.digits || 1;
|
|
572
|
+
cellValue = XEUtils.toFixed(XEUtils.floor(cellValue, digits), digits);
|
|
573
|
+
}
|
|
574
|
+
else if (type === 'amount') {
|
|
575
|
+
const digits = props.digits || getConfig().numberInput.digits || 2;
|
|
576
|
+
cellValue = XEUtils.commafy(XEUtils.toNumber(cellValue), { digits });
|
|
575
577
|
}
|
|
576
578
|
}
|
|
577
579
|
return getCellLabelVNs(h, renderOpts, params, cellValue);
|
|
578
580
|
},
|
|
581
|
+
renderTableFooter(h, renderOpts, params) {
|
|
582
|
+
const { props = {} } = renderOpts;
|
|
583
|
+
const { row, column, _columnIndex } = params;
|
|
584
|
+
const { type } = props;
|
|
585
|
+
// 兼容老模式
|
|
586
|
+
const cellValue = XEUtils.isArray(row) ? row[_columnIndex] : XEUtils.get(row, column.field);
|
|
587
|
+
if (XEUtils.isNumber(cellValue)) {
|
|
588
|
+
if (type === 'float') {
|
|
589
|
+
const digits = props.digits || getConfig().numberInput.digits || 1;
|
|
590
|
+
return XEUtils.toFixed(XEUtils.floor(cellValue, digits), digits);
|
|
591
|
+
}
|
|
592
|
+
else if (type === 'amount') {
|
|
593
|
+
const digits = props.digits || getConfig().numberInput.digits || 2;
|
|
594
|
+
return XEUtils.commafy(XEUtils.toNumber(cellValue), { digits });
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return getFuncText(cellValue, 1);
|
|
598
|
+
},
|
|
579
599
|
renderTableDefault: defaultEditRender,
|
|
580
600
|
renderTableFilter: defaultFilterRender,
|
|
581
601
|
tableFilterDefaultMethod: handleInputFilterMethod
|
package/es/table/src/body.js
CHANGED
|
@@ -330,12 +330,12 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
330
330
|
if (editConfig) {
|
|
331
331
|
isNewRow = $xeTable.isInsertByRow(row);
|
|
332
332
|
}
|
|
333
|
-
if (treeConfig && !scrollYLoad && !
|
|
333
|
+
if (treeConfig && !scrollYLoad && !transform) {
|
|
334
334
|
rowChildren = row[childrenField];
|
|
335
335
|
isExpandTree = rowChildren && rowChildren.length && !!treeExpandedMaps[rowid];
|
|
336
336
|
}
|
|
337
337
|
// 拖拽行事件
|
|
338
|
-
if (rowOpts.drag && !
|
|
338
|
+
if (rowOpts.drag && (!treeConfig || transform)) {
|
|
339
339
|
trOn.dragstart = (evnt) => {
|
|
340
340
|
$xeTable.handleRowDragDragstartEvent(evnt);
|
|
341
341
|
};
|
package/es/table/src/cell.js
CHANGED
|
@@ -75,11 +75,16 @@ function renderCellBaseVNs(h, params, content) {
|
|
|
75
75
|
const { treeConfig, dragConfig } = tableProps;
|
|
76
76
|
const rowOpts = $table.computeRowOpts;
|
|
77
77
|
const rowDragOpts = $table.computeRowDragOpts;
|
|
78
|
-
const { showIcon, visibleMethod } = rowDragOpts;
|
|
78
|
+
const { showIcon, isCrossDrag, visibleMethod } = rowDragOpts;
|
|
79
79
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
|
|
80
80
|
const vns = XEUtils.isArray(content) ? content : [content];
|
|
81
81
|
if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
|
|
82
|
-
if (
|
|
82
|
+
if (treeConfig) {
|
|
83
|
+
if (isCrossDrag || !level) {
|
|
84
|
+
vns.unshift(renderCellDragIcon(h, params));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
83
88
|
vns.unshift(renderCellDragIcon(h, params));
|
|
84
89
|
}
|
|
85
90
|
}
|
package/es/table/src/header.js
CHANGED
|
@@ -42,7 +42,7 @@ const renderRows = (h, _vm, cols, $rowIndex) => {
|
|
|
42
42
|
thOns.mousedown = (evnt) => $xetable.triggerHeaderCellMousedownEvent(evnt, params);
|
|
43
43
|
}
|
|
44
44
|
// 拖拽行事件
|
|
45
|
-
if (columnOpts.drag
|
|
45
|
+
if (columnOpts.drag) {
|
|
46
46
|
thOns.dragstart = $xetable.handleHeaderCellDragDragstartEvent;
|
|
47
47
|
thOns.dragend = $xetable.handleHeaderCellDragDragendEvent;
|
|
48
48
|
thOns.dragover = $xetable.handleHeaderCellDragDragoverEvent;
|