vxe-table 3.9.0-rc.9 → 3.9.1
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/README.md +80 -9
- package/es/grid/src/grid.js +116 -62
- package/es/grid/style.css +0 -1
- package/es/grid/style.min.css +1 -1
- package/es/index.esm.js +22 -3
- package/es/locale/lang/en-US.js +6 -2
- package/es/locale/lang/es-ES.js +5 -1
- package/es/locale/lang/hu-HU.js +5 -1
- package/es/locale/lang/ja-JP.js +5 -1
- package/es/locale/lang/ko-KR.js +5 -1
- package/es/locale/lang/pt-BR.js +5 -1
- package/es/locale/lang/ru-RU.js +5 -1
- package/es/locale/lang/uk-UA.js +5 -1
- package/es/locale/lang/vi-VN.js +5 -1
- package/es/locale/lang/zh-CHT.js +5 -1
- package/es/locale/lang/zh-CN.js +5 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +183 -173
- package/es/table/module/edit/mixin.js +35 -40
- package/es/table/module/export/export-panel.js +32 -4
- package/es/table/module/export/import-panel.js +25 -6
- package/es/table/module/export/mixin.js +11 -11
- package/es/table/module/menu/mixin.js +2 -2
- package/es/table/module/validator/mixin.js +4 -4
- package/es/table/render/index.js +17 -11
- package/es/table/src/body.js +1 -0
- package/es/table/src/columnInfo.js +3 -3
- package/es/table/src/methods.js +69 -55
- package/es/table/src/props.js +65 -15
- package/es/table/src/table.js +63 -29
- package/es/table/src/util.js +3 -2
- package/es/table/style.css +37 -48
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +21 -7
- package/es/toolbar/style.css +0 -1
- package/es/toolbar/style.min.css +1 -1
- package/es/ui/index.js +5 -3
- package/es/ui/src/log.js +1 -1
- package/es/vxe-grid/style.css +0 -1
- package/es/vxe-grid/style.min.css +1 -1
- package/es/vxe-table/style.css +37 -48
- package/es/vxe-table/style.min.css +1 -1
- package/es/vxe-toolbar/style.css +0 -1
- package/es/vxe-toolbar/style.min.css +1 -1
- package/lib/colgroup/index.js +3 -3
- package/lib/colgroup/index.min.js +1 -1
- package/lib/column/index.js +3 -3
- package/lib/column/index.min.js +1 -1
- package/lib/components.js +9 -11
- package/lib/components.min.js +1 -1
- package/lib/grid/index.js +3 -3
- package/lib/grid/index.min.js +1 -1
- package/lib/grid/src/grid.js +577 -487
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +0 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/index.common.js +3 -4
- package/lib/index.umd.js +9148 -17246
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +6 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +6 -2
- package/lib/locale/lang/es-ES.js +5 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +5 -1
- package/lib/locale/lang/hu-HU.js +5 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +5 -1
- package/lib/locale/lang/ja-JP.js +5 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +5 -1
- package/lib/locale/lang/ko-KR.js +5 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +5 -1
- package/lib/locale/lang/pt-BR.js +5 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +5 -1
- package/lib/locale/lang/ru-RU.js +5 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +5 -1
- package/lib/locale/lang/uk-UA.js +5 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +5 -1
- package/lib/locale/lang/vi-VN.js +5 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +5 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +5 -1
- package/lib/locale/lang/zh-CN.js +5 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +5 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/index.js +4 -4
- package/lib/table/index.min.js +1 -1
- package/lib/table/module/custom/mixin.js +53 -44
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +310 -239
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +434 -383
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +136 -106
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +75 -54
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +592 -597
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/export/util.js +6 -4
- package/lib/table/module/export/util.min.js +1 -1
- package/lib/table/module/filter/mixin.js +147 -118
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/filter/panel.js +86 -65
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +163 -151
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +125 -114
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/menu/panel.js +36 -34
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/module/validator/mixin.js +225 -214
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +401 -297
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +411 -349
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +470 -344
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +10 -10
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +46 -55
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +157 -132
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/group.js +1 -1
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/header.js +170 -153
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +2770 -2491
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +33 -74
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +436 -395
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +143 -131
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +37 -48
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/index.js +3 -3
- package/lib/toolbar/index.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +332 -284
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +0 -1
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/ui/index.js +50 -41
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/comp.js +2 -3
- package/lib/ui/src/comp.min.js +1 -1
- package/lib/ui/src/dom.js +29 -28
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +6 -4
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/utils.js +7 -7
- package/lib/v-x-e-table/index.js +3 -4
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/vxe-colgroup/index.js +3 -4
- package/lib/vxe-colgroup/index.min.js +1 -1
- package/lib/vxe-column/index.js +3 -4
- package/lib/vxe-column/index.min.js +1 -1
- package/lib/vxe-grid/index.js +3 -4
- package/lib/vxe-grid/index.min.js +1 -1
- package/lib/vxe-grid/style/style.css +0 -1
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-table/index.js +3 -4
- package/lib/vxe-table/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +37 -48
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-toolbar/index.js +3 -4
- package/lib/vxe-toolbar/index.min.js +1 -1
- package/lib/vxe-toolbar/style/style.css +0 -1
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/lib/vxe-ui/index.js +3 -4
- package/lib/vxe-ui/index.min.js +1 -1
- package/lib/vxe-v-x-e-table/index.js +3 -4
- package/lib/vxe-v-x-e-table/index.min.js +1 -1
- package/package.json +5 -4
- package/packages/grid/src/grid.ts +123 -61
- package/packages/locale/lang/en-US.ts +6 -2
- package/packages/locale/lang/es-ES.ts +5 -1
- package/packages/locale/lang/hu-HU.ts +5 -1
- package/packages/locale/lang/ja-JP.ts +5 -1
- package/packages/locale/lang/ko-KR.ts +5 -1
- package/packages/locale/lang/pt-BR.ts +5 -1
- package/packages/locale/lang/ru-RU.ts +5 -1
- package/packages/locale/lang/uk-UA.ts +5 -1
- package/packages/locale/lang/vi-VN.ts +5 -1
- package/packages/locale/lang/zh-CHT.ts +5 -1
- package/packages/locale/lang/zh-CN.ts +5 -1
- package/packages/table/module/custom/panel.ts +186 -175
- package/packages/table/module/edit/mixin.ts +34 -39
- package/packages/table/module/export/export-panel.ts +36 -4
- package/packages/table/module/export/import-panel.ts +29 -6
- package/packages/table/module/export/mixin.ts +11 -11
- package/packages/table/module/menu/mixin.ts +2 -2
- package/packages/table/module/validator/mixin.ts +4 -4
- package/packages/table/render/index.ts +20 -11
- package/packages/table/src/body.ts +1 -0
- package/packages/table/src/columnInfo.ts +3 -3
- package/packages/table/src/methods.ts +70 -55
- package/packages/table/src/props.ts +68 -15
- package/packages/table/src/table.ts +71 -26
- package/packages/table/src/util.ts +3 -2
- package/packages/toolbar/src/toolbar.ts +21 -7
- package/packages/ui/index.ts +3 -1
- package/styles/components/table.scss +82 -17
- package/types/all.d.ts +1 -0
- /package/es/{iconfont.1726453742001.ttf → iconfont.1728483486168.ttf} +0 -0
- /package/es/{iconfont.1726453742001.woff → iconfont.1728483486168.woff} +0 -0
- /package/es/{iconfont.1726453742001.woff2 → iconfont.1728483486168.woff2} +0 -0
- /package/lib/{iconfont.1726453742001.ttf → iconfont.1728483486168.ttf} +0 -0
- /package/lib/{iconfont.1726453742001.woff → iconfont.1728483486168.woff} +0 -0
- /package/lib/{iconfont.1726453742001.woff2 → iconfont.1728483486168.woff2} +0 -0
|
@@ -7,7 +7,7 @@ import XEUtils from 'xe-utils'
|
|
|
7
7
|
|
|
8
8
|
import type { VxeModalComponent, VxeDrawerComponent, VxeButtonComponent, VxeRadioGroupComponent, VxeTooltipComponent, VxeInputComponent } from 'vxe-pc-ui'
|
|
9
9
|
|
|
10
|
-
const { getI18n, getIcon } = VxeUI
|
|
10
|
+
const { getI18n, getIcon, renderEmptyElement } = VxeUI
|
|
11
11
|
|
|
12
12
|
function updateDropHint (_vm: any, evnt: any) {
|
|
13
13
|
const { $refs } = _vm
|
|
@@ -277,7 +277,11 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
280
|
+
const VxeUIModalComponent = VxeUI.getComponent<VxeModalComponent>('VxeModal')
|
|
280
281
|
const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
|
|
282
|
+
const VxeUIInputComponent = VxeUI.getComponent<VxeInputComponent>('VxeInput')
|
|
283
|
+
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
284
|
+
const $xeTableCustomPanel = _vm
|
|
281
285
|
|
|
282
286
|
const { _e, $xetable, customStore } = _vm
|
|
283
287
|
const { customOpts, customColumnList, columnOpts, isMaxFixedColumn } = $xetable
|
|
@@ -387,18 +391,21 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
387
391
|
}, [
|
|
388
392
|
column.children && column.children.length
|
|
389
393
|
? h('span', '-')
|
|
390
|
-
:
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
394
|
+
: (VxeUIInputComponent
|
|
395
|
+
? h(VxeUIInputComponent, {
|
|
396
|
+
props: {
|
|
397
|
+
type: 'integer',
|
|
398
|
+
disabled: isHidden,
|
|
399
|
+
value: column.renderResizeWidth
|
|
400
|
+
},
|
|
401
|
+
on: {
|
|
402
|
+
modelValue (value: any) {
|
|
403
|
+
column.renderResizeWidth = Math.max(0, Number(value))
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
})
|
|
407
|
+
: renderEmptyElement($xeTableCustomPanel)
|
|
408
|
+
)
|
|
402
409
|
])
|
|
403
410
|
: _e(),
|
|
404
411
|
allowFixed
|
|
@@ -433,178 +440,182 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
|
|
|
433
440
|
})
|
|
434
441
|
const isAllChecked = customStore.isAll
|
|
435
442
|
const isAllIndeterminate = customStore.isIndeterminate
|
|
436
|
-
return
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
h('div', {
|
|
466
|
-
class: 'vxe-table-custom-popup--table-wrapper'
|
|
443
|
+
return VxeUIModalComponent
|
|
444
|
+
? h(VxeUIModalComponent, {
|
|
445
|
+
key: 'modal',
|
|
446
|
+
props: {
|
|
447
|
+
className: ['vxe-table-custom-popup-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
448
|
+
value: customStore.visible,
|
|
449
|
+
title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
450
|
+
width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
|
|
451
|
+
minWidth: modalOpts.minWidth || 700,
|
|
452
|
+
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
453
|
+
minHeight: modalOpts.minHeight || 400,
|
|
454
|
+
showZoom: !!modalOpts.showZoom,
|
|
455
|
+
mask: !!modalOpts.mask,
|
|
456
|
+
lockView: !!modalOpts.lockView,
|
|
457
|
+
resize: !!modalOpts.resize,
|
|
458
|
+
escClosable: !!modalOpts.escClosable,
|
|
459
|
+
destroyOnClose: true,
|
|
460
|
+
showFooter: true
|
|
461
|
+
},
|
|
462
|
+
on: {
|
|
463
|
+
input (value: any) {
|
|
464
|
+
customStore.visible = value
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
scopedSlots: {
|
|
468
|
+
default: () => {
|
|
469
|
+
return h('div', {
|
|
470
|
+
ref: 'bodyElemRef',
|
|
471
|
+
class: 'vxe-table-custom-popup--body'
|
|
467
472
|
}, [
|
|
468
|
-
h('
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
width: '80px'
|
|
474
|
-
}
|
|
475
|
-
})
|
|
476
|
-
: _e(),
|
|
477
|
-
allowSort
|
|
478
|
-
? h('col', {
|
|
479
|
-
style: {
|
|
480
|
-
width: '80px'
|
|
481
|
-
}
|
|
482
|
-
})
|
|
483
|
-
: _e(),
|
|
484
|
-
h('col', {
|
|
485
|
-
style: {
|
|
486
|
-
minWidth: '120px'
|
|
487
|
-
}
|
|
488
|
-
}),
|
|
489
|
-
allowResizable
|
|
490
|
-
? h('col', {
|
|
491
|
-
style: {
|
|
492
|
-
width: '140px'
|
|
493
|
-
}
|
|
494
|
-
})
|
|
495
|
-
: _e(),
|
|
496
|
-
allowFixed
|
|
497
|
-
? h('col', {
|
|
498
|
-
style: {
|
|
499
|
-
width: '200px'
|
|
500
|
-
}
|
|
501
|
-
})
|
|
502
|
-
: _e()
|
|
503
|
-
]),
|
|
504
|
-
h('thead', {}, [
|
|
505
|
-
h('tr', {}, [
|
|
473
|
+
h('div', {
|
|
474
|
+
class: 'vxe-table-custom-popup--table-wrapper'
|
|
475
|
+
}, [
|
|
476
|
+
h('table', {}, [
|
|
477
|
+
h('colgroup', {}, [
|
|
506
478
|
allowVisible
|
|
507
|
-
? h('
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
}],
|
|
513
|
-
attrs: {
|
|
514
|
-
title: getI18n('vxe.table.allTitle')
|
|
515
|
-
},
|
|
516
|
-
on: {
|
|
517
|
-
click: _vm.allOptionEvent
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
}, [
|
|
521
|
-
h('span', {
|
|
522
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
523
|
-
}),
|
|
524
|
-
h('span', {
|
|
525
|
-
class: 'vxe-checkbox--label'
|
|
526
|
-
}, getI18n('vxe.toolbar.customAll'))
|
|
527
|
-
])
|
|
528
|
-
])
|
|
479
|
+
? h('col', {
|
|
480
|
+
style: {
|
|
481
|
+
width: '80px'
|
|
482
|
+
}
|
|
483
|
+
})
|
|
529
484
|
: _e(),
|
|
530
485
|
allowSort
|
|
531
|
-
? h('
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
props: {
|
|
537
|
-
enterable: true,
|
|
538
|
-
content: getI18n('vxe.custom.setting.sortHelpTip'),
|
|
539
|
-
popupClassName: 'vxe-table--ignore-clear'
|
|
540
|
-
},
|
|
541
|
-
scopedSlots: {
|
|
542
|
-
default: () => {
|
|
543
|
-
return h('i', {
|
|
544
|
-
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
545
|
-
})
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
})
|
|
549
|
-
])
|
|
486
|
+
? h('col', {
|
|
487
|
+
style: {
|
|
488
|
+
width: '80px'
|
|
489
|
+
}
|
|
490
|
+
})
|
|
550
491
|
: _e(),
|
|
551
|
-
h('
|
|
492
|
+
h('col', {
|
|
493
|
+
style: {
|
|
494
|
+
minWidth: '120px'
|
|
495
|
+
}
|
|
496
|
+
}),
|
|
552
497
|
allowResizable
|
|
553
|
-
? h('
|
|
498
|
+
? h('col', {
|
|
499
|
+
style: {
|
|
500
|
+
width: '140px'
|
|
501
|
+
}
|
|
502
|
+
})
|
|
554
503
|
: _e(),
|
|
555
504
|
allowFixed
|
|
556
|
-
? h('
|
|
505
|
+
? h('col', {
|
|
506
|
+
style: {
|
|
507
|
+
width: '200px'
|
|
508
|
+
}
|
|
509
|
+
})
|
|
557
510
|
: _e()
|
|
558
|
-
])
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
511
|
+
]),
|
|
512
|
+
h('thead', {}, [
|
|
513
|
+
h('tr', {}, [
|
|
514
|
+
allowVisible
|
|
515
|
+
? h('th', {}, [
|
|
516
|
+
h('div', {
|
|
517
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
518
|
+
'is--checked': isAllChecked,
|
|
519
|
+
'is--indeterminate': isAllIndeterminate
|
|
520
|
+
}],
|
|
521
|
+
attrs: {
|
|
522
|
+
title: getI18n('vxe.table.allTitle')
|
|
523
|
+
},
|
|
524
|
+
on: {
|
|
525
|
+
click: _vm.allOptionEvent
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
}, [
|
|
529
|
+
h('span', {
|
|
530
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
531
|
+
}),
|
|
532
|
+
h('span', {
|
|
533
|
+
class: 'vxe-checkbox--label'
|
|
534
|
+
}, getI18n('vxe.toolbar.customAll'))
|
|
535
|
+
])
|
|
536
|
+
])
|
|
537
|
+
: _e(),
|
|
538
|
+
allowSort
|
|
539
|
+
? h('th', {}, [
|
|
540
|
+
h('span', {
|
|
541
|
+
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
542
|
+
}, getI18n('vxe.custom.setting.colSort')),
|
|
543
|
+
VxeUITooltipComponent
|
|
544
|
+
? h(VxeUITooltipComponent, {
|
|
545
|
+
props: {
|
|
546
|
+
enterable: true,
|
|
547
|
+
content: getI18n('vxe.custom.setting.sortHelpTip'),
|
|
548
|
+
popupClassName: 'vxe-table--ignore-clear'
|
|
549
|
+
},
|
|
550
|
+
scopedSlots: {
|
|
551
|
+
default: () => {
|
|
552
|
+
return h('i', {
|
|
553
|
+
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
554
|
+
})
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
})
|
|
558
|
+
: renderEmptyElement($xeTableCustomPanel)
|
|
559
|
+
])
|
|
560
|
+
: _e(),
|
|
561
|
+
h('th', {}, getI18n('vxe.custom.setting.colTitle')),
|
|
562
|
+
allowResizable
|
|
563
|
+
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
|
564
|
+
: _e(),
|
|
565
|
+
allowFixed
|
|
566
|
+
? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
|
567
|
+
: _e()
|
|
568
|
+
])
|
|
569
|
+
]),
|
|
570
|
+
h('transition-group', {
|
|
571
|
+
class: 'vxe-table-custom--body',
|
|
572
|
+
props: {
|
|
573
|
+
tag: 'tbody',
|
|
574
|
+
name: 'vxe-table-custom--list'
|
|
575
|
+
}
|
|
576
|
+
}, trVNs)
|
|
577
|
+
])
|
|
578
|
+
]),
|
|
579
|
+
h('div', {
|
|
580
|
+
ref: 'dragHintElemRef',
|
|
581
|
+
class: 'vxe-table-custom-popup--drag-hint'
|
|
582
|
+
}, getI18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))
|
|
583
|
+
])
|
|
584
|
+
},
|
|
585
|
+
footer: () => {
|
|
586
|
+
return h('div', {
|
|
587
|
+
class: 'vxe-table-custom-popup--footer'
|
|
588
|
+
}, [
|
|
589
|
+
h(VxeUIButtonComponent, {
|
|
590
|
+
props: {
|
|
591
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore')
|
|
592
|
+
},
|
|
593
|
+
on: {
|
|
594
|
+
click: _vm.resetCustomEvent
|
|
595
|
+
}
|
|
596
|
+
}),
|
|
597
|
+
h(VxeUIButtonComponent, {
|
|
598
|
+
props: {
|
|
599
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmCancel')
|
|
600
|
+
},
|
|
601
|
+
on: {
|
|
602
|
+
click: _vm.cancelCustomEvent
|
|
603
|
+
}
|
|
604
|
+
}),
|
|
605
|
+
h(VxeUIButtonComponent, {
|
|
606
|
+
props: {
|
|
607
|
+
status: 'primary',
|
|
608
|
+
content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm')
|
|
609
|
+
},
|
|
610
|
+
on: {
|
|
611
|
+
click: _vm.confirmCustomEvent
|
|
612
|
+
}
|
|
613
|
+
})
|
|
614
|
+
])
|
|
615
|
+
}
|
|
605
616
|
}
|
|
606
|
-
}
|
|
607
|
-
|
|
617
|
+
})
|
|
618
|
+
: renderEmptyElement($xeTableCustomPanel)
|
|
608
619
|
}
|
|
609
620
|
|
|
610
621
|
export default {
|
|
@@ -34,7 +34,7 @@ function insertTreeRow (_vm: any, newRecords: any[], isAppend: any) {
|
|
|
34
34
|
fullDataRowIdData[rowid] = rest
|
|
35
35
|
fullAllDataRowIdData[rowid] = rest
|
|
36
36
|
} else {
|
|
37
|
-
if (process.env.
|
|
37
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
38
38
|
if (parentRowId) {
|
|
39
39
|
warnLog('vxe.error.unableInsert')
|
|
40
40
|
}
|
|
@@ -98,7 +98,7 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
98
98
|
const parentLevel = parentRest ? parentRest.level : 0
|
|
99
99
|
newRecords.forEach((item: any, i: any) => {
|
|
100
100
|
const rowid = getRowid(_vm, item)
|
|
101
|
-
if (process.env.
|
|
101
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
102
102
|
if (item[treeOpts.parentField]) {
|
|
103
103
|
if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
|
|
104
104
|
errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`])
|
|
@@ -131,7 +131,7 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
} else {
|
|
134
|
-
if (process.env.
|
|
134
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
135
135
|
warnLog('vxe.error.unableInsert')
|
|
136
136
|
}
|
|
137
137
|
insertTreeRow(_vm, newRecords, true)
|
|
@@ -469,25 +469,11 @@ export default {
|
|
|
469
469
|
}
|
|
470
470
|
})
|
|
471
471
|
}
|
|
472
|
-
this.emitEvent(type,
|
|
473
|
-
row,
|
|
474
|
-
rowIndex: this.getRowIndex(row),
|
|
475
|
-
$rowIndex: this.getVMRowIndex(row),
|
|
476
|
-
column,
|
|
477
|
-
columnIndex: this.getColumnIndex(column),
|
|
478
|
-
$columnIndex: this.getVMColumnIndex(column)
|
|
479
|
-
}, evnt)
|
|
472
|
+
this.emitEvent(type, params, evnt)
|
|
480
473
|
|
|
481
474
|
// v4已废弃
|
|
482
475
|
if (type === 'edit-activated') {
|
|
483
|
-
this.emitEvent('edit-actived',
|
|
484
|
-
row,
|
|
485
|
-
rowIndex: this.getRowIndex(row),
|
|
486
|
-
$rowIndex: this.getVMRowIndex(row),
|
|
487
|
-
column,
|
|
488
|
-
columnIndex: this.getColumnIndex(column),
|
|
489
|
-
$columnIndex: this.getVMColumnIndex(column)
|
|
490
|
-
}, evnt)
|
|
476
|
+
this.emitEvent('edit-actived', params, evnt)
|
|
491
477
|
}
|
|
492
478
|
} else {
|
|
493
479
|
const { column: oldColumn } = actived
|
|
@@ -551,7 +537,7 @@ export default {
|
|
|
551
537
|
}
|
|
552
538
|
},
|
|
553
539
|
_clearActived (evnt: any) {
|
|
554
|
-
if (process.env.
|
|
540
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
555
541
|
warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit'])
|
|
556
542
|
}
|
|
557
543
|
// 即将废弃
|
|
@@ -589,7 +575,7 @@ export default {
|
|
|
589
575
|
return this.$nextTick()
|
|
590
576
|
},
|
|
591
577
|
_getActiveRecord () {
|
|
592
|
-
if (process.env.
|
|
578
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
593
579
|
warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord'])
|
|
594
580
|
}
|
|
595
581
|
// 即将废弃
|
|
@@ -605,7 +591,7 @@ export default {
|
|
|
605
591
|
return null
|
|
606
592
|
},
|
|
607
593
|
_isActiveByRow (row: any) {
|
|
608
|
-
if (process.env.
|
|
594
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
609
595
|
warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow'])
|
|
610
596
|
}
|
|
611
597
|
// 即将废弃
|
|
@@ -622,6 +608,7 @@ export default {
|
|
|
622
608
|
* 处理聚焦
|
|
623
609
|
*/
|
|
624
610
|
handleFocus (params: any) {
|
|
611
|
+
const { editOpts } = this
|
|
625
612
|
const { row, column, cell } = params
|
|
626
613
|
const { editRender } = column
|
|
627
614
|
if (isEnableConf(editRender)) {
|
|
@@ -629,19 +616,22 @@ export default {
|
|
|
629
616
|
let autoFocus = editRender.autofocus || editRender.autoFocus
|
|
630
617
|
let autoSelect = editRender.autoSelect || editRender.autoselect
|
|
631
618
|
let inputElem
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
if (
|
|
644
|
-
inputElem.
|
|
619
|
+
// 是否启用聚焦
|
|
620
|
+
if (editOpts.autoFocus) {
|
|
621
|
+
if (!autoFocus && compRender) {
|
|
622
|
+
autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || (compRender as any).autoFocus || compRender.autofocus
|
|
623
|
+
}
|
|
624
|
+
if (!autoSelect && compRender) {
|
|
625
|
+
autoSelect = compRender.tableAutoSelect || (compRender as any).autoSelect || compRender.autoselect
|
|
626
|
+
}
|
|
627
|
+
// 如果指定了聚焦 class
|
|
628
|
+
if (XEUtils.isFunction(autoFocus)) {
|
|
629
|
+
inputElem = autoFocus.call(this, params)
|
|
630
|
+
} else if (autoFocus) {
|
|
631
|
+
inputElem = cell.querySelector(autoFocus)
|
|
632
|
+
if (inputElem) {
|
|
633
|
+
inputElem.focus()
|
|
634
|
+
}
|
|
645
635
|
}
|
|
646
636
|
}
|
|
647
637
|
if (inputElem) {
|
|
@@ -656,13 +646,18 @@ export default {
|
|
|
656
646
|
}
|
|
657
647
|
}
|
|
658
648
|
} else {
|
|
659
|
-
//
|
|
660
|
-
|
|
649
|
+
// 是否自动定位
|
|
650
|
+
if (editOpts.autoPos) {
|
|
651
|
+
if (!column.fixed) {
|
|
652
|
+
// 显示到可视区中
|
|
653
|
+
this.scrollToRow(row, column)
|
|
654
|
+
}
|
|
655
|
+
}
|
|
661
656
|
}
|
|
662
657
|
}
|
|
663
658
|
},
|
|
664
659
|
_setActiveRow (row: any) {
|
|
665
|
-
if (process.env.
|
|
660
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
666
661
|
warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow'])
|
|
667
662
|
}
|
|
668
663
|
// 即将废弃
|
|
@@ -679,7 +674,7 @@ export default {
|
|
|
679
674
|
return this.setEditCell(row, column)
|
|
680
675
|
},
|
|
681
676
|
_setActiveCell (row: any, fieldOrColumn: any) {
|
|
682
|
-
if (process.env.
|
|
677
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
683
678
|
warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell'])
|
|
684
679
|
}
|
|
685
680
|
// 即将废弃
|
|
@@ -2,11 +2,17 @@ import { CreateElement } from 'vue'
|
|
|
2
2
|
import { VxeUI } from '../../../ui'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { formatText } from '../../../ui/src/utils'
|
|
5
|
+
import { errLog } from '../../../ui/src/log'
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
import type { VxeModalComponent, VxeInputComponent, VxeCheckboxComponent, VxeSelectComponent, VxeButtonComponent } from 'vxe-pc-ui'
|
|
8
|
+
|
|
9
|
+
const { getI18n, getIcon, globalMixins } = VxeUI
|
|
7
10
|
|
|
8
11
|
export default {
|
|
9
12
|
name: 'VxeTableExportPanel',
|
|
13
|
+
mixins: [
|
|
14
|
+
globalMixins.sizeMixin
|
|
15
|
+
],
|
|
10
16
|
props: {
|
|
11
17
|
defaultOptions: Object,
|
|
12
18
|
storeData: Object
|
|
@@ -26,9 +32,6 @@ export default {
|
|
|
26
32
|
}
|
|
27
33
|
},
|
|
28
34
|
computed: {
|
|
29
|
-
vSize () {
|
|
30
|
-
return this.size || this.$parent.size || this.$parent.vSize
|
|
31
|
-
},
|
|
32
35
|
checkedAll () {
|
|
33
36
|
return this.storeData.columns.every((column: any) => column.checked)
|
|
34
37
|
},
|
|
@@ -44,6 +47,35 @@ export default {
|
|
|
44
47
|
return !defaultOptions.original && ['xlsx'].indexOf(defaultOptions.type) > -1
|
|
45
48
|
}
|
|
46
49
|
} as any,
|
|
50
|
+
created (this: any) {
|
|
51
|
+
const $xeTableExportPanel = this
|
|
52
|
+
|
|
53
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
54
|
+
const VxeUIModalComponent = VxeUI.getComponent<VxeModalComponent>('VxeModal')
|
|
55
|
+
const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
|
|
56
|
+
const VxeUISelectComponent = VxeUI.getComponent<VxeSelectComponent>('VxeSelect')
|
|
57
|
+
const VxeUIInputComponent = VxeUI.getComponent<VxeInputComponent>('VxeInput')
|
|
58
|
+
const VxeUICheckboxComponent = VxeUI.getComponent<VxeCheckboxComponent>('VxeCheckbox')
|
|
59
|
+
|
|
60
|
+
$xeTableExportPanel.$nextTick(() => {
|
|
61
|
+
if (!VxeUIModalComponent) {
|
|
62
|
+
errLog('vxe.error.reqComp', ['vxe-modal'])
|
|
63
|
+
}
|
|
64
|
+
if (!VxeUIButtonComponent) {
|
|
65
|
+
errLog('vxe.error.reqComp', ['vxe-button'])
|
|
66
|
+
}
|
|
67
|
+
if (!VxeUISelectComponent) {
|
|
68
|
+
errLog('vxe.error.reqComp', ['vxe-select'])
|
|
69
|
+
}
|
|
70
|
+
if (!VxeUIInputComponent) {
|
|
71
|
+
errLog('vxe.error.reqComp', ['vxe-input'])
|
|
72
|
+
}
|
|
73
|
+
if (!VxeUICheckboxComponent) {
|
|
74
|
+
errLog('vxe.error.reqComp', ['vxe-checkbox'])
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
},
|
|
47
79
|
render (this: any, h: CreateElement) {
|
|
48
80
|
const { _e, checkedAll, isAll: isAllChecked, isIndeterminate: isAllIndeterminate, showSheet, supportMerge, supportStyle, defaultOptions, storeData } = this
|
|
49
81
|
const { hasTree, hasMerge, isPrint, hasColgroup } = storeData
|