vxe-table 4.7.9 → 4.7.11
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/locale/lang/en-US.js +1 -1
- package/es/locale/lang/es-ES.js +1 -1
- package/es/locale/lang/ja-JP.js +1 -1
- package/es/locale/lang/pt-BR.js +1 -1
- package/es/locale/lang/zh-CN.js +1 -1
- package/es/locale/lang/zh-TC.js +1 -1
- package/es/table/module/custom/panel.js +12 -22
- package/es/table/src/header.js +1 -1
- package/es/table/src/table.js +117 -252
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +142 -323
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +1 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -1
- package/lib/locale/lang/es-ES.js +1 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -1
- package/lib/locale/lang/ja-JP.js +1 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -1
- package/lib/locale/lang/pt-BR.js +1 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -1
- package/lib/locale/lang/zh-CN.js +1 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -1
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +1 -1
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +1 -1
- package/lib/locale/lang/zh-TC.js +1 -1
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +1 -1
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +1 -1
- package/lib/table/module/custom/panel.js +11 -26
- package/lib/table/module/custom/panel.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/table.js +129 -294
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +2 -2
- 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/package.json +2 -2
- package/packages/locale/lang/en-US.ts +1 -1
- package/packages/locale/lang/es-ES.ts +1 -1
- package/packages/locale/lang/ja-JP.ts +1 -1
- package/packages/locale/lang/pt-BR.ts +1 -1
- package/packages/locale/lang/zh-CN.ts +1 -1
- package/packages/locale/lang/zh-TC.ts +1 -1
- package/packages/table/module/custom/panel.ts +12 -23
- package/packages/table/src/header.ts +1 -1
- package/packages/table/src/table.ts +116 -257
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.11",
|
|
4
4
|
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"style": "lib/style.css",
|
|
29
29
|
"typings": "types/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"vxe-pc-ui": "^4.0.
|
|
31
|
+
"vxe-pc-ui": "^4.0.9"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/resize-observer-browser": "^0.1.11",
|
|
@@ -19,7 +19,7 @@ export default defineComponent({
|
|
|
19
19
|
setup (props) {
|
|
20
20
|
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
|
|
21
21
|
|
|
22
|
-
const {
|
|
22
|
+
const { reactData } = $xeTable
|
|
23
23
|
const { computeCustomOpts, computeColumnOpts, computeIsMaxFixedColumn } = $xeTable.getComputeMaps()
|
|
24
24
|
|
|
25
25
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
@@ -46,19 +46,6 @@ export default defineComponent({
|
|
|
46
46
|
}, 300)
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const handleSaveStore = (type: 'confirm' | 'reset') => {
|
|
50
|
-
const { id } = tableProps
|
|
51
|
-
const customOpts = computeCustomOpts.value
|
|
52
|
-
const { storage, updateStore } = customOpts
|
|
53
|
-
if (storage && id && updateStore) {
|
|
54
|
-
updateStore({
|
|
55
|
-
id,
|
|
56
|
-
type,
|
|
57
|
-
storeData: $xeTable.getCustomStoreData()
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
49
|
const confirmCustomEvent = (evnt: Event) => {
|
|
63
50
|
const { customColumnList } = reactData
|
|
64
51
|
const customOpts = computeCustomOpts.value
|
|
@@ -77,6 +64,7 @@ export default defineComponent({
|
|
|
77
64
|
if (column.renderVisible && (!column.children || column.children.length)) {
|
|
78
65
|
if (column.renderResizeWidth !== column.renderWidth) {
|
|
79
66
|
column.resizeWidth = column.renderResizeWidth
|
|
67
|
+
column.renderWidth = column.renderResizeWidth
|
|
80
68
|
}
|
|
81
69
|
}
|
|
82
70
|
}
|
|
@@ -86,7 +74,7 @@ export default defineComponent({
|
|
|
86
74
|
})
|
|
87
75
|
$xeTable.closeCustom()
|
|
88
76
|
$xeTable.emitCustomEvent('confirm', evnt)
|
|
89
|
-
|
|
77
|
+
$xeTable.saveCustomStore('confirm')
|
|
90
78
|
}
|
|
91
79
|
|
|
92
80
|
const cancelCustomEvent = (evnt: Event) => {
|
|
@@ -122,7 +110,6 @@ export default defineComponent({
|
|
|
122
110
|
$xeTable.resetColumn(true)
|
|
123
111
|
$xeTable.closeCustom()
|
|
124
112
|
$xeTable.emitCustomEvent('reset', evnt)
|
|
125
|
-
handleSaveStore('reset')
|
|
126
113
|
}
|
|
127
114
|
|
|
128
115
|
const resetCustomEvent = (evnt: Event) => {
|
|
@@ -164,6 +151,7 @@ export default defineComponent({
|
|
|
164
151
|
handleOptionCheck(column)
|
|
165
152
|
if (customOpts.immediate) {
|
|
166
153
|
$xeTable.handleCustom()
|
|
154
|
+
$xeTable.saveCustomStore('update:visible')
|
|
167
155
|
}
|
|
168
156
|
$xeTable.checkCustomStatus()
|
|
169
157
|
}
|
|
@@ -497,8 +485,9 @@ export default defineComponent({
|
|
|
497
485
|
const { customStore } = props
|
|
498
486
|
const { customColumnList } = reactData
|
|
499
487
|
const customOpts = computeCustomOpts.value
|
|
500
|
-
const { allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts
|
|
488
|
+
const { modalOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts
|
|
501
489
|
const columnOpts = computeColumnOpts.value
|
|
490
|
+
const modalOpts = Object.assign({}, modalOptions)
|
|
502
491
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value
|
|
503
492
|
const trVNs: VNode[] = []
|
|
504
493
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
@@ -617,13 +606,13 @@ export default defineComponent({
|
|
|
617
606
|
const isAllIndeterminate = customStore.isIndeterminate
|
|
618
607
|
return h(resolveComponent('vxe-modal') as VxeModalComponent, {
|
|
619
608
|
key: 'popup',
|
|
620
|
-
className: 'vxe-table-custom-popup-wrapper vxe-table--ignore-clear',
|
|
609
|
+
className: ['vxe-table-custom-popup-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
621
610
|
modelValue: customStore.visible,
|
|
622
|
-
title: getI18n('vxe.custom.cstmTitle'),
|
|
623
|
-
width:
|
|
624
|
-
minWidth: 700,
|
|
625
|
-
height:
|
|
626
|
-
minHeight: 400,
|
|
611
|
+
title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
612
|
+
width: modalOpts.width || '50vw',
|
|
613
|
+
minWidth: modalOpts.minWidth || 700,
|
|
614
|
+
height: modalOpts.height || '50vh',
|
|
615
|
+
minHeight: modalOpts.minHeight || 400,
|
|
627
616
|
mask: true,
|
|
628
617
|
lockView: true,
|
|
629
618
|
showFooter: true,
|
|
@@ -116,7 +116,7 @@ export default defineComponent({
|
|
|
116
116
|
tableInternalData._lastResizeTime = Date.now()
|
|
117
117
|
$xeTable.analyColumnWidth()
|
|
118
118
|
$xeTable.recalculate(true).then(() => {
|
|
119
|
-
$xeTable.
|
|
119
|
+
$xeTable.saveCustomStore('update:visible')
|
|
120
120
|
$xeTable.updateCellAreas()
|
|
121
121
|
$xeTable.dispatchEvent('resizable-change', { ...params, resizeWidth }, evnt)
|
|
122
122
|
})
|