vxe-table 4.19.20 → 4.19.22
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/dist/all.esm.js +71 -36
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +8 -0
- package/es/locale/lang/de-DE.js +8 -0
- package/es/locale/lang/en-US.js +9 -1
- package/es/locale/lang/es-ES.js +8 -0
- package/es/locale/lang/fr-FR.js +8 -0
- package/es/locale/lang/hu-HU.js +8 -0
- package/es/locale/lang/hy-AM.js +8 -0
- package/es/locale/lang/id-ID.js +8 -0
- package/es/locale/lang/it-IT.js +8 -0
- package/es/locale/lang/ja-JP.js +8 -0
- package/es/locale/lang/ko-KR.js +8 -0
- package/es/locale/lang/ms-MY.js +8 -0
- package/es/locale/lang/nb-NO.js +8 -0
- package/es/locale/lang/pt-BR.js +8 -0
- package/es/locale/lang/ru-RU.js +8 -0
- package/es/locale/lang/th-TH.js +8 -0
- package/es/locale/lang/ug-CN.js +8 -0
- package/es/locale/lang/uk-UA.js +8 -0
- package/es/locale/lang/uz-UZ.js +8 -0
- package/es/locale/lang/vi-VN.js +8 -0
- package/es/locale/lang/zh-CHT.js +8 -0
- package/es/locale/lang/zh-CN.js +8 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +32 -26
- package/es/table/module/custom/panel.js +7 -0
- package/es/table/module/edit/hook.js +0 -1
- package/es/table/module/menu/hook.js +11 -7
- package/es/table/src/emits.js +5 -0
- package/es/table/src/table.js +7 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +64 -39
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +8 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +8 -0
- package/lib/locale/lang/de-DE.js +8 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +8 -0
- package/lib/locale/lang/en-US.js +9 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +9 -1
- package/lib/locale/lang/es-ES.js +8 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +8 -0
- package/lib/locale/lang/fr-FR.js +8 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +8 -0
- package/lib/locale/lang/hu-HU.js +8 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +8 -0
- package/lib/locale/lang/hy-AM.js +8 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +8 -0
- package/lib/locale/lang/id-ID.js +8 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +8 -0
- package/lib/locale/lang/it-IT.js +8 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +8 -0
- package/lib/locale/lang/ja-JP.js +8 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +8 -0
- package/lib/locale/lang/ko-KR.js +8 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +8 -0
- package/lib/locale/lang/ms-MY.js +8 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +8 -0
- package/lib/locale/lang/nb-NO.js +8 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +8 -0
- package/lib/locale/lang/pt-BR.js +8 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +8 -0
- package/lib/locale/lang/ru-RU.js +8 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +8 -0
- package/lib/locale/lang/th-TH.js +8 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +8 -0
- package/lib/locale/lang/ug-CN.js +8 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +8 -0
- package/lib/locale/lang/uk-UA.js +8 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +8 -0
- package/lib/locale/lang/uz-UZ.js +8 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +8 -0
- package/lib/locale/lang/vi-VN.js +8 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +8 -0
- package/lib/locale/lang/zh-CHT.js +8 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +8 -0
- package/lib/locale/lang/zh-CN.js +8 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +8 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +32 -26
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +7 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +0 -1
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/menu/hook.js +10 -5
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/table.js +4 -4
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -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/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +8 -0
- package/packages/locale/lang/de-DE.ts +8 -0
- package/packages/locale/lang/en-US.ts +9 -1
- package/packages/locale/lang/es-ES.ts +8 -0
- package/packages/locale/lang/fr-FR.ts +8 -0
- package/packages/locale/lang/hu-HU.ts +8 -0
- package/packages/locale/lang/hy-AM.ts +8 -0
- package/packages/locale/lang/id-ID.ts +8 -0
- package/packages/locale/lang/it-IT.ts +8 -0
- package/packages/locale/lang/ja-JP.ts +8 -0
- package/packages/locale/lang/ko-KR.ts +8 -0
- package/packages/locale/lang/ms-MY.ts +8 -0
- package/packages/locale/lang/nb-NO.ts +8 -0
- package/packages/locale/lang/pt-BR.ts +8 -0
- package/packages/locale/lang/ru-RU.ts +8 -0
- package/packages/locale/lang/th-TH.ts +8 -0
- package/packages/locale/lang/ug-CN.ts +8 -0
- package/packages/locale/lang/uk-UA.ts +8 -0
- package/packages/locale/lang/uz-UZ.ts +8 -0
- package/packages/locale/lang/vi-VN.ts +8 -0
- package/packages/locale/lang/zh-CHT.ts +8 -0
- package/packages/locale/lang/zh-CN.ts +8 -0
- package/packages/table/module/custom/hook.ts +31 -25
- package/packages/table/module/custom/panel.ts +7 -0
- package/packages/table/module/edit/hook.ts +0 -1
- package/packages/table/module/menu/hook.ts +12 -7
- package/packages/table/src/emits.ts +5 -0
- package/packages/table/src/table.ts +6 -1
- package/styles/theme/base.scss +2 -1
- /package/es/{iconfont.1782439515438.ttf → iconfont.1782890314097.ttf} +0 -0
- /package/es/{iconfont.1782439515438.woff → iconfont.1782890314097.woff} +0 -0
- /package/es/{iconfont.1782439515438.woff2 → iconfont.1782890314097.woff2} +0 -0
- /package/lib/{iconfont.1782439515438.ttf → iconfont.1782890314097.ttf} +0 -0
- /package/lib/{iconfont.1782439515438.woff → iconfont.1782890314097.woff} +0 -0
- /package/lib/{iconfont.1782439515438.woff2 → iconfont.1782890314097.woff2} +0 -0
|
@@ -160,38 +160,40 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
160
160
|
return openCustom()
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
const saveCustom = () => {
|
|
163
|
+
const saveCustom = (isDirectly?: boolean) => {
|
|
164
164
|
const { customColumnList, aggHandleFields, rowGroupList } = reactData
|
|
165
165
|
const customOpts = computeCustomOpts.value
|
|
166
166
|
const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
if (!isDirectly) {
|
|
168
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
169
|
+
if (parentColumn) {
|
|
169
170
|
// 更新子列信息
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
171
|
+
column.fixed = parentColumn.fixed
|
|
172
|
+
} else {
|
|
173
|
+
if (allowSort) {
|
|
174
|
+
const sortIndex = index + 1
|
|
175
|
+
column.renderSortNumber = sortIndex
|
|
176
|
+
}
|
|
177
|
+
if (allowFixed) {
|
|
178
|
+
column.fixed = column.renderFixed
|
|
179
|
+
}
|
|
178
180
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
if (allowResizable) {
|
|
182
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
183
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
184
|
+
column.resizeWidth = column.renderResizeWidth
|
|
185
|
+
column.renderWidth = column.renderResizeWidth
|
|
186
|
+
}
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
}
|
|
189
|
+
if (allowVisible) {
|
|
190
|
+
column.visible = column.renderVisible
|
|
191
|
+
}
|
|
192
|
+
if (allowGroup && allowValues) {
|
|
193
|
+
column.aggFunc = column.renderAggFn
|
|
194
|
+
}
|
|
195
|
+
})
|
|
196
|
+
}
|
|
195
197
|
reactData.isCustomStatus = true
|
|
196
198
|
if (allowGroup && !!$xeTable.handlePivotTableAggData) {
|
|
197
199
|
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
@@ -375,10 +377,12 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
375
377
|
if (customStore.visible) {
|
|
376
378
|
closeCustom()
|
|
377
379
|
emitCustomEvent('close', evnt)
|
|
380
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt)
|
|
378
381
|
} else {
|
|
379
382
|
customStore.btnEl = evnt.target as HTMLDivElement
|
|
380
383
|
openCustom()
|
|
381
384
|
emitCustomEvent('open', evnt)
|
|
385
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt)
|
|
382
386
|
}
|
|
383
387
|
},
|
|
384
388
|
customOpenEvent (evnt) {
|
|
@@ -390,6 +394,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
390
394
|
customStore.btnEl = evnt.target as HTMLDivElement
|
|
391
395
|
$xeTable.openCustom()
|
|
392
396
|
$xeTable.emitCustomEvent('open', evnt)
|
|
397
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt)
|
|
393
398
|
}
|
|
394
399
|
},
|
|
395
400
|
customCloseEvent (evnt) {
|
|
@@ -400,6 +405,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
400
405
|
customStore.activeBtn = false
|
|
401
406
|
$xeTable.closeCustom()
|
|
402
407
|
$xeTable.emitCustomEvent('close', evnt)
|
|
408
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt)
|
|
403
409
|
}
|
|
404
410
|
},
|
|
405
411
|
handleUpdateCustomColumn,
|
|
@@ -94,26 +94,33 @@ export default defineVxeComponent({
|
|
|
94
94
|
$xeTable.saveCustom()
|
|
95
95
|
$xeTable.closeCustom()
|
|
96
96
|
$xeTable.emitCustomEvent('confirm', $event)
|
|
97
|
+
$xeTable.dispatchEvent('custom-confirm', {}, $event)
|
|
97
98
|
$xeTable.emitCustomEvent('close', $event)
|
|
99
|
+
$xeTable.dispatchEvent('custom-close', {}, $event)
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
const cancelCloseEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
101
103
|
$xeTable.closeCustom()
|
|
102
104
|
$xeTable.emitCustomEvent('close', $event)
|
|
105
|
+
$xeTable.dispatchEvent('custom-close', {}, $event)
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
const cancelCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
106
109
|
$xeTable.cancelCustom()
|
|
107
110
|
$xeTable.closeCustom()
|
|
108
111
|
$xeTable.emitCustomEvent('cancel', $event)
|
|
112
|
+
$xeTable.dispatchEvent('custom-cancel', {}, $event)
|
|
109
113
|
$xeTable.emitCustomEvent('close', $event)
|
|
114
|
+
$xeTable.dispatchEvent('custom-close', {}, $event)
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
const handleResetCustomEvent = (evnt: Event) => {
|
|
113
118
|
$xeTable.resetCustom(true)
|
|
114
119
|
$xeTable.closeCustom()
|
|
115
120
|
$xeTable.emitCustomEvent('reset', evnt)
|
|
121
|
+
$xeTable.dispatchEvent('custom-reset', {}, evnt)
|
|
116
122
|
$xeTable.emitCustomEvent('close', evnt)
|
|
123
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt)
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
const resetCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
@@ -557,7 +557,6 @@ hooks.add('tableEditModule', {
|
|
|
557
557
|
return handleInsertRowAt(records, targetRowOrRowid, true)
|
|
558
558
|
},
|
|
559
559
|
insertChild (records, parentRowOrParentId) {
|
|
560
|
-
(window as any).aa = internalData
|
|
561
560
|
return handleInsertChildRowAt(records, parentRowOrParentId, null)
|
|
562
561
|
},
|
|
563
562
|
insertChildAt (records, parentRowOrParentId, targetRow) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { nextTick } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
|
-
import { getDomNode, getAbsolutePos, getEventTargetNode } from '../../../ui/src/dom'
|
|
4
|
+
import { getDomNode, getAbsolutePos, getEventTargetNode, toCssUnit } from '../../../ui/src/dom'
|
|
5
5
|
import { isEnableConf, hasChildrenList } from '../../../ui/src/utils'
|
|
6
6
|
|
|
7
|
+
import type { VxeComponentStyleType } from 'vxe-pc-ui'
|
|
7
8
|
import type { TableMenuMethods, TableMenuPrivateMethods } from '../../../../types'
|
|
8
9
|
|
|
9
10
|
const { menus, hooks, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI
|
|
@@ -31,7 +32,7 @@ hooks.add('tableMenuModule', {
|
|
|
31
32
|
const isContentMenu = computeIsContentMenu.value
|
|
32
33
|
const menuOpts = computeMenuOpts.value
|
|
33
34
|
const config = menuOpts[type]
|
|
34
|
-
const { zIndex, transfer, visibleMethod } = menuOpts
|
|
35
|
+
const { zIndex, transfer, width, visibleMethod } = menuOpts
|
|
35
36
|
if (config) {
|
|
36
37
|
const { options, disabled } = config
|
|
37
38
|
if (disabled) {
|
|
@@ -58,17 +59,21 @@ hooks.add('tableMenuModule', {
|
|
|
58
59
|
|
|
59
60
|
const handleVisible = () => {
|
|
60
61
|
internalData._currMenuParams = params
|
|
62
|
+
const ctxStyle: VxeComponentStyleType = {
|
|
63
|
+
zIndex: zIndex || internalData.tZindex,
|
|
64
|
+
top: `${top}px`,
|
|
65
|
+
left: `${left}px`
|
|
66
|
+
}
|
|
67
|
+
if (width) {
|
|
68
|
+
ctxStyle['--vxe-ui-table-menu-item-width'] = toCssUnit(width)
|
|
69
|
+
}
|
|
61
70
|
Object.assign(ctxMenuStore, {
|
|
62
71
|
visible: true,
|
|
63
72
|
list: options,
|
|
64
73
|
selected: null,
|
|
65
74
|
selectChild: null,
|
|
66
75
|
showChild: false,
|
|
67
|
-
style:
|
|
68
|
-
zIndex: zIndex || internalData.tZindex,
|
|
69
|
-
top: `${top}px`,
|
|
70
|
-
left: `${left}px`
|
|
71
|
-
}
|
|
76
|
+
style: ctxStyle
|
|
72
77
|
})
|
|
73
78
|
nextTick(() => {
|
|
74
79
|
const tableMenu = refTableMenu.value
|
|
@@ -86,6 +86,11 @@ export const tableEmits: VxeTableEmits = [
|
|
|
86
86
|
'scroll',
|
|
87
87
|
'scroll-boundary',
|
|
88
88
|
'custom',
|
|
89
|
+
'custom-open',
|
|
90
|
+
'custom-close',
|
|
91
|
+
'custom-cancel',
|
|
92
|
+
'custom-reset',
|
|
93
|
+
'custom-confirm',
|
|
89
94
|
'custom-visible-change',
|
|
90
95
|
'custom-visible-all',
|
|
91
96
|
'custom-fixed-change',
|
|
@@ -9328,11 +9328,14 @@ export default defineVxeComponent({
|
|
|
9328
9328
|
// 如果为 null 使用默认逻辑
|
|
9329
9329
|
if (XEUtils.eqNull(customContent)) {
|
|
9330
9330
|
isShow = isOver
|
|
9331
|
+
content = cellText
|
|
9331
9332
|
} else if (customContent !== '' && customContent !== false) {
|
|
9332
9333
|
// 如果为 '' | false 则不显示
|
|
9333
9334
|
isShow = true
|
|
9335
|
+
content = customContent
|
|
9336
|
+
} else {
|
|
9337
|
+
content = cellText
|
|
9334
9338
|
}
|
|
9335
|
-
content = cellText
|
|
9336
9339
|
}
|
|
9337
9340
|
if (isShow && content) {
|
|
9338
9341
|
const tipContent = formatText(content)
|
|
@@ -11480,6 +11483,7 @@ export default defineVxeComponent({
|
|
|
11480
11483
|
if (evnt.dataTransfer) {
|
|
11481
11484
|
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0)
|
|
11482
11485
|
}
|
|
11486
|
+
$xeTable.closeTooltip()
|
|
11483
11487
|
},
|
|
11484
11488
|
handleRowDragSwapEvent (evnt, isSyncRow, dragRow, prevDragRow, prevDragPos, prevDragToChild) {
|
|
11485
11489
|
const { treeConfig, dragConfig } = props
|
|
@@ -12152,6 +12156,7 @@ export default defineVxeComponent({
|
|
|
12152
12156
|
if (evnt.dataTransfer) {
|
|
12153
12157
|
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0)
|
|
12154
12158
|
}
|
|
12159
|
+
$xeTable.closeTooltip()
|
|
12155
12160
|
},
|
|
12156
12161
|
handleColDragSwapColumn () {
|
|
12157
12162
|
handleUpdateColumn()
|
package/styles/theme/base.scss
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
--vxe-ui-font-family: -apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
|
|
4
4
|
|
|
5
5
|
/*font size*/
|
|
6
|
+
--vxe-ui-font-size-large: 16px;
|
|
6
7
|
--vxe-ui-font-size-default: 14px;
|
|
7
8
|
--vxe-ui-font-size-medium: 14px;
|
|
8
|
-
--vxe-ui-font-size-small:
|
|
9
|
+
--vxe-ui-font-size-small: 12px;
|
|
9
10
|
--vxe-ui-font-size-mini: 12px;
|
|
10
11
|
|
|
11
12
|
/*base border*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|