vxe-table 4.19.15 → 4.19.17
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 +308 -218
- package/dist/style.css +1 -1
- package/es/grid/src/grid.js +12 -11
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +2 -1
- package/es/table/module/edit/hook.js +2 -1
- package/es/table/module/export/export-panel.js +2 -1
- package/es/table/module/export/hook.js +24 -4
- package/es/table/module/export/import-panel.js +2 -1
- package/es/table/module/filter/panel.js +2 -1
- package/es/table/module/validator/hook.js +2 -1
- package/es/table/render/index.js +2 -1
- package/es/table/src/columnInfo.js +2 -1
- package/es/table/src/header.js +6 -3
- package/es/table/src/table.js +58 -10
- package/es/toolbar/src/toolbar.js +16 -15
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +12 -3
- package/lib/grid/src/grid.js +16 -12
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +215 -135
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +8 -5
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +19 -15
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/export-panel.js +8 -5
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/hook.js +41 -14
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/export/import-panel.js +6 -3
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/filter/panel.js +4 -1
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/validator/hook.js +7 -3
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/render/index.js +4 -1
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/columnInfo.js +13 -9
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/header.js +7 -3
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +49 -44
- package/lib/table/src/table.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +20 -16
- package/lib/toolbar/src/toolbar.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 +13 -3
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +13 -11
- package/packages/table/module/custom/panel.ts +3 -1
- package/packages/table/module/edit/hook.ts +3 -1
- package/packages/table/module/export/export-panel.ts +3 -1
- package/packages/table/module/export/hook.ts +26 -5
- package/packages/table/module/export/import-panel.ts +3 -1
- package/packages/table/module/filter/panel.ts +3 -1
- package/packages/table/module/validator/hook.ts +3 -1
- package/packages/table/render/index.ts +3 -1
- package/packages/table/src/columnInfo.ts +3 -1
- package/packages/table/src/header.ts +6 -3
- package/packages/table/src/table.ts +60 -11
- package/packages/toolbar/src/toolbar.ts +17 -15
- package/packages/ui/src/log.ts +13 -3
- /package/es/{iconfont.1781675408206.ttf → iconfont.1781876895482.ttf} +0 -0
- /package/es/{iconfont.1781675408206.woff → iconfont.1781876895482.woff} +0 -0
- /package/es/{iconfont.1781675408206.woff2 → iconfont.1781876895482.woff2} +0 -0
- /package/lib/{iconfont.1781675408206.ttf → iconfont.1781876895482.ttf} +0 -0
- /package/lib/{iconfont.1781675408206.woff → iconfont.1781876895482.woff} +0 -0
- /package/lib/{iconfont.1781675408206.woff2 → iconfont.1781876895482.woff2} +0 -0
|
@@ -7,7 +7,7 @@ import { VxeUI } from '../../ui'
|
|
|
7
7
|
import { createReactData, createInternalData, getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn, getRowMaxHeight } from './util'
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
9
9
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime'
|
|
10
|
-
import {
|
|
10
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
11
11
|
import { getCrossTableDragRowInfo } from './store'
|
|
12
12
|
import Cell from './cell'
|
|
13
13
|
import TableBodyComponent from './body'
|
|
@@ -30,9 +30,11 @@ import '../module/validator/hook'
|
|
|
30
30
|
import '../module/custom/hook'
|
|
31
31
|
import '../render'
|
|
32
32
|
|
|
33
|
-
import type { VxeTooltipInstance, VxeTabsConstructor, VxeTabsPrivateMethods, ValueOf, VxeComponentSlotType, VxeComponentStyleType } from 'vxe-pc-ui'
|
|
33
|
+
import type { VxeTooltipInstance, VxeTabsConstructor, VxeTabsPrivateMethods, ValueOf, VxeComponentSlotType, VxeComponentStyleType, VxeModalConstructor, VxeModalMethods, VxeSplitterConstructor, VxeSplitterMethods } from 'vxe-pc-ui'
|
|
34
34
|
import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, VxeTablePropTypes, VxeToolbarConstructor, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, TableMethods, VxeTableMethods, VxeTableDefines, VxeTableEmits, VxeTableProps, VxeColumnPropTypes, VxeTableCustomPanelConstructor } from '../../../types'
|
|
35
35
|
|
|
36
|
+
const { warnLog, errLog } = createComponentLog('table')
|
|
37
|
+
|
|
36
38
|
const { getConfig, getIcon, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns, renderEmptyElement } = VxeUI
|
|
37
39
|
|
|
38
40
|
const supportMaxRow = 5e6
|
|
@@ -62,8 +64,10 @@ export default defineVxeComponent({
|
|
|
62
64
|
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading')
|
|
63
65
|
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip')
|
|
64
66
|
|
|
67
|
+
const $xeModal = inject<(VxeModalConstructor & VxeModalMethods) | null>('$xeModal', null)
|
|
65
68
|
const $xeTabs = inject<(VxeTabsConstructor & VxeTabsPrivateMethods) | null>('$xeTabs', null)
|
|
66
69
|
const $xeParentTable = inject<(VxeTableConstructor & VxeTablePrivateMethods) | null>('$xeTable', null)
|
|
70
|
+
const $xeSplitter = inject<(VxeSplitterConstructor & VxeSplitterMethods) | null>('$xeSplitter', null)
|
|
67
71
|
const $xeGrid = inject<(VxeGridConstructor & VxeGridPrivateMethods) | null>('$xeGrid', null)
|
|
68
72
|
const $xeGantt = inject<VxeTableDefines.InjectGanttType | null>('$xeGantt', null)
|
|
69
73
|
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
@@ -786,6 +790,18 @@ export default defineVxeComponent({
|
|
|
786
790
|
return []
|
|
787
791
|
})
|
|
788
792
|
|
|
793
|
+
const combineTabsResizeFlag = computed(() => {
|
|
794
|
+
return $xeTabs ? $xeTabs.reactData.resizeFlag : null
|
|
795
|
+
})
|
|
796
|
+
|
|
797
|
+
const combineModalResizeFlag = computed(() => {
|
|
798
|
+
return $xeModal ? $xeModal.reactData.resizeFlag : null
|
|
799
|
+
})
|
|
800
|
+
|
|
801
|
+
const combineSplitterResizeFlag = computed(() => {
|
|
802
|
+
return $xeSplitter ? $xeSplitter.reactData.resizeFlag : null
|
|
803
|
+
})
|
|
804
|
+
|
|
789
805
|
const refMaps: VxeTablePrivateRef = {
|
|
790
806
|
refElem,
|
|
791
807
|
refTooltip,
|
|
@@ -9249,11 +9265,36 @@ export default defineVxeComponent({
|
|
|
9249
9265
|
const { tooltipStore } = reactData
|
|
9250
9266
|
const { column, row } = params
|
|
9251
9267
|
const { showAll, contentMethod } = tipOpts
|
|
9252
|
-
const
|
|
9253
|
-
const useCustom = contentMethod && !XEUtils.eqNull(customContent)
|
|
9254
|
-
const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim()
|
|
9268
|
+
const cellText = XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim()
|
|
9255
9269
|
const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth
|
|
9256
|
-
|
|
9270
|
+
let isShow = false
|
|
9271
|
+
let customContent: any = null
|
|
9272
|
+
let content = ''
|
|
9273
|
+
if (contentMethod) {
|
|
9274
|
+
customContent = contentMethod(params)
|
|
9275
|
+
}
|
|
9276
|
+
// 是否全部展示
|
|
9277
|
+
if (showAll) {
|
|
9278
|
+
// 如果为 null 默认显示
|
|
9279
|
+
if (XEUtils.eqNull(customContent)) {
|
|
9280
|
+
isShow = true
|
|
9281
|
+
content = cellText
|
|
9282
|
+
} else if (customContent !== '' && customContent !== false) {
|
|
9283
|
+
// 如果为 '' | false 则不显示
|
|
9284
|
+
isShow = true
|
|
9285
|
+
content = '' + customContent
|
|
9286
|
+
}
|
|
9287
|
+
} else {
|
|
9288
|
+
// 如果为 null 使用默认逻辑
|
|
9289
|
+
if (XEUtils.eqNull(customContent)) {
|
|
9290
|
+
isShow = isOver
|
|
9291
|
+
} else if (customContent !== '' && customContent !== false) {
|
|
9292
|
+
// 如果为 '' | false 则不显示
|
|
9293
|
+
isShow = true
|
|
9294
|
+
}
|
|
9295
|
+
content = cellText
|
|
9296
|
+
}
|
|
9297
|
+
if (isShow && content) {
|
|
9257
9298
|
const tipContent = formatText(content)
|
|
9258
9299
|
Object.assign(tooltipStore, {
|
|
9259
9300
|
row,
|
|
@@ -14382,11 +14423,19 @@ export default defineVxeComponent({
|
|
|
14382
14423
|
}
|
|
14383
14424
|
})
|
|
14384
14425
|
|
|
14385
|
-
|
|
14386
|
-
|
|
14387
|
-
|
|
14388
|
-
|
|
14389
|
-
|
|
14426
|
+
const layoutReFlag = ref(0)
|
|
14427
|
+
watch(combineTabsResizeFlag, () => {
|
|
14428
|
+
layoutReFlag.value++
|
|
14429
|
+
})
|
|
14430
|
+
watch(combineModalResizeFlag, () => {
|
|
14431
|
+
layoutReFlag.value++
|
|
14432
|
+
})
|
|
14433
|
+
watch(combineSplitterResizeFlag, () => {
|
|
14434
|
+
layoutReFlag.value++
|
|
14435
|
+
})
|
|
14436
|
+
watch(layoutReFlag, () => {
|
|
14437
|
+
handleGlobalResizeEvent()
|
|
14438
|
+
})
|
|
14390
14439
|
|
|
14391
14440
|
handleKeyField()
|
|
14392
14441
|
|
|
@@ -3,11 +3,13 @@ import { defineVxeComponent } from '../../ui/src/comp'
|
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { VxeUI } from '../../ui'
|
|
5
5
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
7
7
|
|
|
8
8
|
import type { ValueOf, VxeButtonEvents, VxeComponentSlotType, VxeButtonDefines } from 'vxe-pc-ui'
|
|
9
9
|
import type { VxeGridConstructor, GridPrivateMethods, ToolbarMethods, ToolbarInternalData, VxeToolbarConstructor, VxeToolbarEmits, VxeToolbarPropTypes, ToolbarPrivateRef, ToolbarReactData, VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
|
|
10
10
|
|
|
11
|
+
const { warnLog, errLog } = createComponentLog('toolbar')
|
|
12
|
+
|
|
11
13
|
const { getConfig, getIcon, getI18n, renderer, commands, createEvent, useFns } = VxeUI
|
|
12
14
|
|
|
13
15
|
function createReactData (): ToolbarReactData {
|
|
@@ -206,7 +208,7 @@ export default defineVxeComponent({
|
|
|
206
208
|
if ($xeGGWrapper) {
|
|
207
209
|
$xeGGWrapper.triggerZoomEvent($event)
|
|
208
210
|
} else {
|
|
209
|
-
warnLog('vxe.error.notProp', ['
|
|
211
|
+
warnLog('vxe.error.notProp', ['zoom'])
|
|
210
212
|
}
|
|
211
213
|
}
|
|
212
214
|
|
|
@@ -322,7 +324,7 @@ export default defineVxeComponent({
|
|
|
322
324
|
if (tCommandMethod) {
|
|
323
325
|
tCommandMethod(params)
|
|
324
326
|
} else {
|
|
325
|
-
errLog('vxe.error.notCommands', [
|
|
327
|
+
errLog('vxe.error.notCommands', [code])
|
|
326
328
|
}
|
|
327
329
|
}
|
|
328
330
|
$xeToolbar.dispatchEvent('button-click', params, $event)
|
|
@@ -348,7 +350,7 @@ export default defineVxeComponent({
|
|
|
348
350
|
if (tCommandMethod) {
|
|
349
351
|
tCommandMethod(params)
|
|
350
352
|
} else {
|
|
351
|
-
errLog('vxe.error.notCommands', [
|
|
353
|
+
errLog('vxe.error.notCommands', [code])
|
|
352
354
|
}
|
|
353
355
|
}
|
|
354
356
|
$xeToolbar.dispatchEvent('tool-click', params, $event)
|
|
@@ -646,40 +648,40 @@ export default defineVxeComponent({
|
|
|
646
648
|
const refreshOpts = computeRefreshOpts.value
|
|
647
649
|
const queryMethod = refreshOpts.queryMethod || refreshOpts.query
|
|
648
650
|
if (props.refresh && !$xeGGWrapper && !queryMethod) {
|
|
649
|
-
warnLog('vxe.error.notFunc', ['
|
|
651
|
+
warnLog('vxe.error.notFunc', ['queryMethod'])
|
|
650
652
|
}
|
|
651
653
|
|
|
652
654
|
if (XEUtils.isPlainObject(props.custom)) {
|
|
653
|
-
warnLog('vxe.error.delProp', ['
|
|
655
|
+
warnLog('vxe.error.delProp', ['custom={...}', 'custom=boolean & custom-options={...}'])
|
|
654
656
|
}
|
|
655
657
|
if (XEUtils.isPlainObject(props.print)) {
|
|
656
|
-
warnLog('vxe.error.delProp', ['
|
|
658
|
+
warnLog('vxe.error.delProp', ['print={...}', 'print=boolean & print-options={...}'])
|
|
657
659
|
}
|
|
658
660
|
if (XEUtils.isPlainObject(props.export)) {
|
|
659
|
-
warnLog('vxe.error.delProp', ['
|
|
661
|
+
warnLog('vxe.error.delProp', ['export={...}', 'export=boolean & export-options={...}'])
|
|
660
662
|
}
|
|
661
663
|
if (XEUtils.isPlainObject(props.import)) {
|
|
662
|
-
warnLog('vxe.error.delProp', ['
|
|
664
|
+
warnLog('vxe.error.delProp', ['import={...}', 'import=boolean & import-options={...}'])
|
|
663
665
|
}
|
|
664
666
|
if (XEUtils.isPlainObject(props.refresh)) {
|
|
665
|
-
warnLog('vxe.error.delProp', ['
|
|
667
|
+
warnLog('vxe.error.delProp', ['refresh={...}', 'refresh=boolean & refresh-options={...}'])
|
|
666
668
|
}
|
|
667
669
|
if (XEUtils.isPlainObject(props.refresh)) {
|
|
668
|
-
warnLog('vxe.error.delProp', ['
|
|
670
|
+
warnLog('vxe.error.delProp', ['zoom={...}', 'zoom=boolean & zoom-options={...}'])
|
|
669
671
|
}
|
|
670
672
|
|
|
671
673
|
const customOpts = computeCustomOpts.value
|
|
672
674
|
if (customOpts.isFooter) {
|
|
673
|
-
warnLog('vxe.error.delProp', ['
|
|
675
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter'])
|
|
674
676
|
}
|
|
675
677
|
if (customOpts.showFooter) {
|
|
676
|
-
warnLog('vxe.error.delProp', ['
|
|
678
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter'])
|
|
677
679
|
}
|
|
678
680
|
if (customOpts.immediate) {
|
|
679
|
-
warnLog('vxe.error.delProp', ['
|
|
681
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate'])
|
|
680
682
|
}
|
|
681
683
|
if (customOpts.trigger) {
|
|
682
|
-
warnLog('vxe.error.delProp', ['
|
|
684
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger'])
|
|
683
685
|
}
|
|
684
686
|
if (props.refresh || props.import || props.export || props.print || props.zoom) {
|
|
685
687
|
if (!VxeUIButtonComponent) {
|
package/packages/ui/src/log.ts
CHANGED
|
@@ -2,7 +2,17 @@ import { VxeUI } from '@vxe-ui/core'
|
|
|
2
2
|
|
|
3
3
|
const { log } = VxeUI
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const tableVersion = `table v${process.env.VUE_APP_VXE_VERSION}`
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
|
|
7
|
+
export function createComponentLog (name: string) {
|
|
8
|
+
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : ''
|
|
9
|
+
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : ''
|
|
10
|
+
const designVersion = VxeUI.designVersion ? `design v${VxeUI.designVersion}` : ''
|
|
11
|
+
return {
|
|
12
|
+
warnLog: log.create('warn', uiVersion + tableVersion + ganttVersion + designVersion + '] [' + name),
|
|
13
|
+
errLog: log.create('error', uiVersion + tableVersion + ganttVersion + designVersion + '] [' + name)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const warnLog = log.create('warn', tableVersion)
|
|
18
|
+
export const errLog = log.create('error', tableVersion)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|