vxe-table 3.15.38 → 3.15.40
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 +73 -49
- package/es/{iconfont.1749796837661.ttf → iconfont.1750082820248.ttf} +0 -0
- package/es/iconfont.1750082820248.woff +0 -0
- package/es/iconfont.1750082820248.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +6 -0
- package/es/locale/lang/de-DE.js +6 -0
- package/es/locale/lang/en-US.js +6 -0
- package/es/locale/lang/es-ES.js +6 -0
- package/es/locale/lang/fr-FR.js +6 -0
- package/es/locale/lang/hu-HU.js +6 -0
- package/es/locale/lang/hy-AM.js +6 -0
- package/es/locale/lang/id-ID.js +6 -0
- package/es/locale/lang/it-IT.js +6 -0
- package/es/locale/lang/ja-JP.js +6 -0
- package/es/locale/lang/ko-KR.js +6 -0
- package/es/locale/lang/ms-MY.js +6 -0
- package/es/locale/lang/nb-NO.js +6 -0
- package/es/locale/lang/pt-BR.js +6 -0
- package/es/locale/lang/ru-RU.js +6 -0
- package/es/locale/lang/th-TH.js +6 -0
- package/es/locale/lang/ug-CN.js +6 -0
- package/es/locale/lang/uk-UA.js +6 -0
- package/es/locale/lang/uz-UZ.js +6 -0
- package/es/locale/lang/vi-VN.js +6 -0
- package/es/locale/lang/zh-CHT.js +6 -0
- package/es/locale/lang/zh-CN.js +6 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +29 -3
- package/es/table/module/custom/panel.js +118 -105
- package/es/table/src/body.js +9 -6
- package/es/table/src/methods.js +34 -26
- package/es/table/src/props.js +32 -8
- package/es/table/src/table.js +57 -38
- package/es/table/style.css +22 -3
- 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 +22 -3
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +81 -82
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/{iconfont.1749796837661.ttf → iconfont.1750082820248.ttf} +0 -0
- package/lib/iconfont.1750082820248.woff +0 -0
- package/lib/iconfont.1750082820248.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +285 -187
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +6 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +6 -0
- package/lib/locale/lang/de-DE.js +6 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +6 -0
- package/lib/locale/lang/en-US.js +6 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +6 -0
- package/lib/locale/lang/es-ES.js +6 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +6 -0
- package/lib/locale/lang/fr-FR.js +6 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +6 -0
- package/lib/locale/lang/hu-HU.js +6 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +6 -0
- package/lib/locale/lang/hy-AM.js +6 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +6 -0
- package/lib/locale/lang/id-ID.js +6 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +6 -0
- package/lib/locale/lang/it-IT.js +6 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +6 -0
- package/lib/locale/lang/ja-JP.js +6 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +6 -0
- package/lib/locale/lang/ko-KR.js +6 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +6 -0
- package/lib/locale/lang/ms-MY.js +6 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +6 -0
- package/lib/locale/lang/nb-NO.js +6 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +6 -0
- package/lib/locale/lang/pt-BR.js +6 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +6 -0
- package/lib/locale/lang/ru-RU.js +6 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +6 -0
- package/lib/locale/lang/th-TH.js +6 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +6 -0
- package/lib/locale/lang/ug-CN.js +6 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +6 -0
- package/lib/locale/lang/uk-UA.js +6 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +6 -0
- package/lib/locale/lang/uz-UZ.js +6 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +6 -0
- package/lib/locale/lang/vi-VN.js +6 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +6 -0
- package/lib/locale/lang/zh-CHT.js +6 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +6 -0
- package/lib/locale/lang/zh-CN.js +6 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +6 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +32 -5
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +14 -2
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/body.js +12 -12
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +38 -25
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +32 -8
- package/lib/table/src/table.js +64 -50
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +22 -3
- 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 +22 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +93 -54
- package/packages/locale/lang/ar-EG.ts +6 -0
- package/packages/locale/lang/de-DE.ts +6 -0
- package/packages/locale/lang/en-US.ts +6 -0
- package/packages/locale/lang/es-ES.ts +6 -0
- package/packages/locale/lang/fr-FR.ts +6 -0
- package/packages/locale/lang/hu-HU.ts +6 -0
- package/packages/locale/lang/hy-AM.ts +6 -0
- package/packages/locale/lang/id-ID.ts +6 -0
- package/packages/locale/lang/it-IT.ts +6 -0
- package/packages/locale/lang/ja-JP.ts +6 -0
- package/packages/locale/lang/ko-KR.ts +6 -0
- package/packages/locale/lang/ms-MY.ts +6 -0
- package/packages/locale/lang/nb-NO.ts +6 -0
- package/packages/locale/lang/pt-BR.ts +6 -0
- package/packages/locale/lang/ru-RU.ts +6 -0
- package/packages/locale/lang/th-TH.ts +6 -0
- package/packages/locale/lang/ug-CN.ts +6 -0
- package/packages/locale/lang/uk-UA.ts +6 -0
- package/packages/locale/lang/uz-UZ.ts +6 -0
- package/packages/locale/lang/vi-VN.ts +6 -0
- package/packages/locale/lang/zh-CHT.ts +6 -0
- package/packages/locale/lang/zh-CN.ts +6 -0
- package/packages/table/module/custom/mixin.ts +27 -3
- package/packages/table/module/custom/panel.ts +119 -106
- package/packages/table/src/body.ts +14 -11
- package/packages/table/src/cell.ts +12 -12
- package/packages/table/src/methods.ts +35 -26
- package/packages/table/src/props.ts +32 -8
- package/packages/table/src/table.ts +76 -49
- package/packages/ui/index.ts +11 -0
- package/styles/components/icon.scss +13 -1
- package/styles/components/table-module/custom.scss +9 -2
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/es/iconfont.1749796837661.woff +0 -0
- package/es/iconfont.1749796837661.woff2 +0 -0
- package/lib/iconfont.1749796837661.woff +0 -0
- package/lib/iconfont.1749796837661.woff2 +0 -0
|
@@ -100,10 +100,12 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
|
|
|
100
100
|
const props = _vm
|
|
101
101
|
|
|
102
102
|
const $xeTable = _vm.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
|
|
103
|
+
const tableProps = $xeTable
|
|
103
104
|
const reactData = $xeTable as unknown as TableReactData
|
|
104
105
|
const $xeGrid = $xeTable.$xeGrid
|
|
105
106
|
|
|
106
107
|
const { customStore } = props
|
|
108
|
+
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps
|
|
107
109
|
const { isCustomStatus, customColumnList } = reactData
|
|
108
110
|
const customOpts = $xeTable.computeCustomOpts
|
|
109
111
|
const { immediate } = customOpts
|
|
@@ -276,124 +278,135 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
|
|
|
276
278
|
: {}
|
|
277
279
|
}, customStore.visible
|
|
278
280
|
? [
|
|
281
|
+
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
|
|
282
|
+
? h($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
283
|
+
props: {
|
|
284
|
+
customStore
|
|
285
|
+
}
|
|
286
|
+
})
|
|
287
|
+
: renderEmptyElement($xeTable),
|
|
279
288
|
h('div', {
|
|
280
|
-
class: 'vxe-table-custom--
|
|
281
|
-
},
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
h('
|
|
288
|
-
class: 'vxe-table-custom--
|
|
289
|
+
class: 'vxe-table-custom--handle-wrapper'
|
|
290
|
+
}, [
|
|
291
|
+
h('div', {
|
|
292
|
+
class: 'vxe-table-custom--header'
|
|
293
|
+
}, headerSlot
|
|
294
|
+
? $xeTable.callSlot(headerSlot, params, h)
|
|
295
|
+
: [
|
|
296
|
+
h('ul', {
|
|
297
|
+
class: 'vxe-table-custom--panel-list'
|
|
289
298
|
}, [
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
|
|
299
|
+
h('li', {
|
|
300
|
+
class: 'vxe-table-custom--option'
|
|
301
|
+
}, [
|
|
302
|
+
allowVisible
|
|
303
|
+
? h('div', {
|
|
304
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
305
|
+
'is--checked': isAllChecked,
|
|
306
|
+
'is--indeterminate': isAllIndeterminate
|
|
307
|
+
}],
|
|
308
|
+
attrs: {
|
|
309
|
+
title: getI18n('vxe.table.allTitle')
|
|
310
|
+
},
|
|
311
|
+
on: {
|
|
312
|
+
click: _vm.allOptionEvent
|
|
313
|
+
}
|
|
314
|
+
}, [
|
|
315
|
+
h('span', {
|
|
316
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
317
|
+
}),
|
|
318
|
+
h('span', {
|
|
319
|
+
class: 'vxe-checkbox--label'
|
|
320
|
+
}, getI18n('vxe.toolbar.customAll'))
|
|
321
|
+
])
|
|
322
|
+
: h('span', {
|
|
307
323
|
class: 'vxe-checkbox--label'
|
|
308
|
-
}, getI18n('vxe.
|
|
309
|
-
|
|
310
|
-
: h('span', {
|
|
311
|
-
class: 'vxe-checkbox--label'
|
|
312
|
-
}, getI18n('vxe.table.customTitle'))
|
|
324
|
+
}, getI18n('vxe.table.customTitle'))
|
|
325
|
+
])
|
|
313
326
|
])
|
|
314
|
-
])
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
327
|
+
]),
|
|
328
|
+
h('div', {
|
|
329
|
+
ref: 'bodyElemRef',
|
|
330
|
+
class: 'vxe-table-custom--body'
|
|
331
|
+
}, [
|
|
332
|
+
topSlot
|
|
333
|
+
? h('div', {
|
|
334
|
+
class: 'vxe-table-custom--panel-top'
|
|
335
|
+
}, $xeTable.callSlot(topSlot, params, h))
|
|
336
|
+
: renderEmptyElement($xeTable),
|
|
337
|
+
defaultSlot
|
|
338
|
+
? h('div', {
|
|
339
|
+
class: 'vxe-table-custom--panel-body'
|
|
340
|
+
}, $xeTable.callSlot(defaultSlot, params, h))
|
|
341
|
+
: h('transition-group', {
|
|
342
|
+
class: 'vxe-table-custom--panel-list',
|
|
343
|
+
props: {
|
|
344
|
+
name: 'vxe-table-custom--list',
|
|
345
|
+
tag: 'ul'
|
|
346
|
+
},
|
|
347
|
+
on: customWrapperOns
|
|
348
|
+
}, colVNs),
|
|
349
|
+
bottomSlot
|
|
350
|
+
? h('div', {
|
|
351
|
+
class: 'vxe-table-custom--panel-bottom'
|
|
352
|
+
}, $xeTable.callSlot(bottomSlot, params, h))
|
|
353
|
+
: renderEmptyElement($xeTable),
|
|
354
|
+
renderDragTip(h, _vm)
|
|
355
|
+
]),
|
|
356
|
+
customOpts.showFooter
|
|
338
357
|
? h('div', {
|
|
339
|
-
class: 'vxe-table-custom--
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}, footerSlot
|
|
348
|
-
? $xeTable.callSlot(footerSlot, params, h)
|
|
349
|
-
: [
|
|
350
|
-
h('div', {
|
|
351
|
-
class: 'vxe-table-custom--footer-buttons'
|
|
352
|
-
}, [
|
|
353
|
-
h(VxeUIButtonComponent, {
|
|
354
|
-
props: {
|
|
355
|
-
mode: 'text',
|
|
356
|
-
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
357
|
-
disabled: !isCustomStatus
|
|
358
|
-
},
|
|
359
|
-
on: {
|
|
360
|
-
click: _vm.resetCustomEvent
|
|
361
|
-
}
|
|
362
|
-
}),
|
|
363
|
-
immediate
|
|
364
|
-
? h(VxeUIButtonComponent, {
|
|
365
|
-
props: {
|
|
366
|
-
mode: 'text',
|
|
367
|
-
content: customOpts.closeButtonText || getI18n('vxe.table.customClose')
|
|
368
|
-
},
|
|
369
|
-
on: {
|
|
370
|
-
click: _vm.cancelCloseEvent
|
|
371
|
-
}
|
|
372
|
-
})
|
|
373
|
-
: h(VxeUIButtonComponent, {
|
|
358
|
+
class: 'vxe-table-custom--footer'
|
|
359
|
+
}, footerSlot
|
|
360
|
+
? $xeTable.callSlot(footerSlot, params, h)
|
|
361
|
+
: [
|
|
362
|
+
h('div', {
|
|
363
|
+
class: 'vxe-table-custom--footer-buttons'
|
|
364
|
+
}, [
|
|
365
|
+
h(VxeUIButtonComponent, {
|
|
374
366
|
props: {
|
|
375
367
|
mode: 'text',
|
|
376
|
-
content: customOpts.resetButtonText || getI18n('vxe.table.
|
|
368
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
369
|
+
disabled: !isCustomStatus
|
|
377
370
|
},
|
|
378
371
|
on: {
|
|
379
|
-
click: _vm.
|
|
372
|
+
click: _vm.resetCustomEvent
|
|
380
373
|
}
|
|
381
374
|
}),
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
375
|
+
immediate
|
|
376
|
+
? h(VxeUIButtonComponent, {
|
|
377
|
+
props: {
|
|
378
|
+
mode: 'text',
|
|
379
|
+
content: customOpts.closeButtonText || getI18n('vxe.table.customClose')
|
|
380
|
+
},
|
|
381
|
+
on: {
|
|
382
|
+
click: _vm.cancelCloseEvent
|
|
383
|
+
}
|
|
384
|
+
})
|
|
385
|
+
: h(VxeUIButtonComponent, {
|
|
386
|
+
props: {
|
|
387
|
+
mode: 'text',
|
|
388
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customCancel')
|
|
389
|
+
},
|
|
390
|
+
on: {
|
|
391
|
+
click: _vm.cancelCustomEvent
|
|
392
|
+
}
|
|
393
|
+
}),
|
|
394
|
+
immediate
|
|
395
|
+
? renderEmptyElement($xeTable)
|
|
396
|
+
: h(VxeUIButtonComponent, {
|
|
397
|
+
props: {
|
|
398
|
+
mode: 'text',
|
|
399
|
+
status: 'primary',
|
|
400
|
+
content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm')
|
|
401
|
+
},
|
|
402
|
+
on: {
|
|
403
|
+
click: _vm.confirmCustomEvent
|
|
404
|
+
}
|
|
405
|
+
})
|
|
406
|
+
])
|
|
394
407
|
])
|
|
395
|
-
|
|
396
|
-
|
|
408
|
+
: null
|
|
409
|
+
])
|
|
397
410
|
]
|
|
398
411
|
: [])
|
|
399
412
|
}
|
|
@@ -6,7 +6,7 @@ import { getOffsetSize, calcTreeLine, getRowid, createHandleGetRowId, getCellRes
|
|
|
6
6
|
import { updateCellTitle } from '../../ui/src/dom'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
|
|
9
|
-
import type { VxeTableConstructor, VxeTableDefines, TableInternalData, VxeTablePrivateMethods, TableReactData, VxeComponentStyleType } from '../../../types'
|
|
9
|
+
import type { VxeTableConstructor, VxeTableDefines, TableInternalData, VxeTablePrivateMethods, TableReactData, VxeComponentStyleType, VxeComponentSlotType } from '../../../types'
|
|
10
10
|
|
|
11
11
|
const { getI18n, renderer, renderEmptyElement } = VxeUI
|
|
12
12
|
|
|
@@ -22,7 +22,7 @@ const isVMScrollProcess = ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
22
22
|
return !!(isDragResize || (lastScrollTime && Date.now() < lastScrollTime + (delayHover as number)))
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
function renderLine (h: CreateElement, $xeTable : VxeTableConstructor & VxeTablePrivateMethods, rowid: string, params: VxeTableDefines.CellRenderBodyParams, cellHeight: number) {
|
|
25
|
+
function renderLine (h: CreateElement, $xeTable : VxeTableConstructor & VxeTablePrivateMethods, rowid: string, params: VxeTableDefines.CellRenderBodyParams, cellHeight: number): VxeComponentSlotType[] {
|
|
26
26
|
const tableProps = $xeTable
|
|
27
27
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
28
28
|
|
|
@@ -286,7 +286,7 @@ function renderTdColumn (
|
|
|
286
286
|
if (mEndRow) {
|
|
287
287
|
const meRowRest = fullAllDataRowIdData[getRowid($xeTable, mEndRow)]
|
|
288
288
|
if (meRowRest) {
|
|
289
|
-
cellHeight += meRowRest.oTop - rowRest.oTop
|
|
289
|
+
cellHeight += meRowRest.oTop + getCellRestHeight(meRowRest, cellOpts, rowOpts, defaultRowHeight) - rowRest.oTop - getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
}
|
|
@@ -310,7 +310,7 @@ function renderTdColumn (
|
|
|
310
310
|
tcStyle.minHeight = `${cellHeight}px`
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const tdVNs = []
|
|
313
|
+
const tdVNs: VxeComponentSlotType[] = []
|
|
314
314
|
if (fixedHiddenColumn && isAllOverflow) {
|
|
315
315
|
tdVNs.push(
|
|
316
316
|
h('div', {
|
|
@@ -614,7 +614,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
614
614
|
const { showOverflow } = expandColumn || {}
|
|
615
615
|
const colid = expandColumn.id
|
|
616
616
|
const colRest = fullColumnIdData[colid] || {}
|
|
617
|
-
const hasEllipsis =
|
|
617
|
+
const hasEllipsis = XEUtils.eqNull(showOverflow) ? isAllOverflow : showOverflow
|
|
618
618
|
let columnIndex = -1
|
|
619
619
|
let $columnIndex = -1
|
|
620
620
|
let _columnIndex = -1
|
|
@@ -735,8 +735,9 @@ export default {
|
|
|
735
735
|
const tableReactData = $xeTable as unknown as TableReactData
|
|
736
736
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
737
737
|
const $xeGrid = $xeTable.$xeGrid
|
|
738
|
+
const slots = $xeTable.$scopedSlots
|
|
738
739
|
|
|
739
|
-
const { xID
|
|
740
|
+
const { xID } = $xeTable
|
|
740
741
|
const { fixedColumn, fixedType, tableColumn } = props
|
|
741
742
|
|
|
742
743
|
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps
|
|
@@ -819,13 +820,15 @@ export default {
|
|
|
819
820
|
}
|
|
820
821
|
|
|
821
822
|
let emptyContent
|
|
822
|
-
|
|
823
|
-
|
|
823
|
+
const emptySlot = slots ? slots.empty : null
|
|
824
|
+
const emptyParams = { $table: $xeTable, $grid: $xeGrid }
|
|
825
|
+
if (emptySlot) {
|
|
826
|
+
emptyContent = emptySlot.call($xeTable, emptyParams)
|
|
824
827
|
} else {
|
|
825
828
|
const compConf = emptyOpts.name ? renderer.get(emptyOpts.name) : null
|
|
826
829
|
const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null
|
|
827
830
|
if (rtEmptyView) {
|
|
828
|
-
emptyContent = getSlotVNs(rtEmptyView.call(
|
|
831
|
+
emptyContent = getSlotVNs(rtEmptyView.call($xeTable, h, emptyOpts, emptyParams))
|
|
829
832
|
} else {
|
|
830
833
|
emptyContent = tableProps.emptyText || getI18n('vxe.table.emptyText')
|
|
831
834
|
}
|
|
@@ -875,7 +878,7 @@ export default {
|
|
|
875
878
|
*/
|
|
876
879
|
h('colgroup', {
|
|
877
880
|
ref: 'refBodyColgroup'
|
|
878
|
-
}, renderColumnList.map((column
|
|
881
|
+
}, renderColumnList.map((column, $columnIndex) => {
|
|
879
882
|
return h('col', {
|
|
880
883
|
attrs: {
|
|
881
884
|
name: column.id
|
|
@@ -915,7 +918,7 @@ export default {
|
|
|
915
918
|
h('span', {
|
|
916
919
|
class: 'vxe-table--cell-main-area-btn',
|
|
917
920
|
on: {
|
|
918
|
-
mousedown (evnt:
|
|
921
|
+
mousedown (evnt: MouseEvent) {
|
|
919
922
|
if ($xeTable.triggerCellAreaExtendMousedownEvent) {
|
|
920
923
|
$xeTable.triggerCellAreaExtendMousedownEvent(evnt, { $table: $xeTable, fixed: fixedType, type: renderType })
|
|
921
924
|
}
|
|
@@ -377,18 +377,6 @@ export const Cell = {
|
|
|
377
377
|
const { isRowGroupStatus } = tableReactData
|
|
378
378
|
const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column
|
|
379
379
|
const renderOpts = editRender || cellRender
|
|
380
|
-
if (slots && slots.default) {
|
|
381
|
-
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h))
|
|
382
|
-
}
|
|
383
|
-
if (renderOpts) {
|
|
384
|
-
const compConf = renderer.get(renderOpts.name)
|
|
385
|
-
const rtDefault = compConf ? (compConf.renderTableDefault || compConf.renderDefault) : null
|
|
386
|
-
const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null
|
|
387
|
-
const renderFn = editRender ? rtCell : rtDefault
|
|
388
|
-
if (renderFn) {
|
|
389
|
-
return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))))
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
380
|
let cellValue: string | number | null = ''
|
|
393
381
|
if (isRowGroupStatus && field && row.isAggregate) {
|
|
394
382
|
const aggRow: VxeTableDefines.AggregateRowInfo = row
|
|
@@ -434,6 +422,18 @@ export const Cell = {
|
|
|
434
422
|
}
|
|
435
423
|
}
|
|
436
424
|
} else {
|
|
425
|
+
if (slots && slots.default) {
|
|
426
|
+
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h))
|
|
427
|
+
}
|
|
428
|
+
if (renderOpts) {
|
|
429
|
+
const compConf = renderer.get(renderOpts.name)
|
|
430
|
+
const rtDefault = compConf ? (compConf.renderTableDefault || compConf.renderDefault) : null
|
|
431
|
+
const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null
|
|
432
|
+
const renderFn = editRender ? rtCell : rtDefault
|
|
433
|
+
if (renderFn) {
|
|
434
|
+
return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))))
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
437
|
cellValue = $table.getCellLabel(row, column)
|
|
438
438
|
}
|
|
439
439
|
const cellPlaceholder = editRender ? editRender.placeholder : ''
|
|
@@ -30,6 +30,10 @@ function eqCellValue (row1: any, row2: any, field: any) {
|
|
|
30
30
|
return XEUtils.isEqual(val1, val2)
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
function hangleStorageDefaultValue (value: boolean | null | undefined, isAll: boolean) {
|
|
34
|
+
return XEUtils.isBoolean(value) ? value : isAll
|
|
35
|
+
}
|
|
36
|
+
|
|
33
37
|
function getNextSortOrder ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, column: any) {
|
|
34
38
|
const sortOpts = $xeTable.computeSortOpts
|
|
35
39
|
const { orders = [] } = sortOpts
|
|
@@ -174,13 +178,13 @@ function restoreCustomStorage ($xeTable: VxeTableConstructor & VxeTablePrivateMe
|
|
|
174
178
|
const { customConfig } = props
|
|
175
179
|
const tableId = $xeTable.computeTableId
|
|
176
180
|
const customOpts = $xeTable.computeCustomOpts
|
|
177
|
-
const { storage, restoreStore } = customOpts
|
|
181
|
+
const { storage, restoreStore, storeOptions } = customOpts
|
|
178
182
|
const isAllCustom = storage === true
|
|
179
|
-
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {})
|
|
180
|
-
const isCustomResizable =
|
|
181
|
-
const isCustomVisible =
|
|
182
|
-
const isCustomFixed =
|
|
183
|
-
const isCustomSort =
|
|
183
|
+
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions)
|
|
184
|
+
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
|
|
185
|
+
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
|
|
186
|
+
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
|
|
187
|
+
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom)
|
|
184
188
|
if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
185
189
|
if (!tableId) {
|
|
186
190
|
errLog('vxe.error.reqProp', ['id'])
|
|
@@ -2714,13 +2718,18 @@ function handleRecalculateLayout ($xeTable: VxeTableConstructor & VxeTablePrivat
|
|
|
2714
2718
|
const handleUpdateRowGroup = ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, groupFields?: string[]) => {
|
|
2715
2719
|
const reactData = $xeTable as unknown as TableReactData
|
|
2716
2720
|
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2721
|
+
const aggFields: string[] = []
|
|
2722
|
+
const aggConfs: { field: string }[] = []
|
|
2723
|
+
if (groupFields) {
|
|
2724
|
+
(XEUtils.isArray(groupFields) ? groupFields : [groupFields]).forEach(field => {
|
|
2725
|
+
aggFields.push(field)
|
|
2726
|
+
aggConfs.push({
|
|
2727
|
+
field
|
|
2722
2728
|
})
|
|
2723
|
-
|
|
2729
|
+
})
|
|
2730
|
+
}
|
|
2731
|
+
reactData.rowGroupList = aggConfs
|
|
2732
|
+
reactData.aggHandleFields = aggFields
|
|
2724
2733
|
}
|
|
2725
2734
|
|
|
2726
2735
|
function handleeGroupSummary ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, aggList: VxeTableDefines.AggregateRowInfo[]) {
|
|
@@ -2910,9 +2919,9 @@ function loadTableData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
|
|
|
2910
2919
|
internalData.cvCacheMaps = {}
|
|
2911
2920
|
reactData.isRowLoading = true
|
|
2912
2921
|
reactData.scrollVMLoading = false
|
|
2913
|
-
internalData.treeExpandedMaps = {}
|
|
2922
|
+
// internalData.treeExpandedMaps = {}
|
|
2914
2923
|
reactData.treeExpandedFlag++
|
|
2915
|
-
internalData.rowExpandedMaps = {}
|
|
2924
|
+
// internalData.rowExpandedMaps = {}
|
|
2916
2925
|
reactData.rowExpandedFlag++
|
|
2917
2926
|
internalData.insertRowMaps = {}
|
|
2918
2927
|
reactData.insertRowFlag++
|
|
@@ -5112,13 +5121,13 @@ const Methods = {
|
|
|
5112
5121
|
const { customConfig } = props
|
|
5113
5122
|
const tableId = $xeTable.computeTableId
|
|
5114
5123
|
const customOpts = $xeTable.computeCustomOpts
|
|
5115
|
-
const { storage, restoreStore } = customOpts
|
|
5124
|
+
const { storage, restoreStore, storeOptions } = customOpts
|
|
5116
5125
|
const isAllCustom = storage === true
|
|
5117
|
-
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {})
|
|
5118
|
-
const isCustomResizable =
|
|
5119
|
-
const isCustomVisible =
|
|
5120
|
-
const isCustomFixed =
|
|
5121
|
-
const isCustomSort =
|
|
5126
|
+
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions)
|
|
5127
|
+
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
|
|
5128
|
+
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
|
|
5129
|
+
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
|
|
5130
|
+
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom)
|
|
5122
5131
|
if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
5123
5132
|
if (!tableId) {
|
|
5124
5133
|
errLog('vxe.error.reqProp', ['id'])
|
|
@@ -5147,13 +5156,13 @@ const Methods = {
|
|
|
5147
5156
|
const { id } = props
|
|
5148
5157
|
const customOpts = $xeTable.computeCustomOpts
|
|
5149
5158
|
const { collectColumn } = internalData
|
|
5150
|
-
const { storage, checkMethod } = customOpts
|
|
5159
|
+
const { storage, checkMethod, storeOptions } = customOpts
|
|
5151
5160
|
const isAllCustom = storage === true
|
|
5152
|
-
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {})
|
|
5153
|
-
const isCustomResizable =
|
|
5154
|
-
const isCustomVisible =
|
|
5155
|
-
const isCustomFixed =
|
|
5156
|
-
const isCustomSort =
|
|
5161
|
+
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions)
|
|
5162
|
+
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
|
|
5163
|
+
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
|
|
5164
|
+
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
|
|
5165
|
+
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom)
|
|
5157
5166
|
const resizableData: Record<string, number> = {}
|
|
5158
5167
|
const sortData: Record<string, number> = {}
|
|
5159
5168
|
const visibleData: Record<string, boolean> = {}
|
|
@@ -150,11 +150,20 @@ export default {
|
|
|
150
150
|
showFooterOverflow: { type: [Boolean, String], default: () => getConfig().table.showFooterOverflow },
|
|
151
151
|
|
|
152
152
|
/** 高级属性 */
|
|
153
|
-
|
|
153
|
+
/**
|
|
154
|
+
* (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
|
|
155
|
+
* @deprecated
|
|
156
|
+
*/
|
|
154
157
|
columnKey: Boolean,
|
|
155
|
-
|
|
158
|
+
/**
|
|
159
|
+
* (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
|
|
160
|
+
* @deprecated
|
|
161
|
+
*/
|
|
156
162
|
rowKey: Boolean,
|
|
157
|
-
|
|
163
|
+
/**
|
|
164
|
+
* (即将废弃)rowId 已废弃,被 row-config.keyField 替换
|
|
165
|
+
* @deprecated
|
|
166
|
+
*/
|
|
158
167
|
rowId: { type: String, default: () => getConfig().table.rowId },
|
|
159
168
|
zIndex: Number,
|
|
160
169
|
emptyText: { type: String, default: () => getConfig().table.emptyText },
|
|
@@ -179,11 +188,17 @@ export default {
|
|
|
179
188
|
rowConfig: Object as PropType<VxeTablePropTypes.RowConfig>,
|
|
180
189
|
// 数据聚合配置项
|
|
181
190
|
aggregateConfig: Object as PropType<VxeTablePropTypes.AggregateConfig>,
|
|
182
|
-
|
|
191
|
+
/**
|
|
192
|
+
* 已废弃,被 aggregateConfig 替换
|
|
193
|
+
* @deprecated
|
|
194
|
+
*/
|
|
183
195
|
rowGroupConfig: Object as PropType<VxeTablePropTypes.RowGroupConfig>,
|
|
184
196
|
// 当前行配置项
|
|
185
197
|
currentRowConfig: Object as PropType<VxeTablePropTypes.CurrentRowConfig>,
|
|
186
|
-
|
|
198
|
+
/**
|
|
199
|
+
* 已废弃,被 rowDragConfig 替换
|
|
200
|
+
* @deprecated
|
|
201
|
+
*/
|
|
187
202
|
dragConfig: Object as PropType<VxeTablePropTypes.DragConfig>,
|
|
188
203
|
// 行拖拽排序配置项
|
|
189
204
|
rowDragConfig: Object as PropType<VxeTablePropTypes.RowDragConfig>,
|
|
@@ -215,7 +230,10 @@ export default {
|
|
|
215
230
|
treeConfig: [Boolean, Object],
|
|
216
231
|
// 快捷菜单配置项
|
|
217
232
|
menuConfig: [Boolean, Object],
|
|
218
|
-
|
|
233
|
+
/**
|
|
234
|
+
* 在 v4 中废弃 contextMenu
|
|
235
|
+
* @deprecated
|
|
236
|
+
*/
|
|
219
237
|
contextMenu: [Boolean, Object],
|
|
220
238
|
// 鼠标配置项
|
|
221
239
|
mouseConfig: Object,
|
|
@@ -239,9 +257,15 @@ export default {
|
|
|
239
257
|
emptyRender: [Boolean, Object],
|
|
240
258
|
// 自定义列配置项
|
|
241
259
|
customConfig: Object as PropType<VxeTablePropTypes.CustomConfig>,
|
|
242
|
-
|
|
260
|
+
/**
|
|
261
|
+
* (即将废弃)横向虚拟滚动配置项
|
|
262
|
+
* @deprecated
|
|
263
|
+
*/
|
|
243
264
|
scrollX: Object as PropType<VxeTablePropTypes.ScrollX>,
|
|
244
|
-
|
|
265
|
+
/**
|
|
266
|
+
* (即将废弃)纵向虚拟滚动配置项
|
|
267
|
+
* @deprecated
|
|
268
|
+
*/
|
|
245
269
|
scrollY: Object as PropType<VxeTablePropTypes.ScrollY>,
|
|
246
270
|
// 横向虚拟滚动配置项
|
|
247
271
|
virtualXConfig: Object as PropType<VxeTablePropTypes.VirtualXConfig>,
|