vxe-table 3.9.0-rc.2 → 3.9.0-rc.21
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 +120 -66
- package/es/locale/lang/en-US.js +2 -8
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/hu-HU.d.ts +2 -0
- package/es/locale/lang/hu-HU.js +497 -501
- package/es/locale/lang/ja-JP.js +2 -8
- package/es/locale/lang/ko-KR.d.ts +2 -0
- package/es/locale/lang/ko-KR.js +2 -8
- package/es/locale/lang/pt-BR.js +2 -8
- package/es/locale/lang/ru-RU.d.ts +2 -0
- package/es/locale/lang/ru-RU.js +497 -503
- package/es/locale/lang/uk-UA.d.ts +2 -0
- package/es/locale/lang/uk-UA.js +667 -0
- package/es/locale/lang/vi-VN.js +2 -8
- package/es/locale/lang/zh-CHT.d.ts +2 -0
- package/es/locale/lang/zh-CHT.js +667 -0
- package/es/locale/lang/zh-CN.js +2 -8
- package/es/locale/lang/zh-HK.js +2 -2
- package/es/locale/lang/zh-MO.js +2 -2
- package/es/locale/lang/zh-TC.js +2 -673
- package/es/locale/lang/zh-TW.js +2 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/index.js +29 -3
- package/es/table/module/custom/panel.js +183 -173
- package/es/table/module/edit/mixin.js +33 -24
- package/es/table/module/export/export-panel.js +32 -4
- package/es/table/module/export/import-panel.js +24 -5
- 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 +23 -38
- package/es/table/src/body.js +1 -0
- package/es/table/src/columnInfo.js +3 -3
- package/es/table/src/methods.js +48 -40
- package/es/table/src/props.js +65 -15
- package/es/table/src/table.js +161 -55
- package/es/table/src/util.js +3 -2
- package/es/table/style.css +37 -23
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +21 -7
- package/es/ui/index.js +5 -4
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.js +24 -1
- package/es/vxe-table/style.css +37 -23
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +115 -68
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +632 -330
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -8
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -8
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/hu-HU.d.ts +2 -0
- package/lib/locale/lang/hu-HU.js +497 -501
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +687 -0
- package/lib/locale/lang/ja-JP.js +2 -8
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -8
- package/lib/locale/lang/ko-KR.d.ts +2 -0
- package/lib/locale/lang/ko-KR.js +2 -8
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +687 -0
- package/lib/locale/lang/pt-BR.js +2 -8
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -8
- package/lib/locale/lang/ru-RU.d.ts +2 -0
- package/lib/locale/lang/ru-RU.js +497 -503
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +687 -0
- package/lib/locale/lang/uk-UA.d.ts +2 -0
- package/lib/locale/lang/uk-UA.js +673 -0
- package/lib/locale/lang/uk-UA.min.js +1 -0
- package/lib/locale/lang/uk-UA.umd.js +687 -0
- package/lib/locale/lang/vi-VN.js +2 -8
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.d.ts +2 -0
- package/lib/locale/lang/zh-CHT.js +673 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -0
- package/lib/locale/lang/zh-CHT.umd.js +687 -0
- package/lib/locale/lang/zh-CN.js +2 -8
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -8
- package/lib/locale/lang/zh-HK.js +2 -2
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +7 -677
- package/lib/locale/lang/zh-MO.js +2 -2
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +7 -677
- package/lib/locale/lang/zh-TC.js +3 -673
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +7 -677
- package/lib/locale/lang/zh-TW.js +2 -2
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +7 -677
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/index.js +30 -3
- package/lib/table/index.min.js +1 -1
- package/lib/table/module/custom/panel.js +12 -7
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +32 -23
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +31 -4
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +23 -5
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +11 -11
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +2 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +4 -4
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +27 -41
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +1 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +3 -3
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +47 -40
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +7 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +147 -48
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +3 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +37 -23
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +21 -7
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +6 -5
- 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/ui/src/vn.js +26 -1
- package/lib/ui/src/vn.min.js +1 -1
- package/lib/vxe-table/style/style.css +37 -23
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +127 -65
- package/packages/locale/lang/en-US.ts +2 -10
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +497 -503
- package/packages/locale/lang/ja-JP.ts +2 -10
- package/packages/locale/lang/ko-KR.ts +2 -10
- package/packages/locale/lang/pt-BR.ts +2 -10
- package/packages/locale/lang/ru-RU.ts +497 -505
- package/packages/locale/lang/uk-UA.ts +667 -0
- package/packages/locale/lang/vi-VN.ts +2 -10
- package/packages/locale/lang/zh-CHT.ts +667 -0
- package/packages/locale/lang/zh-CN.ts +2 -10
- package/packages/locale/lang/zh-HK.ts +2 -2
- package/packages/locale/lang/zh-MO.ts +2 -2
- package/packages/locale/lang/zh-TC.ts +2 -674
- package/packages/locale/lang/zh-TW.ts +2 -2
- package/packages/table/index.ts +28 -5
- package/packages/table/module/custom/panel.ts +186 -175
- package/packages/table/module/edit/mixin.ts +32 -23
- package/packages/table/module/export/export-panel.ts +36 -4
- package/packages/table/module/export/import-panel.ts +28 -5
- 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 +26 -40
- package/packages/table/src/body.ts +1 -0
- package/packages/table/src/columnInfo.ts +3 -3
- package/packages/table/src/methods.ts +47 -40
- package/packages/table/src/props.ts +68 -15
- package/packages/table/src/table.ts +167 -56
- package/packages/table/src/util.ts +3 -2
- package/packages/toolbar/src/toolbar.ts +21 -7
- package/packages/ui/index.ts +3 -2
- package/packages/ui/src/vn.ts +26 -1
- package/styles/components/table.scss +82 -17
- package/types/all.d.ts +2 -2
- /package/es/{iconfont.1726028471123.ttf → iconfont.1727868548661.ttf} +0 -0
- /package/es/{iconfont.1726028471123.woff → iconfont.1727868548661.woff} +0 -0
- /package/es/{iconfont.1726028471123.woff2 → iconfont.1727868548661.woff2} +0 -0
- /package/lib/{iconfont.1726028471123.ttf → iconfont.1727868548661.ttf} +0 -0
- /package/lib/{iconfont.1726028471123.woff → iconfont.1727868548661.woff} +0 -0
- /package/lib/{iconfont.1726028471123.woff2 → iconfont.1727868548661.woff2} +0 -0
package/packages/table/index.ts
CHANGED
|
@@ -1,18 +1,41 @@
|
|
|
1
|
-
import { VueConstructor } from 'vue'
|
|
1
|
+
import Vue, { VueConstructor } from 'vue'
|
|
2
2
|
import { VxeUI } from '../ui'
|
|
3
3
|
import VxeTableComponent from './src/table'
|
|
4
4
|
import './render'
|
|
5
5
|
|
|
6
|
+
let isReg = false
|
|
7
|
+
|
|
6
8
|
export const VxeTable = Object.assign({}, VxeTableComponent, {
|
|
7
9
|
install (app: VueConstructor) {
|
|
10
|
+
if (typeof window !== 'undefined' && (window as any).VXETableMixin) {
|
|
11
|
+
VxeTableComponent.mixins.push((window as any).VXETableMixin)
|
|
12
|
+
delete (window as any).VXETableMixin
|
|
13
|
+
}
|
|
14
|
+
// 兼容老版本
|
|
15
|
+
if (typeof window !== 'undefined' && (window as any).VxeTableExtendCellArea && (window as any).VxeTableExtendCellArea.init) {
|
|
16
|
+
(window as any).VxeTableExtendCellArea.init(VxeUI)
|
|
17
|
+
delete (window as any).VxeTableExtendCellArea
|
|
18
|
+
delete (window as any).VXETablePro
|
|
19
|
+
} else if (typeof window !== 'undefined' && (window as any).VXETablePro && (window as any).VXETablePro.init) {
|
|
20
|
+
(window as any).VXETablePro.init(VxeUI)
|
|
21
|
+
delete (window as any).VXETablePro
|
|
22
|
+
}
|
|
23
|
+
if (!Vue.prototype.$vxe) {
|
|
24
|
+
Vue.prototype.$vxe = { t: VxeUI.t, _t: VxeUI._t }
|
|
25
|
+
} else {
|
|
26
|
+
Vue.prototype.$vxe.t = VxeUI.t
|
|
27
|
+
Vue.prototype.$vxe._t = VxeUI._t
|
|
28
|
+
}
|
|
29
|
+
if (!isReg) {
|
|
30
|
+
isReg = true
|
|
31
|
+
if (VxeUI.dynamicApp) {
|
|
32
|
+
VxeUI.dynamicApp.component(VxeTableComponent.name as string, VxeTableComponent)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
8
35
|
app.component(VxeTableComponent.name as string, VxeTableComponent)
|
|
9
36
|
}
|
|
10
37
|
})
|
|
11
38
|
|
|
12
|
-
if (VxeUI.dynamicApp) {
|
|
13
|
-
VxeUI.dynamicApp.component(VxeTableComponent.name as string, VxeTableComponent)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
39
|
VxeUI.component(VxeTableComponent)
|
|
17
40
|
|
|
18
41
|
export const Table = VxeTable
|
|
@@ -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)
|
|
@@ -551,7 +551,7 @@ export default {
|
|
|
551
551
|
}
|
|
552
552
|
},
|
|
553
553
|
_clearActived (evnt: any) {
|
|
554
|
-
if (process.env.
|
|
554
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
555
555
|
warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit'])
|
|
556
556
|
}
|
|
557
557
|
// 即将废弃
|
|
@@ -589,7 +589,7 @@ export default {
|
|
|
589
589
|
return this.$nextTick()
|
|
590
590
|
},
|
|
591
591
|
_getActiveRecord () {
|
|
592
|
-
if (process.env.
|
|
592
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
593
593
|
warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord'])
|
|
594
594
|
}
|
|
595
595
|
// 即将废弃
|
|
@@ -605,7 +605,7 @@ export default {
|
|
|
605
605
|
return null
|
|
606
606
|
},
|
|
607
607
|
_isActiveByRow (row: any) {
|
|
608
|
-
if (process.env.
|
|
608
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
609
609
|
warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow'])
|
|
610
610
|
}
|
|
611
611
|
// 即将废弃
|
|
@@ -622,6 +622,7 @@ export default {
|
|
|
622
622
|
* 处理聚焦
|
|
623
623
|
*/
|
|
624
624
|
handleFocus (params: any) {
|
|
625
|
+
const { editOpts } = this
|
|
625
626
|
const { row, column, cell } = params
|
|
626
627
|
const { editRender } = column
|
|
627
628
|
if (isEnableConf(editRender)) {
|
|
@@ -629,19 +630,22 @@ export default {
|
|
|
629
630
|
let autoFocus = editRender.autofocus || editRender.autoFocus
|
|
630
631
|
let autoSelect = editRender.autoSelect || editRender.autoselect
|
|
631
632
|
let inputElem
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
if (
|
|
644
|
-
inputElem.
|
|
633
|
+
// 是否启用聚焦
|
|
634
|
+
if (editOpts.autoFocus) {
|
|
635
|
+
if (!autoFocus && compRender) {
|
|
636
|
+
autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || (compRender as any).autoFocus || compRender.autofocus
|
|
637
|
+
}
|
|
638
|
+
if (!autoSelect && compRender) {
|
|
639
|
+
autoSelect = compRender.tableAutoSelect || (compRender as any).autoSelect || compRender.autoselect
|
|
640
|
+
}
|
|
641
|
+
// 如果指定了聚焦 class
|
|
642
|
+
if (XEUtils.isFunction(autoFocus)) {
|
|
643
|
+
inputElem = autoFocus.call(this, params)
|
|
644
|
+
} else if (autoFocus) {
|
|
645
|
+
inputElem = cell.querySelector(autoFocus)
|
|
646
|
+
if (inputElem) {
|
|
647
|
+
inputElem.focus()
|
|
648
|
+
}
|
|
645
649
|
}
|
|
646
650
|
}
|
|
647
651
|
if (inputElem) {
|
|
@@ -656,13 +660,18 @@ export default {
|
|
|
656
660
|
}
|
|
657
661
|
}
|
|
658
662
|
} else {
|
|
659
|
-
//
|
|
660
|
-
|
|
663
|
+
// 是否自动定位
|
|
664
|
+
if (editOpts.autoPos) {
|
|
665
|
+
if (!column.fixed) {
|
|
666
|
+
// 显示到可视区中
|
|
667
|
+
this.scrollToRow(row, column)
|
|
668
|
+
}
|
|
669
|
+
}
|
|
661
670
|
}
|
|
662
671
|
}
|
|
663
672
|
},
|
|
664
673
|
_setActiveRow (row: any) {
|
|
665
|
-
if (process.env.
|
|
674
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
666
675
|
warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow'])
|
|
667
676
|
}
|
|
668
677
|
// 即将废弃
|
|
@@ -679,7 +688,7 @@ export default {
|
|
|
679
688
|
return this.setEditCell(row, column)
|
|
680
689
|
},
|
|
681
690
|
_setActiveCell (row: any, fieldOrColumn: any) {
|
|
682
|
-
if (process.env.
|
|
691
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
683
692
|
warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell'])
|
|
684
693
|
}
|
|
685
694
|
// 即将废弃
|
|
@@ -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
|