vxe-table 4.7.65 → 4.7.66
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 +21 -11
- package/es/locale/lang/en-US.js +4 -1
- package/es/locale/lang/es-ES.js +4 -1
- package/es/locale/lang/hu-HU.js +4 -1
- package/es/locale/lang/ja-JP.js +4 -1
- package/es/locale/lang/ko-KR.js +4 -1
- package/es/locale/lang/pt-BR.js +4 -1
- package/es/locale/lang/ru-RU.js +4 -1
- package/es/locale/lang/vi-VN.js +4 -1
- package/es/locale/lang/zh-CN.js +4 -1
- package/es/locale/lang/zh-TC.js +4 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +12 -11
- package/es/table/module/edit/hook.js +11 -10
- package/es/table/module/export/hook.js +10 -6
- package/es/table/render/index.js +95 -84
- package/es/table/src/table.js +22 -2
- package/es/table/style.css +8 -4
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +7 -7
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +8 -4
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +25 -14
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +210 -141
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +4 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +4 -1
- package/lib/locale/lang/es-ES.js +4 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +4 -1
- package/lib/locale/lang/hu-HU.js +4 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +4 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +4 -1
- package/lib/locale/lang/ko-KR.js +4 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +4 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +4 -1
- package/lib/locale/lang/ru-RU.js +4 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/vi-VN.js +4 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CN.js +4 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +4 -1
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +4 -1
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +4 -1
- package/lib/locale/lang/zh-TC.js +4 -1
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +4 -1
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +4 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +18 -11
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +11 -13
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +12 -6
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/render/index.js +98 -84
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/table.js +22 -2
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +8 -4
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +17 -7
- package/lib/toolbar/src/toolbar.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/lib/vxe-table/style/style.css +8 -4
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +22 -11
- package/packages/locale/lang/en-US.ts +4 -1
- package/packages/locale/lang/es-ES.ts +4 -1
- package/packages/locale/lang/hu-HU.ts +4 -1
- package/packages/locale/lang/ja-JP.ts +4 -1
- package/packages/locale/lang/ko-KR.ts +4 -1
- package/packages/locale/lang/pt-BR.ts +4 -1
- package/packages/locale/lang/ru-RU.ts +4 -1
- package/packages/locale/lang/vi-VN.ts +4 -1
- package/packages/locale/lang/zh-CN.ts +4 -1
- package/packages/locale/lang/zh-TC.ts +4 -1
- package/packages/table/module/custom/panel.ts +13 -12
- package/packages/table/module/edit/hook.ts +11 -10
- package/packages/table/module/export/hook.ts +10 -6
- package/packages/table/render/index.ts +95 -84
- package/packages/table/src/table.ts +25 -3
- package/packages/toolbar/src/toolbar.ts +8 -8
- package/styles/components/table.scss +6 -3
- /package/es/{iconfont.1723521776225.ttf → iconfont.1724145396059.ttf} +0 -0
- /package/es/{iconfont.1723521776225.woff → iconfont.1724145396059.woff} +0 -0
- /package/es/{iconfont.1723521776225.woff2 → iconfont.1724145396059.woff2} +0 -0
- /package/lib/{iconfont.1723521776225.ttf → iconfont.1724145396059.ttf} +0 -0
- /package/lib/{iconfont.1723521776225.woff → iconfont.1724145396059.woff} +0 -0
- /package/lib/{iconfont.1723521776225.woff2 → iconfont.1724145396059.woff2} +0 -0
|
@@ -18,7 +18,7 @@ import TableImportPanelComponent from '../module/export/import-panel'
|
|
|
18
18
|
import TableExportPanelComponent from '../module/export/export-panel'
|
|
19
19
|
import TableMenuPanelComponent from '../module/menu/panel'
|
|
20
20
|
|
|
21
|
-
import type { VxeLoadingComponent, VxeTooltipInstance, VxeTooltipComponent } from 'vxe-pc-ui'
|
|
21
|
+
import type { VxeLoadingComponent, VxeTooltipInstance, VxeTooltipComponent, VxeTabsConstructor, VxeTabsPrivateMethods } from 'vxe-pc-ui'
|
|
22
22
|
import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, TableMethods, VxeTableMethods, VxeTableDefines, VxeTableProps, VxeColumnPropTypes } from '../../../types'
|
|
23
23
|
|
|
24
24
|
const { getConfig, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns } = VxeUI
|
|
@@ -40,6 +40,8 @@ export default defineComponent({
|
|
|
40
40
|
const VxeUILoadingComponent = VxeUI.getComponent<VxeLoadingComponent>('VxeLoading')
|
|
41
41
|
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
42
42
|
|
|
43
|
+
const $xeTabs = inject<(VxeTabsConstructor & VxeTabsPrivateMethods) | null>('$xeTabs', null)
|
|
44
|
+
|
|
43
45
|
const { computeSize } = useFns.useSize(props)
|
|
44
46
|
|
|
45
47
|
const reactData = reactive<TableReactData>({
|
|
@@ -3273,6 +3275,11 @@ export default defineComponent({
|
|
|
3273
3275
|
const fullColumnFieldData = internalData.fullColumnFieldData
|
|
3274
3276
|
return field && fullColumnFieldData[field] ? fullColumnFieldData[field].column : null
|
|
3275
3277
|
},
|
|
3278
|
+
getParentColumn (fieldOrColumn) {
|
|
3279
|
+
const fullColumnIdData = internalData.fullColumnIdData
|
|
3280
|
+
const column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
3281
|
+
return column && column.parentId && fullColumnIdData[column.parentId] ? fullColumnIdData[column.parentId].column : null
|
|
3282
|
+
},
|
|
3276
3283
|
/**
|
|
3277
3284
|
* 获取当前表格的列
|
|
3278
3285
|
* 收集到的全量列、全量表头列、处理条件之后的全量表头列、当前渲染中的表头列
|
|
@@ -3551,10 +3558,14 @@ export default defineComponent({
|
|
|
3551
3558
|
* 计算单元格列宽,动态分配可用剩余空间
|
|
3552
3559
|
* 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
|
|
3553
3560
|
*/
|
|
3554
|
-
recalculate (
|
|
3561
|
+
recalculate (reFull?: boolean) {
|
|
3562
|
+
const el = refElem.value
|
|
3563
|
+
if (!el || !el.clientWidth) {
|
|
3564
|
+
return nextTick()
|
|
3565
|
+
}
|
|
3555
3566
|
calcCellWidth()
|
|
3556
3567
|
autoCellWidth()
|
|
3557
|
-
if (
|
|
3568
|
+
if (reFull === true) {
|
|
3558
3569
|
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
3559
3570
|
return computeScrollLoad().then(() => {
|
|
3560
3571
|
autoCellWidth()
|
|
@@ -5251,6 +5262,10 @@ export default defineComponent({
|
|
|
5251
5262
|
if ($xeTable.closeMenu) {
|
|
5252
5263
|
$xeTable.closeMenu()
|
|
5253
5264
|
}
|
|
5265
|
+
const el = refElem.value
|
|
5266
|
+
if (!el || !el.clientWidth) {
|
|
5267
|
+
return nextTick()
|
|
5268
|
+
}
|
|
5254
5269
|
tableMethods.updateCellAreas()
|
|
5255
5270
|
tableMethods.recalculate(true)
|
|
5256
5271
|
}
|
|
@@ -6686,6 +6701,12 @@ export default defineComponent({
|
|
|
6686
6701
|
})
|
|
6687
6702
|
})
|
|
6688
6703
|
|
|
6704
|
+
if ($xeTabs) {
|
|
6705
|
+
watch(() => $xeTabs ? $xeTabs.reactData.resizeFlag : null, () => {
|
|
6706
|
+
handleGlobalResizeEvent()
|
|
6707
|
+
})
|
|
6708
|
+
}
|
|
6709
|
+
|
|
6689
6710
|
hooks.forEach((options) => {
|
|
6690
6711
|
const { setupTable } = options
|
|
6691
6712
|
if (setupTable) {
|
|
@@ -6971,6 +6992,7 @@ export default defineComponent({
|
|
|
6971
6992
|
'is--virtual-x': scrollXLoad,
|
|
6972
6993
|
'is--virtual-y': scrollYLoad
|
|
6973
6994
|
}],
|
|
6995
|
+
spellcheck: false,
|
|
6974
6996
|
onKeydown: keydownEvent
|
|
6975
6997
|
}, [
|
|
6976
6998
|
/**
|
|
@@ -4,7 +4,7 @@ import { VxeUI } from '../../ui'
|
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
5
5
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
6
6
|
|
|
7
|
-
import type { VxeButtonComponent } from 'vxe-pc-ui'
|
|
7
|
+
import type { VxeButtonComponent, VxeButtonEvents } from 'vxe-pc-ui'
|
|
8
8
|
import type { VxeGridConstructor, GridPrivateMethods, ToolbarMethods, VxeToolbarConstructor, VxeToolbarEmits, VxeToolbarPropTypes, VxeTableConstructor, ToolbarPrivateRef, VxeTableMethods, VxeTablePrivateMethods, ToolbarReactData } from '../../../types'
|
|
9
9
|
|
|
10
10
|
const { getConfig, getIcon, getI18n, renderer, commands, createEvent, useFns } = VxeUI
|
|
@@ -146,7 +146,7 @@ export default defineComponent({
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
const refreshEvent = (
|
|
149
|
+
const refreshEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
150
150
|
const { isRefresh } = reactData
|
|
151
151
|
const refreshOpts = computeRefreshOpts.value
|
|
152
152
|
if (!isRefresh) {
|
|
@@ -162,16 +162,16 @@ export default defineComponent({
|
|
|
162
162
|
}
|
|
163
163
|
} else if ($xeGrid) {
|
|
164
164
|
reactData.isRefresh = true
|
|
165
|
-
$xeGrid.triggerToolbarCommitEvent({ code: refreshOpts.code || 'reload' },
|
|
165
|
+
$xeGrid.triggerToolbarCommitEvent({ code: refreshOpts.code || 'reload' }, $event).catch((e) => e).then(() => {
|
|
166
166
|
reactData.isRefresh = false
|
|
167
167
|
})
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
const zoomEvent = (
|
|
172
|
+
const zoomEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
173
173
|
if ($xeGrid) {
|
|
174
|
-
$xeGrid.triggerZoomEvent(
|
|
174
|
+
$xeGrid.triggerZoomEvent($event)
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -270,7 +270,7 @@ export default defineComponent({
|
|
|
270
270
|
round: child.round,
|
|
271
271
|
status: child.status,
|
|
272
272
|
content: child.name,
|
|
273
|
-
onClick: (
|
|
273
|
+
onClick: ({ $event }) => isBtn ? btnEvent($event, child) : tolEvent($event, child)
|
|
274
274
|
})
|
|
275
275
|
: createCommentVNode()
|
|
276
276
|
})
|
|
@@ -319,7 +319,7 @@ export default defineComponent({
|
|
|
319
319
|
destroyOnClose: item.destroyOnClose,
|
|
320
320
|
placement: item.placement,
|
|
321
321
|
transfer: item.transfer,
|
|
322
|
-
onClick: (
|
|
322
|
+
onClick: ({ $event }) => btnEvent($event, item)
|
|
323
323
|
}, dropdowns && dropdowns.length
|
|
324
324
|
? {
|
|
325
325
|
dropdowns: () => renderDropdowns(item, true)
|
|
@@ -377,7 +377,7 @@ export default defineComponent({
|
|
|
377
377
|
destroyOnClose: item.destroyOnClose,
|
|
378
378
|
placement: item.placement,
|
|
379
379
|
transfer: item.transfer,
|
|
380
|
-
onClick: (
|
|
380
|
+
onClick: ({ $event }) => tolEvent($event, item)
|
|
381
381
|
}, dropdowns && dropdowns.length
|
|
382
382
|
? {
|
|
383
383
|
dropdowns: () => renderDropdowns(item, false)
|
|
@@ -94,7 +94,8 @@
|
|
|
94
94
|
& > .vxe-select,
|
|
95
95
|
& > .vxe-tree-select,
|
|
96
96
|
& > .vxe-date-picker,
|
|
97
|
-
& > .vxe-number-input
|
|
97
|
+
& > .vxe-number-input,
|
|
98
|
+
& > .vxe-ico-picker {
|
|
98
99
|
width: 100%;
|
|
99
100
|
}
|
|
100
101
|
& > .vxe-input > .vxe-input--inner,
|
|
@@ -111,7 +112,8 @@
|
|
|
111
112
|
.vxe-select,
|
|
112
113
|
.vxe-tree-select,
|
|
113
114
|
.vxe-date-picker,
|
|
114
|
-
.vxe-number-input
|
|
115
|
+
.vxe-number-input,
|
|
116
|
+
.vxe-ico-picker {
|
|
115
117
|
width: 100%;
|
|
116
118
|
}
|
|
117
119
|
.vxe-input > .vxe-input--inner,
|
|
@@ -1277,7 +1279,8 @@
|
|
|
1277
1279
|
.vxe-default-select {
|
|
1278
1280
|
border-color: var(--vxe-ui-table-validate-error-color);
|
|
1279
1281
|
}
|
|
1280
|
-
.vxe-input
|
|
1282
|
+
.vxe-input,
|
|
1283
|
+
.vxe-ico-picker {
|
|
1281
1284
|
border-color: var(--vxe-ui-table-validate-error-color);
|
|
1282
1285
|
}
|
|
1283
1286
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|