vxe-table 4.19.16 → 4.19.18
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 +262 -230
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/grid/src/grid.js +12 -11
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +7 -3
- 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 +2 -1
- 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 +8 -7
- package/es/table/src/emits.js +4 -4
- package/es/table/src/footer.js +5 -5
- package/es/table/src/header.js +10 -8
- package/es/table/src/table.js +10 -3
- 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.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +1144 -1073
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +13 -7
- 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 +15 -11
- 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 +19 -9
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/emits.js +9 -1
- package/lib/table/src/footer.js +5 -4
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +12 -8
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +43 -42
- 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 +3 -3
- package/packages/grid/src/grid.ts +13 -11
- package/packages/table/module/custom/panel.ts +8 -3
- 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 +3 -1
- 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/footer.ts +5 -5
- package/packages/table/src/header.ts +10 -8
- package/packages/table/src/table.ts +9 -2
- package/packages/table/src/util.ts +2 -16
- package/packages/toolbar/src/toolbar.ts +17 -15
- package/packages/ui/src/log.ts +13 -3
- package/styles/theme/dark.scss +1 -1
- package/styles/variable.scss +1 -1
- /package/es/{iconfont.1781753820219.ttf → iconfont.1782186482222.ttf} +0 -0
- /package/es/{iconfont.1781753820219.woff → iconfont.1782186482222.woff} +0 -0
- /package/es/{iconfont.1781753820219.woff2 → iconfont.1782186482222.woff2} +0 -0
- /package/lib/{iconfont.1781753820219.ttf → iconfont.1782186482222.ttf} +0 -0
- /package/lib/{iconfont.1781753820219.woff → iconfont.1782186482222.woff} +0 -0
- /package/lib/{iconfont.1781753820219.woff2 → iconfont.1782186482222.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'
|
|
@@ -33,6 +33,8 @@ import '../render'
|
|
|
33
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
|
|
@@ -10827,7 +10829,12 @@ export default defineVxeComponent({
|
|
|
10827
10829
|
}
|
|
10828
10830
|
if (editOpts.trigger === 'manual') {
|
|
10829
10831
|
if (actived.args && actived.row === row && column !== actived.column) {
|
|
10830
|
-
|
|
10832
|
+
if (editOpts.mode === 'row') {
|
|
10833
|
+
handleChangeCell(evnt, params)
|
|
10834
|
+
} else {
|
|
10835
|
+
checkValidate('blur')
|
|
10836
|
+
.catch((e: any) => e)
|
|
10837
|
+
}
|
|
10831
10838
|
}
|
|
10832
10839
|
} else if (!actived.args || row !== actived.row || column !== actived.column) {
|
|
10833
10840
|
if (editOpts.trigger === 'click') {
|
|
@@ -774,14 +774,7 @@ export function getCalcHeight (height: number | 'unset' | undefined | null) {
|
|
|
774
774
|
/**
|
|
775
775
|
* 列宽拖动最大宽度
|
|
776
776
|
*/
|
|
777
|
-
export function getColReMaxWidth (params: {
|
|
778
|
-
$table: VxeTableConstructor & VxeTablePrivateMethods;
|
|
779
|
-
column: VxeTableDefines.ColumnInfo;
|
|
780
|
-
columnIndex: number;
|
|
781
|
-
$columnIndex: number;
|
|
782
|
-
$rowIndex: number;
|
|
783
|
-
cell: HTMLTableCellElement;
|
|
784
|
-
}) {
|
|
777
|
+
export function getColReMaxWidth (params: (VxeTableDefines.CellRenderHeaderParams| VxeTableDefines.CellRenderBodyParams | VxeTableDefines.CellRenderFooterParams) & { cell: HTMLTableCellElement }) {
|
|
785
778
|
const { $table, column, cell } = params
|
|
786
779
|
const internalData = $table.internalData
|
|
787
780
|
const { elemStore } = internalData
|
|
@@ -819,14 +812,7 @@ export function getColReMaxWidth (params: {
|
|
|
819
812
|
/**
|
|
820
813
|
* 列宽拖动最小宽度
|
|
821
814
|
*/
|
|
822
|
-
export function getColReMinWidth (params: {
|
|
823
|
-
$table: VxeTableConstructor & VxeTablePrivateMethods;
|
|
824
|
-
column: VxeTableDefines.ColumnInfo;
|
|
825
|
-
columnIndex: number;
|
|
826
|
-
$columnIndex: number;
|
|
827
|
-
$rowIndex: number;
|
|
828
|
-
cell: HTMLTableCellElement;
|
|
829
|
-
}) {
|
|
815
|
+
export function getColReMinWidth (params: (VxeTableDefines.CellRenderHeaderParams| VxeTableDefines.CellRenderBodyParams | VxeTableDefines.CellRenderFooterParams) & { cell: HTMLTableCellElement }) {
|
|
830
816
|
const { $table, column, cell } = params
|
|
831
817
|
const tableProps = $table.props
|
|
832
818
|
const internalData = $table.internalData
|
|
@@ -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)
|
package/styles/theme/dark.scss
CHANGED
package/styles/variable.scss
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|