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
|
@@ -47,6 +47,8 @@ export default {
|
|
|
47
47
|
notExp: '该浏览器不支持导入/导出功能',
|
|
48
48
|
impFields: '导入失败,请检查字段名和数据格式是否正确',
|
|
49
49
|
treeNotImp: '树表格不支持导入',
|
|
50
|
+
treeCrossDrag: '只能拖拽第一层级的数据',
|
|
51
|
+
treeDragChild: '父级数据不能拖拽到自己的子级中',
|
|
50
52
|
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
|
|
51
53
|
},
|
|
52
54
|
table: {
|
|
@@ -67,6 +67,7 @@ export default {
|
|
|
67
67
|
column.visible = column.renderVisible
|
|
68
68
|
}
|
|
69
69
|
})
|
|
70
|
+
reactData.isCustomStatus = true
|
|
70
71
|
reactData.isDragColMove = true
|
|
71
72
|
setTimeout(() => {
|
|
72
73
|
reactData.isDragColMove = false
|
|
@@ -101,7 +102,11 @@ export default {
|
|
|
101
102
|
return $xeTable.$nextTick()
|
|
102
103
|
},
|
|
103
104
|
_resetCustom (options: any) {
|
|
104
|
-
const
|
|
105
|
+
const $xeTable = this
|
|
106
|
+
const reactData = $xeTable
|
|
107
|
+
const internalData = $xeTable
|
|
108
|
+
|
|
109
|
+
const { collectColumn, customOpts } = internalData
|
|
105
110
|
const { checkMethod } = customOpts
|
|
106
111
|
const opts = Object.assign({
|
|
107
112
|
visible: true,
|
|
@@ -124,8 +129,9 @@ export default {
|
|
|
124
129
|
}
|
|
125
130
|
column.renderResizeWidth = column.renderWidth
|
|
126
131
|
})
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
reactData.isCustomStatus = false
|
|
133
|
+
$xeTable.saveCustomStore('reset')
|
|
134
|
+
return $xeTable.handleCustom()
|
|
129
135
|
},
|
|
130
136
|
_toggleCustomAllCheckbox () {
|
|
131
137
|
const { customStore } = this
|
|
@@ -28,11 +28,17 @@ function updateDropHint (_vm: any, evnt: any) {
|
|
|
28
28
|
const renderSimplePanel = (h: CreateElement, _vm: any) => {
|
|
29
29
|
const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
|
|
30
30
|
|
|
31
|
+
const props = _vm
|
|
32
|
+
|
|
31
33
|
const $xeTable = _vm.$xeTable
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
+
const reactData = $xeTable
|
|
35
|
+
|
|
36
|
+
const { customStore } = props
|
|
37
|
+
const { isCustomStatus, customColumnList } = reactData
|
|
38
|
+
const customOpts = $xeTable.computeCustomOpts
|
|
34
39
|
const { maxHeight } = customStore
|
|
35
40
|
const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts
|
|
41
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn
|
|
36
42
|
const slots = customOpts.slots || {}
|
|
37
43
|
const headerSlot = slots.header
|
|
38
44
|
const topSlot = slots.top
|
|
@@ -41,19 +47,21 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
|
|
|
41
47
|
const footerSlot = slots.footer
|
|
42
48
|
const colVNs: any[] = []
|
|
43
49
|
const customWrapperOns: any = {}
|
|
50
|
+
const isAllChecked = customStore.isAll
|
|
51
|
+
const isAllIndeterminate = customStore.isIndeterminate
|
|
52
|
+
const dragColumn = _vm.dragColumn
|
|
44
53
|
// hover 触发
|
|
45
54
|
if (trigger === 'hover') {
|
|
46
55
|
customWrapperOns.mouseenter = _vm.handleWrapperMouseenterEvent
|
|
47
56
|
customWrapperOns.mouseleave = _vm.handleWrapperMouseleaveEvent
|
|
48
57
|
}
|
|
49
|
-
const isAllChecked = customStore.isAll
|
|
50
|
-
const isAllIndeterminate = customStore.isIndeterminate
|
|
51
58
|
const params = {
|
|
52
59
|
$table: $xeTable,
|
|
53
60
|
$grid: $xeTable.xegrid,
|
|
54
61
|
columns: customColumnList,
|
|
55
62
|
isAllChecked,
|
|
56
|
-
isAllIndeterminate
|
|
63
|
+
isAllIndeterminate,
|
|
64
|
+
isCustomStatus
|
|
57
65
|
}
|
|
58
66
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
59
67
|
const isVisible = visibleMethod ? visibleMethod({ column }) : true
|
|
@@ -102,7 +110,7 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
|
|
|
102
110
|
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
103
111
|
})
|
|
104
112
|
])
|
|
105
|
-
:
|
|
113
|
+
: renderEmptyElement($xeTable),
|
|
106
114
|
allowSort && column.level === 1
|
|
107
115
|
? h('div', {
|
|
108
116
|
class: 'vxe-table-custom--sort-option'
|
|
@@ -126,7 +134,7 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
|
|
|
126
134
|
})
|
|
127
135
|
])
|
|
128
136
|
])
|
|
129
|
-
:
|
|
137
|
+
: renderEmptyElement($xeTable),
|
|
130
138
|
column.type === 'html'
|
|
131
139
|
? h('div', {
|
|
132
140
|
key: '1',
|
|
@@ -175,7 +183,7 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
|
|
|
175
183
|
}
|
|
176
184
|
})
|
|
177
185
|
])
|
|
178
|
-
:
|
|
186
|
+
: renderEmptyElement($xeTable)
|
|
179
187
|
])
|
|
180
188
|
)
|
|
181
189
|
}
|
|
@@ -272,7 +280,8 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
|
|
|
272
280
|
h(VxeUIButtonComponent, {
|
|
273
281
|
props: {
|
|
274
282
|
mode: 'text',
|
|
275
|
-
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore')
|
|
283
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
284
|
+
disabled: !isCustomStatus
|
|
276
285
|
},
|
|
277
286
|
on: {
|
|
278
287
|
click: _vm.resetCustomEvent
|
|
@@ -298,7 +307,7 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
|
|
|
298
307
|
}
|
|
299
308
|
}),
|
|
300
309
|
customOpts.immediate
|
|
301
|
-
?
|
|
310
|
+
? renderEmptyElement($xeTable)
|
|
302
311
|
: h(VxeUIButtonComponent, {
|
|
303
312
|
props: {
|
|
304
313
|
mode: 'text',
|
|
@@ -324,15 +333,24 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
324
333
|
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
325
334
|
const $xeTableCustomPanel = _vm
|
|
326
335
|
|
|
336
|
+
const props = _vm
|
|
337
|
+
|
|
327
338
|
const $xeTable = _vm.$xeTable
|
|
328
|
-
const
|
|
329
|
-
const
|
|
339
|
+
const tableProps = $xeTable
|
|
340
|
+
const reactData = $xeTable
|
|
341
|
+
|
|
342
|
+
const { customStore } = props
|
|
343
|
+
const { resizable: allResizable } = tableProps
|
|
344
|
+
const { isCustomStatus, customColumnList } = reactData
|
|
345
|
+
const customOpts = $xeTable.computeCustomOpts
|
|
330
346
|
const { mode, modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts
|
|
347
|
+
const columnOpts = $xeTable.computeColumnOpts
|
|
331
348
|
const { maxFixedSize } = columnOpts
|
|
332
349
|
const resizableOpts = $xeTable.computeResizableOpts
|
|
333
350
|
const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts
|
|
334
351
|
const modalOpts = Object.assign({}, modalOptions)
|
|
335
352
|
const drawerOpts = Object.assign({}, drawerOptions)
|
|
353
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn
|
|
336
354
|
const slots = customOpts.slots || {}
|
|
337
355
|
const headerSlot = slots.header
|
|
338
356
|
const topSlot = slots.top
|
|
@@ -342,12 +360,14 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
342
360
|
const trVNs: VNode[] = []
|
|
343
361
|
const isAllChecked = customStore.isAll
|
|
344
362
|
const isAllIndeterminate = customStore.isIndeterminate
|
|
363
|
+
const dragColumn = _vm.dragColumn
|
|
345
364
|
const params = {
|
|
346
365
|
$table: $xeTable,
|
|
347
366
|
$grid: $xeTable.xegrid,
|
|
348
367
|
columns: customColumnList,
|
|
349
368
|
isAllChecked,
|
|
350
|
-
isAllIndeterminate
|
|
369
|
+
isAllIndeterminate,
|
|
370
|
+
isCustomStatus
|
|
351
371
|
}
|
|
352
372
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
353
373
|
const isVisible = visibleMethod ? visibleMethod({ column }) : true
|
|
@@ -418,7 +438,7 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
418
438
|
})
|
|
419
439
|
])
|
|
420
440
|
])
|
|
421
|
-
:
|
|
441
|
+
: renderEmptyElement($xeTable),
|
|
422
442
|
allowSort
|
|
423
443
|
? h('td', {
|
|
424
444
|
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
@@ -444,7 +464,7 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
444
464
|
])
|
|
445
465
|
: h('span', '-')
|
|
446
466
|
])
|
|
447
|
-
:
|
|
467
|
+
: renderEmptyElement($xeTable),
|
|
448
468
|
h('td', {
|
|
449
469
|
class: 'vxe-table-custom-popup--column-item col--name'
|
|
450
470
|
}, [
|
|
@@ -491,7 +511,7 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
491
511
|
: renderEmptyElement($xeTableCustomPanel)
|
|
492
512
|
)
|
|
493
513
|
])
|
|
494
|
-
:
|
|
514
|
+
: renderEmptyElement($xeTable),
|
|
495
515
|
allowFixed
|
|
496
516
|
? h('td', {
|
|
497
517
|
class: 'vxe-table-custom-popup--column-item col--fixed'
|
|
@@ -517,7 +537,7 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
517
537
|
}
|
|
518
538
|
})
|
|
519
539
|
])
|
|
520
|
-
:
|
|
540
|
+
: renderEmptyElement($xeTable)
|
|
521
541
|
])
|
|
522
542
|
)
|
|
523
543
|
}
|
|
@@ -545,12 +565,12 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
545
565
|
? h('col', {
|
|
546
566
|
class: 'vxe-table-custom-popup--table-col-seq'
|
|
547
567
|
})
|
|
548
|
-
:
|
|
568
|
+
: renderEmptyElement($xeTable),
|
|
549
569
|
allowSort
|
|
550
570
|
? h('col', {
|
|
551
571
|
class: 'vxe-table-custom-popup--table-col-sort'
|
|
552
572
|
})
|
|
553
|
-
:
|
|
573
|
+
: renderEmptyElement($xeTable),
|
|
554
574
|
h('col', {
|
|
555
575
|
class: 'vxe-table-custom-popup--table-col-title'
|
|
556
576
|
}),
|
|
@@ -558,12 +578,12 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
558
578
|
? h('col', {
|
|
559
579
|
class: 'vxe-table-custom-popup--table-col-width'
|
|
560
580
|
})
|
|
561
|
-
:
|
|
581
|
+
: renderEmptyElement($xeTable),
|
|
562
582
|
allowFixed
|
|
563
583
|
? h('col', {
|
|
564
584
|
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
565
585
|
})
|
|
566
|
-
:
|
|
586
|
+
: renderEmptyElement($xeTable)
|
|
567
587
|
]),
|
|
568
588
|
h('thead', {}, [
|
|
569
589
|
h('tr', {}, [
|
|
@@ -590,7 +610,7 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
590
610
|
}, getI18n('vxe.toolbar.customAll'))
|
|
591
611
|
])
|
|
592
612
|
])
|
|
593
|
-
:
|
|
613
|
+
: renderEmptyElement($xeTable),
|
|
594
614
|
allowSort
|
|
595
615
|
? h('th', {}, [
|
|
596
616
|
h('span', {
|
|
@@ -613,14 +633,14 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
613
633
|
})
|
|
614
634
|
: renderEmptyElement($xeTableCustomPanel)
|
|
615
635
|
])
|
|
616
|
-
:
|
|
636
|
+
: renderEmptyElement($xeTable),
|
|
617
637
|
h('th', {}, getI18n('vxe.custom.setting.colTitle')),
|
|
618
638
|
allowResizable
|
|
619
639
|
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
|
620
|
-
:
|
|
640
|
+
: renderEmptyElement($xeTable),
|
|
621
641
|
allowFixed
|
|
622
642
|
? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
|
623
|
-
:
|
|
643
|
+
: renderEmptyElement($xeTable)
|
|
624
644
|
])
|
|
625
645
|
]),
|
|
626
646
|
h('transition-group', {
|
|
@@ -640,7 +660,7 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
640
660
|
h('div', {
|
|
641
661
|
ref: 'dragHintElemRef',
|
|
642
662
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
643
|
-
}, getI18n('vxe.custom.cstmDragTarget', [
|
|
663
|
+
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn ? dragColumn.getTitle() : '']))
|
|
644
664
|
])
|
|
645
665
|
},
|
|
646
666
|
footer: () => {
|
|
@@ -652,7 +672,8 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
652
672
|
}, [
|
|
653
673
|
h(VxeUIButtonComponent, {
|
|
654
674
|
props: {
|
|
655
|
-
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore')
|
|
675
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore'),
|
|
676
|
+
disabled: !isCustomStatus
|
|
656
677
|
},
|
|
657
678
|
on: {
|
|
658
679
|
click: _vm.resetCustomEvent
|
|
@@ -617,17 +617,36 @@ renderer.mixin({
|
|
|
617
617
|
renderTableCell (h, renderOpts, params) {
|
|
618
618
|
const { props = {} } = renderOpts
|
|
619
619
|
const { row, column } = params
|
|
620
|
-
const
|
|
620
|
+
const { type } = props
|
|
621
621
|
let cellValue = XEUtils.get(row, column.field)
|
|
622
622
|
if (cellValue) {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
623
|
+
if (type === 'float') {
|
|
624
|
+
const digits = props.digits || getConfig().numberInput.digits || 1
|
|
625
|
+
cellValue = XEUtils.toFixed(XEUtils.floor(cellValue, digits), digits)
|
|
626
|
+
} else if (type === 'amount') {
|
|
627
|
+
const digits = props.digits || getConfig().numberInput.digits || 2
|
|
628
|
+
cellValue = XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
|
|
627
629
|
}
|
|
628
630
|
}
|
|
629
631
|
return getCellLabelVNs(h, renderOpts, params, cellValue)
|
|
630
632
|
},
|
|
633
|
+
renderTableFooter (h, renderOpts, params) {
|
|
634
|
+
const { props = {} } = renderOpts
|
|
635
|
+
const { row, column, _columnIndex } = params
|
|
636
|
+
const { type } = props
|
|
637
|
+
// 兼容老模式
|
|
638
|
+
const cellValue = XEUtils.isArray(row) ? row[_columnIndex] : XEUtils.get(row, column.field)
|
|
639
|
+
if (XEUtils.isNumber(cellValue)) {
|
|
640
|
+
if (type === 'float') {
|
|
641
|
+
const digits = props.digits || getConfig().numberInput.digits || 1
|
|
642
|
+
return XEUtils.toFixed(XEUtils.floor(cellValue, digits), digits)
|
|
643
|
+
} else if (type === 'amount') {
|
|
644
|
+
const digits = props.digits || getConfig().numberInput.digits || 2
|
|
645
|
+
return XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
return getFuncText(cellValue, 1)
|
|
649
|
+
},
|
|
631
650
|
renderTableDefault: defaultEditRender,
|
|
632
651
|
renderTableFilter: defaultFilterRender,
|
|
633
652
|
tableFilterDefaultMethod: handleInputFilterMethod
|
|
@@ -407,12 +407,12 @@ function renderRows (h: CreateElement, _vm: any, $xeTable: any, fixedType: any,
|
|
|
407
407
|
if (editConfig) {
|
|
408
408
|
isNewRow = $xeTable.isInsertByRow(row)
|
|
409
409
|
}
|
|
410
|
-
if (treeConfig && !scrollYLoad && !
|
|
410
|
+
if (treeConfig && !scrollYLoad && !transform) {
|
|
411
411
|
rowChildren = row[childrenField]
|
|
412
412
|
isExpandTree = rowChildren && rowChildren.length && !!treeExpandedMaps[rowid]
|
|
413
413
|
}
|
|
414
414
|
// 拖拽行事件
|
|
415
|
-
if (rowOpts.drag && !
|
|
415
|
+
if (rowOpts.drag && (!treeConfig || transform)) {
|
|
416
416
|
trOn.dragstart = (evnt: DragEvent) => {
|
|
417
417
|
$xeTable.handleRowDragDragstartEvent(evnt)
|
|
418
418
|
}
|
|
@@ -83,11 +83,17 @@ function renderCellBaseVNs (h: CreateElement, params: any, content: any) {
|
|
|
83
83
|
const { treeConfig, dragConfig } = tableProps
|
|
84
84
|
const rowOpts = $table.computeRowOpts
|
|
85
85
|
const rowDragOpts = $table.computeRowDragOpts
|
|
86
|
-
const { showIcon, visibleMethod } = rowDragOpts
|
|
86
|
+
const { showIcon, isCrossDrag, visibleMethod } = rowDragOpts
|
|
87
87
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null)
|
|
88
88
|
const vns: any[] = XEUtils.isArray(content) ? content : [content]
|
|
89
89
|
if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
|
|
90
|
-
if (
|
|
90
|
+
if (treeConfig) {
|
|
91
|
+
if (isCrossDrag || !level) {
|
|
92
|
+
vns.unshift(
|
|
93
|
+
renderCellDragIcon(h, params)
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
91
97
|
vns.unshift(
|
|
92
98
|
renderCellDragIcon(h, params)
|
|
93
99
|
)
|
|
@@ -49,7 +49,7 @@ const renderRows = (h: CreateElement, _vm: any, cols: VxeTableDefines.ColumnInfo
|
|
|
49
49
|
thOns.mousedown = (evnt: any) => $xetable.triggerHeaderCellMousedownEvent(evnt, params)
|
|
50
50
|
}
|
|
51
51
|
// 拖拽行事件
|
|
52
|
-
if (columnOpts.drag
|
|
52
|
+
if (columnOpts.drag) {
|
|
53
53
|
thOns.dragstart = $xetable.handleHeaderCellDragDragstartEvent
|
|
54
54
|
thOns.dragend = $xetable.handleHeaderCellDragDragendEvent
|
|
55
55
|
thOns.dragover = $xetable.handleHeaderCellDragDragoverEvent
|