vxe-table 4.23.11 → 4.23.13
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 +20675 -20631
- package/dist/all.esm.min.js +3 -0
- package/es/colgroup/index.d.ts +18 -18
- package/es/column/index.d.ts +18 -18
- package/es/grid/index.d.ts +174 -174
- package/es/grid/src/emits.d.ts +1 -1
- package/es/grid/src/emits.js +3 -3
- package/es/grid/src/grid.d.ts +27 -27
- package/es/grid/src/grid.js +1670 -1667
- package/es/grid/src/props.d.ts +2 -2
- package/es/grid/src/props.js +4 -4
- package/es/index.esm.js +1 -0
- package/es/index.js +1 -0
- package/es/table/index.d.ts +174 -174
- package/es/table/module/custom/panel.js +1588 -1585
- package/es/table/module/export/export-panel.js +587 -584
- package/es/table/module/export/import-panel.js +258 -255
- package/es/table/module/filter/hook.js +1 -15
- package/es/table/module/filter/panel.js +281 -278
- package/es/table/module/menu/panel.js +225 -222
- package/es/table/src/body.js +895 -892
- package/es/table/src/column.d.ts +3 -3
- package/es/table/src/column.js +39 -36
- package/es/table/src/emits.d.ts +1 -1
- package/es/table/src/emits.js +2 -2
- package/es/table/src/footer.d.ts +2 -2
- package/es/table/src/footer.js +341 -338
- package/es/table/src/group.d.ts +3 -3
- package/es/table/src/group.js +49 -46
- package/es/table/src/header.js +539 -536
- package/es/table/src/props.d.ts +2 -2
- package/es/table/src/props.js +2 -2
- package/es/table/src/table.d.ts +27 -27
- package/es/table/src/table.js +13744 -13724
- package/es/toolbar/index.d.ts +18 -18
- package/es/toolbar/src/toolbar.d.ts +3 -3
- package/es/toolbar/src/toolbar.js +595 -592
- package/es/ui/index.js +2 -1
- package/es/ui/src/dom.d.ts +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.d.ts +2 -2
- package/lib/colgroup/index.d.ts +760 -0
- package/lib/column/index.d.ts +760 -0
- package/lib/components.d.ts +13 -0
- package/lib/grid/index.d.ts +2824 -0
- package/lib/grid/src/emits.d.ts +2 -0
- package/lib/grid/src/emits.js +2 -2
- package/lib/grid/src/grid.d.ts +556 -0
- package/lib/grid/src/grid.js +1666 -1663
- package/lib/grid/src/props.d.ts +200 -0
- package/lib/grid/src/props.js +3 -3
- package/lib/index.common.js +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +1 -0
- package/lib/index.umd.js +20675 -20631
- package/lib/index.umd.min.js +3 -3
- package/lib/locale/ar-EG.umd.d.ts +908 -0
- package/lib/locale/ar-EG.umd.min.js +1 -0
- package/lib/locale/de-DE.umd.d.ts +908 -0
- package/lib/locale/de-DE.umd.min.js +1 -0
- package/lib/locale/en-US.umd.d.ts +908 -0
- package/lib/locale/en-US.umd.min.js +1 -0
- package/lib/locale/es-ES.umd.d.ts +908 -0
- package/lib/locale/es-ES.umd.min.js +1 -0
- package/lib/locale/fr-FR.umd.d.ts +908 -0
- package/lib/locale/fr-FR.umd.min.js +1 -0
- package/lib/locale/hu-HU.umd.d.ts +908 -0
- package/lib/locale/hu-HU.umd.min.js +1 -0
- package/lib/locale/hy-AM.umd.d.ts +908 -0
- package/lib/locale/hy-AM.umd.min.js +1 -0
- package/lib/locale/id-ID.umd.d.ts +908 -0
- package/lib/locale/id-ID.umd.min.js +1 -0
- package/lib/locale/it-IT.umd.d.ts +908 -0
- package/lib/locale/it-IT.umd.min.js +1 -0
- package/lib/locale/ja-JP.umd.d.ts +908 -0
- package/lib/locale/ja-JP.umd.min.js +1 -0
- package/lib/locale/ko-KR.umd.d.ts +908 -0
- package/lib/locale/ko-KR.umd.min.js +1 -0
- package/lib/locale/lang/ar-EG.d.ts +908 -0
- package/lib/locale/lang/ar-EG.umd.d.ts +908 -0
- package/lib/locale/lang/ar-EG.umd.min.js +1 -0
- package/lib/locale/lang/de-DE.d.ts +908 -0
- package/lib/locale/lang/de-DE.umd.d.ts +908 -0
- package/lib/locale/lang/de-DE.umd.min.js +1 -0
- package/lib/locale/lang/en-US.d.ts +908 -0
- package/lib/locale/lang/en-US.umd.d.ts +908 -0
- package/lib/locale/lang/en-US.umd.min.js +1 -0
- package/lib/locale/lang/es-ES.d.ts +908 -0
- package/lib/locale/lang/es-ES.umd.d.ts +908 -0
- package/lib/locale/lang/es-ES.umd.min.js +1 -0
- package/lib/locale/lang/fr-FR.d.ts +908 -0
- package/lib/locale/lang/fr-FR.umd.d.ts +908 -0
- package/lib/locale/lang/fr-FR.umd.min.js +1 -0
- package/lib/locale/lang/hu-HU.d.ts +908 -0
- package/lib/locale/lang/hu-HU.umd.d.ts +908 -0
- package/lib/locale/lang/hu-HU.umd.min.js +1 -0
- package/lib/locale/lang/hy-AM.d.ts +908 -0
- package/lib/locale/lang/hy-AM.umd.d.ts +908 -0
- package/lib/locale/lang/hy-AM.umd.min.js +1 -0
- package/lib/locale/lang/id-ID.d.ts +908 -0
- package/lib/locale/lang/id-ID.umd.d.ts +908 -0
- package/lib/locale/lang/id-ID.umd.min.js +1 -0
- package/lib/locale/lang/it-IT.d.ts +908 -0
- package/lib/locale/lang/it-IT.umd.d.ts +908 -0
- package/lib/locale/lang/it-IT.umd.min.js +1 -0
- package/lib/locale/lang/ja-JP.d.ts +908 -0
- package/lib/locale/lang/ja-JP.umd.d.ts +908 -0
- package/lib/locale/lang/ja-JP.umd.min.js +1 -0
- package/lib/locale/lang/ko-KR.d.ts +908 -0
- package/lib/locale/lang/ko-KR.umd.d.ts +908 -0
- package/lib/locale/lang/ko-KR.umd.min.js +1 -0
- package/lib/locale/lang/ms-MY.d.ts +908 -0
- package/lib/locale/lang/ms-MY.umd.d.ts +908 -0
- package/lib/locale/lang/ms-MY.umd.min.js +1 -0
- package/lib/locale/lang/nb-NO.d.ts +908 -0
- package/lib/locale/lang/nb-NO.umd.d.ts +908 -0
- package/lib/locale/lang/nb-NO.umd.min.js +1 -0
- package/lib/locale/lang/pt-BR.d.ts +908 -0
- package/lib/locale/lang/pt-BR.umd.d.ts +908 -0
- package/lib/locale/lang/pt-BR.umd.min.js +1 -0
- package/lib/locale/lang/ru-RU.d.ts +908 -0
- package/lib/locale/lang/ru-RU.umd.d.ts +908 -0
- package/lib/locale/lang/ru-RU.umd.min.js +1 -0
- package/lib/locale/lang/th-TH.d.ts +908 -0
- package/lib/locale/lang/th-TH.umd.d.ts +908 -0
- package/lib/locale/lang/th-TH.umd.min.js +1 -0
- package/lib/locale/lang/ug-CN.d.ts +908 -0
- package/lib/locale/lang/ug-CN.umd.d.ts +908 -0
- package/lib/locale/lang/ug-CN.umd.min.js +1 -0
- package/lib/locale/lang/uk-UA.d.ts +908 -0
- package/lib/locale/lang/uk-UA.umd.d.ts +908 -0
- package/lib/locale/lang/uk-UA.umd.min.js +1 -0
- package/lib/locale/lang/uz-UZ.d.ts +908 -0
- package/lib/locale/lang/uz-UZ.umd.d.ts +908 -0
- package/lib/locale/lang/uz-UZ.umd.min.js +1 -0
- package/lib/locale/lang/vi-VN.d.ts +908 -0
- package/lib/locale/lang/vi-VN.umd.d.ts +908 -0
- package/lib/locale/lang/vi-VN.umd.min.js +1 -0
- package/lib/locale/lang/zh-CHT.d.ts +908 -0
- package/lib/locale/lang/zh-CHT.umd.d.ts +908 -0
- package/lib/locale/lang/zh-CHT.umd.min.js +1 -0
- package/lib/locale/lang/zh-CN.d.ts +908 -0
- package/lib/locale/lang/zh-CN.umd.d.ts +908 -0
- package/lib/locale/lang/zh-CN.umd.min.js +1 -0
- package/lib/locale/lang/zh-HK.d.ts +908 -0
- package/lib/locale/lang/zh-HK.umd.d.ts +908 -0
- package/lib/locale/lang/zh-HK.umd.min.js +1 -0
- package/lib/locale/lang/zh-MO.d.ts +908 -0
- package/lib/locale/lang/zh-MO.umd.d.ts +908 -0
- package/lib/locale/lang/zh-MO.umd.min.js +1 -0
- package/lib/locale/lang/zh-TC.d.ts +908 -0
- package/lib/locale/lang/zh-TC.umd.d.ts +908 -0
- package/lib/locale/lang/zh-TC.umd.min.js +1 -0
- package/lib/locale/lang/zh-TW.d.ts +908 -0
- package/lib/locale/lang/zh-TW.umd.d.ts +908 -0
- package/lib/locale/lang/zh-TW.umd.min.js +1 -0
- package/lib/locale/ms-MY.umd.d.ts +908 -0
- package/lib/locale/ms-MY.umd.min.js +1 -0
- package/lib/locale/nb-NO.umd.d.ts +908 -0
- package/lib/locale/nb-NO.umd.min.js +1 -0
- package/lib/locale/pt-BR.umd.d.ts +908 -0
- package/lib/locale/pt-BR.umd.min.js +1 -0
- package/lib/locale/ru-RU.umd.d.ts +908 -0
- package/lib/locale/ru-RU.umd.min.js +1 -0
- package/lib/locale/th-TH.umd.d.ts +908 -0
- package/lib/locale/th-TH.umd.min.js +1 -0
- package/lib/locale/ug-CN.umd.d.ts +908 -0
- package/lib/locale/ug-CN.umd.min.js +1 -0
- package/lib/locale/uk-UA.umd.d.ts +908 -0
- package/lib/locale/uk-UA.umd.min.js +1 -0
- package/lib/locale/uz-UZ.umd.d.ts +908 -0
- package/lib/locale/uz-UZ.umd.min.js +1 -0
- package/lib/locale/vi-VN.umd.d.ts +908 -0
- package/lib/locale/vi-VN.umd.min.js +1 -0
- package/lib/locale/zh-CHT.umd.d.ts +908 -0
- package/lib/locale/zh-CHT.umd.min.js +1 -0
- package/lib/locale/zh-CN.umd.d.ts +908 -0
- package/lib/locale/zh-CN.umd.min.js +1 -0
- package/lib/locale/zh-HK.umd.d.ts +908 -0
- package/lib/locale/zh-HK.umd.min.js +1 -0
- package/lib/locale/zh-MO.umd.d.ts +908 -0
- package/lib/locale/zh-MO.umd.min.js +1 -0
- package/lib/locale/zh-TC.umd.d.ts +908 -0
- package/lib/locale/zh-TC.umd.min.js +1 -0
- package/lib/locale/zh-TW.umd.d.ts +908 -0
- package/lib/locale/zh-TW.umd.min.js +1 -0
- package/lib/table/index.d.ts +2672 -0
- package/lib/table/module/custom/hook.d.ts +1 -0
- package/lib/table/module/custom/panel.d.ts +17 -0
- package/lib/table/module/custom/panel.js +1588 -1585
- package/lib/table/module/edit/hook.d.ts +1 -0
- package/lib/table/module/export/export-panel.d.ts +27 -0
- package/lib/table/module/export/export-panel.js +587 -584
- package/lib/table/module/export/hook.d.ts +1 -0
- package/lib/table/module/export/import-panel.d.ts +27 -0
- package/lib/table/module/export/import-panel.js +258 -255
- package/lib/table/module/export/util.d.ts +5 -0
- package/lib/table/module/filter/hook.d.ts +1 -0
- package/lib/table/module/filter/hook.js +1 -15
- package/lib/table/module/filter/panel.d.ts +16 -0
- package/lib/table/module/filter/panel.js +281 -278
- package/lib/table/module/keyboard/hook.d.ts +1 -0
- package/lib/table/module/menu/hook.d.ts +1 -0
- package/lib/table/module/menu/panel.d.ts +2 -0
- package/lib/table/module/menu/panel.js +225 -222
- package/lib/table/module/validator/hook.d.ts +1 -0
- package/lib/table/render/index.d.ts +1 -0
- package/lib/table/src/body.d.ts +24 -0
- package/lib/table/src/body.js +895 -892
- package/lib/table/src/cell.d.ts +192 -0
- package/lib/table/src/column.d.ts +263 -0
- package/lib/table/src/column.js +39 -36
- package/lib/table/src/columnInfo.d.ts +13 -0
- package/lib/table/src/emits.d.ts +2 -0
- package/lib/table/src/emits.js +2 -2
- package/lib/table/src/footer.d.ts +45 -0
- package/lib/table/src/footer.js +341 -338
- package/lib/table/src/group.d.ts +178 -0
- package/lib/table/src/group.js +49 -46
- package/lib/table/src/header.d.ts +26 -0
- package/lib/table/src/header.js +539 -536
- package/lib/table/src/props.d.ts +238 -0
- package/lib/table/src/props.js +2 -2
- package/lib/table/src/store.d.ts +6 -0
- package/lib/table/src/table.d.ts +539 -0
- package/lib/table/src/table.js +13742 -13722
- package/lib/table/src/use/cell-view.d.ts +10 -0
- package/lib/table/src/use/index.d.ts +1 -0
- package/lib/table/src/util.d.ts +74 -0
- package/lib/toolbar/index.d.ts +340 -0
- package/lib/toolbar/src/toolbar.d.ts +75 -0
- package/lib/toolbar/src/toolbar.js +595 -592
- package/lib/ui/index.d.ts +85 -0
- package/lib/ui/index.js +2 -1
- package/lib/ui/src/anime.d.ts +10 -0
- package/lib/ui/src/comp.d.ts +2 -0
- package/lib/ui/src/dom.d.ts +80 -0
- package/lib/ui/src/log.d.ts +6 -0
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/utils.d.ts +23 -0
- package/lib/ui/src/vn.d.ts +7 -0
- package/lib/v-x-e-table/index.d.ts +2 -0
- package/lib/vxe-colgroup/index.d.ts +3 -0
- package/lib/vxe-column/index.d.ts +3 -0
- package/lib/vxe-grid/index.d.ts +3 -0
- package/lib/vxe-table/index.d.ts +3 -0
- package/lib/vxe-toolbar/index.d.ts +3 -0
- package/lib/vxe-ui/index.d.ts +3 -0
- package/package.json +9 -2
- package/packages/grid/src/emits.ts +2 -2
- package/packages/grid/src/grid.ts +10 -10
- package/packages/grid/src/props.ts +3 -3
- package/packages/index.ts +2 -2
- package/packages/table/module/custom/panel.ts +2 -2
- package/packages/table/module/export/export-panel.ts +2 -2
- package/packages/table/module/export/import-panel.ts +2 -2
- package/packages/table/module/filter/hook.ts +1 -15
- package/packages/table/module/filter/panel.ts +2 -2
- package/packages/table/module/menu/panel.ts +2 -2
- package/packages/table/src/body.ts +2 -2
- package/packages/table/src/column.ts +2 -2
- package/packages/table/src/emits.ts +1 -1
- package/packages/table/src/footer.ts +2 -2
- package/packages/table/src/group.ts +2 -2
- package/packages/table/src/header.ts +2 -2
- package/packages/table/src/props.ts +1 -1
- package/packages/table/src/table.ts +74 -57
- package/packages/toolbar/src/toolbar.ts +2 -2
- package/packages/ui/index.ts +1 -0
- /package/dist/{iconfont.1793016957545.ttf → iconfont.1793627868721.ttf} +0 -0
- /package/dist/{iconfont.1793016957545.woff → iconfont.1793627868721.woff} +0 -0
- /package/dist/{iconfont.1793016957545.woff2 → iconfont.1793627868721.woff2} +0 -0
- /package/es/{iconfont.1793016957545.ttf → iconfont.1793627868721.ttf} +0 -0
- /package/es/{iconfont.1793016957545.woff → iconfont.1793627868721.woff} +0 -0
- /package/es/{iconfont.1793016957545.woff2 → iconfont.1793627868721.woff2} +0 -0
- /package/lib/{iconfont.1793016957545.ttf → iconfont.1793627868721.ttf} +0 -0
- /package/lib/{iconfont.1793016957545.woff → iconfont.1793627868721.woff} +0 -0
- /package/lib/{iconfont.1793016957545.woff2 → iconfont.1793627868721.woff2} +0 -0
|
@@ -44,8 +44,8 @@ import Cell from './cell'
|
|
|
44
44
|
import TableBodyComponent from './body'
|
|
45
45
|
import TableHeaderComponent from './header'
|
|
46
46
|
import TableFooterComponent from './footer'
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
47
|
+
import { tableComponenProps } from './props'
|
|
48
|
+
import { tableComponenEmits } from './emits'
|
|
49
49
|
import TableCustomPanelComponent from '../module/custom/panel'
|
|
50
50
|
import TableFilterPanelComponent from '../module/filter/panel'
|
|
51
51
|
import TableImportPanelComponent from '../module/export/import-panel'
|
|
@@ -83,7 +83,7 @@ import type {
|
|
|
83
83
|
|
|
84
84
|
const { warnLog, errLog } = createComponentLog('table')
|
|
85
85
|
|
|
86
|
-
const { getConfig, getIcon, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, domUtils, globalEvents, GLOBAL_EVENT_KEYS, useFns, renderEmptyElement } = VxeUI
|
|
86
|
+
const { getConfig, getIcon, getI18n, renderer, formats, createEvent, dbUtils, globalResize, interceptor, hooks, domUtils, globalEvents, GLOBAL_EVENT_KEYS, useFns, renderEmptyElement } = VxeUI
|
|
87
87
|
|
|
88
88
|
const supportMaxRow = 5e6
|
|
89
89
|
const customStorageKey = 'VXE_CUSTOM_STORE'
|
|
@@ -97,10 +97,10 @@ let crossTableDragRowObj: {
|
|
|
97
97
|
$newTable: (VxeTableConstructor & VxeTablePrivateMethods) | null
|
|
98
98
|
} | null = null
|
|
99
99
|
|
|
100
|
-
export default defineVxeComponent({
|
|
100
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
101
101
|
name: 'VxeTable',
|
|
102
|
-
props:
|
|
103
|
-
emits:
|
|
102
|
+
props: tableComponenProps,
|
|
103
|
+
emits: tableComponenEmits,
|
|
104
104
|
setup(props, context) {
|
|
105
105
|
const { slots, emit } = context
|
|
106
106
|
|
|
@@ -1080,8 +1080,13 @@ export default defineVxeComponent({
|
|
|
1080
1080
|
xegrid: $xeGrid
|
|
1081
1081
|
} as unknown as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods
|
|
1082
1082
|
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1083
|
+
const customStoreDB = dbUtils
|
|
1084
|
+
? dbUtils.createStore<VxeTableDefines.CustomStoreData>(customStorageKey, {
|
|
1085
|
+
driver: computeCustomOpts.value.storeDriver
|
|
1086
|
+
})
|
|
1087
|
+
: null
|
|
1088
|
+
|
|
1089
|
+
const { refTrackXElem, refTrackYElem, refThumbXElem, refThumbYElem, updateThumbSize, updateThumbOffset, clickTrackXEvent, clickTrackYEvent, pointerdownThumbXEvent, pointermoveThumbXEvent, cleatPointerThumbEvent, pointerdownThumbYEvent, pointermoveThumbYEvent } = useFns.useInitVScrollbar($xeTable)
|
|
1085
1090
|
|
|
1086
1091
|
const eqCellValue = (newRow: any, oldRow: any, field: string) => {
|
|
1087
1092
|
const val1 = XEUtils.get(newRow, field)
|
|
@@ -1111,19 +1116,43 @@ export default defineVxeComponent({
|
|
|
1111
1116
|
return orders[oIndex < orders.length ? oIndex : 0]
|
|
1112
1117
|
}
|
|
1113
1118
|
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
+
/**
|
|
1120
|
+
* 获取个性化数据
|
|
1121
|
+
*/
|
|
1122
|
+
function getCustomStorageMap(id: string) {
|
|
1123
|
+
if (customStoreDB) {
|
|
1124
|
+
return customStoreDB.getById(id).then((dbRest) => (dbRest ? dbRest.data : {}))
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
// 已废弃,兼容旧版本
|
|
1128
|
+
return new Promise<VxeTableDefines.CustomStoreData>((resolve) => {
|
|
1129
|
+
const version = getConfig().version
|
|
1130
|
+
const rest = XEUtils.toStringJSON(localStorage.getItem(customStorageKey) || '')
|
|
1131
|
+
const maps = rest && rest._v === version ? rest : { _v: version }
|
|
1132
|
+
resolve((id ? maps[id] : maps) || {})
|
|
1133
|
+
})
|
|
1119
1134
|
}
|
|
1120
1135
|
|
|
1136
|
+
/**
|
|
1137
|
+
* 更新个性化数据
|
|
1138
|
+
* 储存结构以 id 为 key, 储存个性化数据,上升版本号可以用于重置组件保存的数据
|
|
1139
|
+
* {
|
|
1140
|
+
* [id: string]: VxeTableDefines.CustomStoreData,
|
|
1141
|
+
* v: 1
|
|
1142
|
+
* }
|
|
1143
|
+
*/
|
|
1121
1144
|
const setCustomStorageMap = (id: string, data: any) => {
|
|
1145
|
+
if (customStoreDB) {
|
|
1146
|
+
return customStoreDB.updateById(id, data)
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
// 已废弃,兼容旧版本
|
|
1122
1150
|
const version = getConfig().version
|
|
1123
|
-
const
|
|
1151
|
+
const rest = XEUtils.toStringJSON(localStorage.getItem(customStorageKey) || '')
|
|
1152
|
+
const maps = rest && rest._v === version ? rest : { _v: version }
|
|
1124
1153
|
maps[id] = data || undefined
|
|
1125
|
-
maps._v = version
|
|
1126
1154
|
localStorage.setItem(customStorageKey, XEUtils.toJSONString(maps))
|
|
1155
|
+
return Promise.resolve()
|
|
1127
1156
|
}
|
|
1128
1157
|
|
|
1129
1158
|
const getRecoverRowMaps = (keyMaps: Record<string, any>) => {
|
|
@@ -1879,20 +1908,21 @@ export default defineVxeComponent({
|
|
|
1879
1908
|
errLog('vxe.error.reqProp', ['id'])
|
|
1880
1909
|
return
|
|
1881
1910
|
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1911
|
+
return getCustomStorageMap(tableId).then((storeData) => {
|
|
1912
|
+
if (restoreStore) {
|
|
1913
|
+
return Promise.resolve(restoreStore({ $table: $xeTable, id: tableId, type: 'restore', storeData }))
|
|
1914
|
+
.then((storeData) => {
|
|
1915
|
+
if (!storeData) {
|
|
1916
|
+
return
|
|
1917
|
+
}
|
|
1918
|
+
return handleCustomRestore(storeData)
|
|
1919
|
+
})
|
|
1920
|
+
.catch((e) => e)
|
|
1921
|
+
}
|
|
1893
1922
|
return handleCustomRestore(storeData)
|
|
1894
|
-
}
|
|
1923
|
+
})
|
|
1895
1924
|
}
|
|
1925
|
+
return Promise.resolve()
|
|
1896
1926
|
}
|
|
1897
1927
|
|
|
1898
1928
|
const updateColumnAllOverflow = () => {
|
|
@@ -2336,8 +2366,8 @@ export default defineVxeComponent({
|
|
|
2336
2366
|
const reHeight = calcCellAutoHeight(rowid, rowRest, el)
|
|
2337
2367
|
rowRest.height = Math.max(defaultRowHeight, reHeight)
|
|
2338
2368
|
}
|
|
2339
|
-
el.removeAttribute('data-calc-row')
|
|
2340
2369
|
})
|
|
2370
|
+
el.removeAttribute('data-calc-row')
|
|
2341
2371
|
reactData.calcCellHeightFlag++
|
|
2342
2372
|
}
|
|
2343
2373
|
}
|
|
@@ -4483,6 +4513,7 @@ export default defineVxeComponent({
|
|
|
4483
4513
|
}
|
|
4484
4514
|
})
|
|
4485
4515
|
}
|
|
4516
|
+
const oldVisibleColumn = internalData.visibleColumn
|
|
4486
4517
|
const visibleColumn = leftList.concat(centerList).concat(rightList)
|
|
4487
4518
|
internalData.visibleColumn = visibleColumn
|
|
4488
4519
|
updateColumnOffsetLeft()
|
|
@@ -4521,7 +4552,7 @@ export default defineVxeComponent({
|
|
|
4521
4552
|
}
|
|
4522
4553
|
// 如果列被显示/隐藏,则清除合并状态
|
|
4523
4554
|
// 如果列被设置为固定,则清除合并状态
|
|
4524
|
-
if (
|
|
4555
|
+
if (oldVisibleColumn.length !== visibleColumn.length || !visibleColumn.every((column, index) => column === oldVisibleColumn[index])) {
|
|
4525
4556
|
$xeTable.clearMergeCells()
|
|
4526
4557
|
$xeTable.clearMergeFooterItems()
|
|
4527
4558
|
}
|
|
@@ -6719,8 +6750,8 @@ export default defineVxeComponent({
|
|
|
6719
6750
|
if (rowRest) {
|
|
6720
6751
|
rowRest.resizeHeight = calcCellAutoHeight(rowid, rowRest, el)
|
|
6721
6752
|
}
|
|
6722
|
-
el.removeAttribute('data-calc-row')
|
|
6723
6753
|
})
|
|
6754
|
+
el.removeAttribute('data-calc-row')
|
|
6724
6755
|
reactData.calcCellHeightFlag++
|
|
6725
6756
|
}
|
|
6726
6757
|
return nextTick()
|
|
@@ -7080,7 +7111,11 @@ export default defineVxeComponent({
|
|
|
7080
7111
|
}
|
|
7081
7112
|
}
|
|
7082
7113
|
if (reserve) {
|
|
7083
|
-
|
|
7114
|
+
if (treeConfig) {
|
|
7115
|
+
XEUtils.eachTree(tableFullData, (row) => handleCheckboxReserveRow(row, false), { children: childrenField })
|
|
7116
|
+
} else {
|
|
7117
|
+
tableFullData.forEach((row) => handleCheckboxReserveRow(row, false))
|
|
7118
|
+
}
|
|
7084
7119
|
}
|
|
7085
7120
|
reactData.isAllSelected = false
|
|
7086
7121
|
reactData.isIndeterminate = false
|
|
@@ -8858,12 +8893,7 @@ export default defineVxeComponent({
|
|
|
8858
8893
|
}
|
|
8859
8894
|
}
|
|
8860
8895
|
} else if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
8861
|
-
if (
|
|
8862
|
-
!getEventTargetNode(evnt, el).flag &&
|
|
8863
|
-
!($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.getRefMaps().refElem.value).flag) &&
|
|
8864
|
-
!(tableMenu && getEventTargetNode(evnt, tableMenu.getRefMaps().refElem.value).flag) &&
|
|
8865
|
-
!($xeToolbar && getEventTargetNode(evnt, $xeToolbar.getRefMaps().refElem.value).flag)
|
|
8866
|
-
) {
|
|
8896
|
+
if (!getEventTargetNode(evnt, el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.getRefMaps().refElem.value).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.getRefMaps().refElem.value).flag) && !($xeToolbar && getEventTargetNode(evnt, $xeToolbar.getRefMaps().refElem.value).flag)) {
|
|
8867
8897
|
if ($xeTable.clearSelected) {
|
|
8868
8898
|
$xeTable.clearSelected()
|
|
8869
8899
|
}
|
|
@@ -9299,8 +9329,8 @@ export default defineVxeComponent({
|
|
|
9299
9329
|
} else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
9300
9330
|
if (!isEditStatus) {
|
|
9301
9331
|
const { backMethod } = keyboardOpts
|
|
9302
|
-
//
|
|
9303
|
-
if (
|
|
9332
|
+
// 如果是回车键
|
|
9333
|
+
if (isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
9304
9334
|
const params = {
|
|
9305
9335
|
row: selectRow,
|
|
9306
9336
|
rowIndex: $xeTable.getRowIndex(selectRow),
|
|
@@ -9736,15 +9766,7 @@ export default defineVxeComponent({
|
|
|
9736
9766
|
* @param {Event} evnt 事件
|
|
9737
9767
|
* @param {Row} row 行对象
|
|
9738
9768
|
*/
|
|
9739
|
-
const handleTooltip = (
|
|
9740
|
-
evnt: MouseEvent,
|
|
9741
|
-
tipOpts: VxeTablePropTypes.TooltipConfig | VxeTablePropTypes.HeaderTooltipConfig | VxeTablePropTypes.FooterTooltipConfig,
|
|
9742
|
-
type: 'header' | 'body' | 'footer',
|
|
9743
|
-
tdEl: HTMLTableCellElement,
|
|
9744
|
-
overflowElem: HTMLElement | null,
|
|
9745
|
-
tipElem: HTMLElement | null,
|
|
9746
|
-
params: any
|
|
9747
|
-
) => {
|
|
9769
|
+
const handleTooltip = (evnt: MouseEvent, tipOpts: VxeTablePropTypes.TooltipConfig | VxeTablePropTypes.HeaderTooltipConfig | VxeTablePropTypes.FooterTooltipConfig, type: 'header' | 'body' | 'footer', tdEl: HTMLTableCellElement, overflowElem: HTMLElement | null, tipElem: HTMLElement | null, params: any) => {
|
|
9748
9770
|
const tipOverEl = overflowElem || tdEl
|
|
9749
9771
|
if (!tipOverEl) {
|
|
9750
9772
|
return nextTick()
|
|
@@ -10691,9 +10713,8 @@ export default defineVxeComponent({
|
|
|
10691
10713
|
type,
|
|
10692
10714
|
storeData
|
|
10693
10715
|
})
|
|
10694
|
-
} else {
|
|
10695
|
-
setCustomStorageMap(tableId, type === 'reset' ? null : storeData)
|
|
10696
10716
|
}
|
|
10717
|
+
return setCustomStorageMap(tableId, type === 'reset' ? null : storeData)
|
|
10697
10718
|
}
|
|
10698
10719
|
return nextTick()
|
|
10699
10720
|
},
|
|
@@ -12702,11 +12723,7 @@ export default defineVxeComponent({
|
|
|
12702
12723
|
}
|
|
12703
12724
|
}
|
|
12704
12725
|
}
|
|
12705
|
-
if (
|
|
12706
|
-
$xeTable.eqRow(dragRow, row) ||
|
|
12707
|
-
(isControlKey && treeConfig && lazy && row[hasChildField] && rowRest && !rowRest.treeLoaded && !isAutoLazyLoadToChild && !isAutoExpandToChild) ||
|
|
12708
|
-
(!isCrossDrag && treeConfig && transform && (isPeerDrag ? dragRow[parentField] !== row[parentField] : rowRest.level))
|
|
12709
|
-
) {
|
|
12726
|
+
if ($xeTable.eqRow(dragRow, row) || (isControlKey && treeConfig && lazy && row[hasChildField] && rowRest && !rowRest.treeLoaded && !isAutoLazyLoadToChild && !isAutoExpandToChild) || (!isCrossDrag && treeConfig && transform && (isPeerDrag ? dragRow[parentField] !== row[parentField] : rowRest.level))) {
|
|
12710
12727
|
showDropTip(evnt, trEl, null, false, dragPos)
|
|
12711
12728
|
return
|
|
12712
12729
|
}
|
|
@@ -13477,7 +13494,7 @@ export default defineVxeComponent({
|
|
|
13477
13494
|
return
|
|
13478
13495
|
}
|
|
13479
13496
|
|
|
13480
|
-
const { highlightHoverRow } =
|
|
13497
|
+
const { highlightHoverRow } = props
|
|
13481
13498
|
const { scrollXLoad, scrollYLoad, overflowX, overflowY, expandColumn } = reactData
|
|
13482
13499
|
const leftFixedWidth = computeLeftFixedWidth.value
|
|
13483
13500
|
const rightFixedWidth = computeRightFixedWidth.value
|
|
@@ -16008,4 +16025,4 @@ export default defineVxeComponent({
|
|
|
16008
16025
|
render() {
|
|
16009
16026
|
return this.renderVN()
|
|
16010
16027
|
}
|
|
16011
|
-
})
|
|
16028
|
+
}) /* define-vxe-component end */
|
|
@@ -26,7 +26,7 @@ function createInternalData(): ToolbarInternalData {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export default defineVxeComponent({
|
|
29
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
30
30
|
name: 'VxeToolbar',
|
|
31
31
|
props: {
|
|
32
32
|
loading: Boolean,
|
|
@@ -765,4 +765,4 @@ export default defineVxeComponent({
|
|
|
765
765
|
render() {
|
|
766
766
|
return this.renderVN()
|
|
767
767
|
}
|
|
768
|
-
})
|
|
768
|
+
}) /* define-vxe-component end */
|
package/packages/ui/index.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|