vxe-table 3.21.16 → 3.21.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/es/grid/src/grid.js +17 -19
- 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/mixin.js +2 -1
- package/es/table/module/export/export-panel.js +2 -1
- package/es/table/module/export/import-panel.js +2 -1
- package/es/table/module/export/mixin.js +2 -1
- package/es/table/module/filter/panel.js +2 -1
- package/es/table/module/menu/mixin.js +2 -1
- package/es/table/module/validator/mixin.js +2 -1
- package/es/table/render/index.js +2 -1
- package/es/table/src/columnInfo.js +8 -7
- package/es/table/src/footer.js +5 -5
- package/es/table/src/header.js +10 -8
- package/es/table/src/methods.js +10 -3
- package/es/table/src/table.js +2 -1
- package/es/table/src/util.js +2 -1
- package/es/toolbar/src/toolbar.js +19 -21
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +12 -3
- package/lib/grid/src/grid.js +24 -21
- 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 +1237 -1163
- 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/mixin.js +19 -15
- package/lib/table/module/edit/mixin.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/import-panel.js +6 -3
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +18 -14
- package/lib/table/module/export/mixin.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/menu/mixin.js +5 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +8 -4
- package/lib/table/module/validator/mixin.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 +21 -11
- package/lib/table/src/columnInfo.min.js +1 -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/methods.js +43 -42
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +78 -74
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +6 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +24 -21
- 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 +20 -16
- package/packages/table/module/custom/panel.ts +8 -3
- package/packages/table/module/edit/mixin.ts +3 -1
- package/packages/table/module/export/export-panel.ts +3 -1
- package/packages/table/module/export/import-panel.ts +3 -1
- package/packages/table/module/export/mixin.ts +3 -1
- package/packages/table/module/filter/panel.ts +3 -1
- package/packages/table/module/menu/mixin.ts +3 -1
- package/packages/table/module/validator/mixin.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/methods.ts +9 -2
- package/packages/table/src/table.ts +3 -1
- package/packages/table/src/util.ts +5 -17
- package/packages/toolbar/src/toolbar.ts +23 -18
- package/packages/ui/src/log.ts +13 -3
- package/styles/theme/dark.scss +1 -1
- package/styles/variable.scss +1 -1
- /package/es/{iconfont.1781753790081.ttf → iconfont.1782186465261.ttf} +0 -0
- /package/es/{iconfont.1781753790081.woff → iconfont.1782186465261.woff} +0 -0
- /package/es/{iconfont.1781753790081.woff2 → iconfont.1782186465261.woff2} +0 -0
- /package/lib/{iconfont.1781753790081.ttf → iconfont.1782186465261.ttf} +0 -0
- /package/lib/{iconfont.1781753790081.woff → iconfont.1782186465261.woff} +0 -0
- /package/lib/{iconfont.1781753790081.woff2 → iconfont.1782186465261.woff2} +0 -0
|
@@ -3,11 +3,13 @@ import { defineVxeComponent } from '../../../ui/src/comp'
|
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
4
|
import XEUtils from 'xe-utils'
|
|
5
5
|
import { parseFile } from '../../../ui/src/utils'
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../../ui/src/log'
|
|
7
7
|
|
|
8
8
|
import type { VxeComponentSizeType } from 'vxe-pc-ui'
|
|
9
9
|
import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines } from '../../../../types'
|
|
10
10
|
|
|
11
|
+
const { errLog } = createComponentLog('table')
|
|
12
|
+
|
|
11
13
|
const { getI18n, getIcon, globalMixins, renderEmptyElement } = VxeUI
|
|
12
14
|
|
|
13
15
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
@@ -4,10 +4,12 @@ import { isColumnInfo, getCellValue, createHandleGetRowId } from '../../src/util
|
|
|
4
4
|
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils'
|
|
5
5
|
import { hasClass } from '../../../ui/src/dom'
|
|
6
6
|
import { createHtmlPage, getExportBlobByContent } from './util'
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../../ui/src/log'
|
|
8
8
|
|
|
9
9
|
import type { VxeTablePropTypes, VxeTableDefines, TableReactData, VxeTablePrivateMethods, TableInternalData, VxeColumnPropTypes, VxeTableConstructor } from '../../../../types'
|
|
10
10
|
|
|
11
|
+
const { warnLog, errLog } = createComponentLog('table')
|
|
12
|
+
|
|
11
13
|
const { getI18n, renderer } = VxeUI
|
|
12
14
|
|
|
13
15
|
let htmlCellElem: any
|
|
@@ -4,11 +4,13 @@ import { VxeUI } from '../../../ui'
|
|
|
4
4
|
import { formatText, isEnableConf } from '../../../ui/src/utils'
|
|
5
5
|
import { getPropClass, toCssUnit } from '../../../ui/src/dom'
|
|
6
6
|
import { getSlotVNs } from '../../../ui/src/vn'
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../../ui/src/log'
|
|
8
8
|
|
|
9
9
|
import type { VxeGlobalRendererOptions, VxeComponentSizeType } from 'vxe-pc-ui'
|
|
10
10
|
import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData, VxeTableDefines, VxeColumnPropTypes } from '../../../../types'
|
|
11
11
|
|
|
12
|
+
const { warnLog } = createComponentLog('table')
|
|
13
|
+
|
|
12
14
|
const { getI18n, getIcon, renderer, globalMixins, renderEmptyElement } = VxeUI
|
|
13
15
|
|
|
14
16
|
// 全部筛选事件
|
|
@@ -2,10 +2,12 @@ import XEUtils from 'xe-utils'
|
|
|
2
2
|
import { VxeUI } from '../../../ui'
|
|
3
3
|
import { getDomNode, getAbsolutePos, getEventTargetNode } from '../../../ui/src/dom'
|
|
4
4
|
import { isEnableConf, hasChildrenList } from '../../../ui/src/utils'
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../../ui/src/log'
|
|
6
6
|
|
|
7
7
|
import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData, TableReactData, VxeTableDefines } from '../../../../types'
|
|
8
8
|
|
|
9
|
+
const { warnLog } = createComponentLog('table')
|
|
10
|
+
|
|
9
11
|
const { menus, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI
|
|
10
12
|
|
|
11
13
|
export default {
|
|
@@ -3,11 +3,13 @@ import { VxeUI } from '../../../ui'
|
|
|
3
3
|
import { eqEmptyValue, getFuncText } from '../../../ui/src/utils'
|
|
4
4
|
import { scrollToView } from '../../../ui/src/dom'
|
|
5
5
|
import { handleFieldOrColumn, getRowid } from '../../src/util'
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../../ui/src/log'
|
|
7
7
|
|
|
8
8
|
import type { VxeTooltipInstance } from 'vxe-pc-ui'
|
|
9
9
|
import type { VxeTableDefines, TableInternalData, TableReactData, VxeTableConstructor, VxeTablePrivateMethods } from '../../../../types'
|
|
10
10
|
|
|
11
|
+
const { warnLog, errLog } = createComponentLog('table')
|
|
12
|
+
|
|
11
13
|
const { getConfig, validators } = VxeUI
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -4,10 +4,12 @@ import { VxeUI } from '../../ui'
|
|
|
4
4
|
import { getCellValue, setCellValue } from '../src/util'
|
|
5
5
|
import { getFuncText, formatText, isEmptyValue } from '../../ui/src/utils'
|
|
6
6
|
import { getOnName, getModelEvent, getChangeEvent, hasInputType } from '../../ui/src/vn'
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
8
8
|
|
|
9
9
|
import type { VxeGlobalRendererHandles, VxeColumnPropTypes, VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines } from '../../../types'
|
|
10
10
|
|
|
11
|
+
const { errLog } = createComponentLog('table')
|
|
12
|
+
|
|
11
13
|
const { getConfig, renderer, getI18n, getComponent } = VxeUI
|
|
12
14
|
|
|
13
15
|
const componentDefaultModelProp = 'value'
|
|
@@ -3,10 +3,12 @@ import { VxeUI } from '../../ui'
|
|
|
3
3
|
import { toFilters } from './util'
|
|
4
4
|
import { isEnableConf, getFuncText } from '../../ui/src/utils'
|
|
5
5
|
import { isPx } from '../../ui/src/dom'
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
7
7
|
|
|
8
8
|
import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines, VxeColumnProps } from '../../../types'
|
|
9
9
|
|
|
10
|
+
const { warnLog, errLog } = createComponentLog('table')
|
|
11
|
+
|
|
10
12
|
const { getI18n, formats, renderer } = VxeUI
|
|
11
13
|
|
|
12
14
|
export class ColumnInfo {
|
|
@@ -208,18 +208,18 @@ function renderHeads (h: CreateElement, _vm: any, isOptimizeMode: boolean, rende
|
|
|
208
208
|
|
|
209
209
|
const { footerRowClassName, footerRowStyle } = tableProps
|
|
210
210
|
|
|
211
|
-
return (footerTableData as any[][]).map((row,
|
|
212
|
-
const
|
|
213
|
-
const rowParams = { $table: $xeTable, row, _rowIndex, $rowIndex, fixed: fixedType, type: renderType }
|
|
211
|
+
return (footerTableData as any[][]).map((row, _rowIndex) => {
|
|
212
|
+
const $rowIndex = _rowIndex
|
|
213
|
+
const rowParams = { $table: $xeTable, row, rowIndex: _rowIndex, _rowIndex, $rowIndex, fixed: fixedType, type: renderType }
|
|
214
214
|
|
|
215
215
|
return h('tr', {
|
|
216
|
-
key:
|
|
216
|
+
key: _rowIndex,
|
|
217
217
|
class: [
|
|
218
218
|
'vxe-footer--row',
|
|
219
219
|
footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
|
|
220
220
|
],
|
|
221
221
|
style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) as VxeComponentStyleType : undefined
|
|
222
|
-
}, renderRows(h, _vm, isOptimizeMode, renderColumnList, footerTableData, row,
|
|
222
|
+
}, renderRows(h, _vm, isOptimizeMode, renderColumnList, footerTableData, row, _rowIndex, _rowIndex))
|
|
223
223
|
})
|
|
224
224
|
}
|
|
225
225
|
|
|
@@ -13,7 +13,7 @@ const { renderer, renderEmptyElement } = VxeUI
|
|
|
13
13
|
const sourceType = 'table'
|
|
14
14
|
const renderType = 'header'
|
|
15
15
|
|
|
16
|
-
function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode: boolean, headerGroups: VxeTableDefines.ColumnInfo[][],
|
|
16
|
+
function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode: boolean, headerGroups: VxeTableDefines.ColumnInfo[][], _rowIndex: number, cols: VxeTableDefines.ColumnInfo[]) {
|
|
17
17
|
const props = _vm
|
|
18
18
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
19
19
|
const $xeGrid = $xeTable.$xeGrid
|
|
@@ -34,7 +34,7 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
|
|
|
34
34
|
const headerCellOpts = $xeTable.computeHeaderCellOpts
|
|
35
35
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight
|
|
36
36
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts
|
|
37
|
-
const isLastRow =
|
|
37
|
+
const isLastRow = _rowIndex === headerGroups.length - 1
|
|
38
38
|
|
|
39
39
|
return cols.map((column, $columnIndex) => {
|
|
40
40
|
const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column
|
|
@@ -66,7 +66,9 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
|
|
|
66
66
|
$table: $xeTable,
|
|
67
67
|
$grid: $xeGrid,
|
|
68
68
|
$gantt: $xeGantt,
|
|
69
|
-
|
|
69
|
+
rowIndex: _rowIndex,
|
|
70
|
+
_rowIndex,
|
|
71
|
+
$rowIndex: _rowIndex,
|
|
70
72
|
column,
|
|
71
73
|
columnIndex,
|
|
72
74
|
$columnIndex,
|
|
@@ -88,7 +90,7 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
|
|
|
88
90
|
thAttrs.rowspan = column.rowSpan > 1 ? column.rowSpan : null
|
|
89
91
|
}
|
|
90
92
|
if (mergeHeadFlag && mergeHeaderList.length && (showCustomHeader || isLastRow)) {
|
|
91
|
-
const spanRest = mergeHeaderCellMaps[`${
|
|
93
|
+
const spanRest = mergeHeaderCellMaps[`${_rowIndex}:${showCustomHeader ? $columnIndex : _columnIndex}`]
|
|
92
94
|
if (spanRest) {
|
|
93
95
|
const { rowspan, colspan } = spanRest
|
|
94
96
|
if (!rowspan || !colspan) {
|
|
@@ -339,16 +341,16 @@ function renderHeads (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMo
|
|
|
339
341
|
|
|
340
342
|
const { headerRowClassName, headerRowStyle } = tableProps
|
|
341
343
|
const floatingFilterOpts = $xeTable.computeFloatingFilterOpts
|
|
342
|
-
const rowVNs = headerGroups.map((cols,
|
|
343
|
-
const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType }
|
|
344
|
+
const rowVNs = headerGroups.map((cols, _rowIndex) => {
|
|
345
|
+
const params = { $table: $xeTable, rowIndex: _rowIndex, _rowIndex, $rowIndex: _rowIndex, fixed: fixedType, type: renderType }
|
|
344
346
|
return h('tr', {
|
|
345
|
-
key:
|
|
347
|
+
key: _rowIndex,
|
|
346
348
|
class: [
|
|
347
349
|
'vxe-header--row',
|
|
348
350
|
headerRowClassName ? XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ''
|
|
349
351
|
],
|
|
350
352
|
style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) as VxeComponentStyleType : undefined
|
|
351
|
-
}, renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups,
|
|
353
|
+
}, renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIndex, cols))
|
|
352
354
|
})
|
|
353
355
|
|
|
354
356
|
if (floatingFilterOpts.enabled) {
|
|
@@ -6,12 +6,14 @@ import Cell from './cell'
|
|
|
6
6
|
import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn, getRowMaxHeight } from './util'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime'
|
|
9
|
-
import {
|
|
9
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
10
10
|
import { getCrossTableDragRowInfo } from './store'
|
|
11
11
|
|
|
12
12
|
import type { VxeTooltipInstance, ValueOf } from 'vxe-pc-ui'
|
|
13
13
|
import type { VxeTableDefines, VxeColumnPropTypes, VxeTableEmits, TableReactData, VxeTableConstructor, VxeToolbarConstructor, VxeToolbarInstance, TableInternalData, VxeGridConstructor, VxeTablePrivateMethods, VxeTablePropTypes, VxeGridPrivateMethods } from '../../../types'
|
|
14
14
|
|
|
15
|
+
const { warnLog, errLog } = createComponentLog('table')
|
|
16
|
+
|
|
15
17
|
const { getConfig, getI18n, renderer, formats, interceptor, createEvent, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI
|
|
16
18
|
|
|
17
19
|
const browseObj = XEUtils.browse()
|
|
@@ -9827,7 +9829,12 @@ const tableMethods: any = {
|
|
|
9827
9829
|
}
|
|
9828
9830
|
if (editOpts.trigger === 'manual') {
|
|
9829
9831
|
if (actived.args && actived.row === row && column !== actived.column) {
|
|
9830
|
-
|
|
9832
|
+
if (editOpts.mode === 'row') {
|
|
9833
|
+
handleChangeCell($xeTable, evnt, params)
|
|
9834
|
+
} else {
|
|
9835
|
+
checkValidate($xeTable, 'blur')
|
|
9836
|
+
.catch((e: any) => e)
|
|
9837
|
+
}
|
|
9831
9838
|
}
|
|
9832
9839
|
} else if (!actived.args || row !== actived.row || column !== actived.column) {
|
|
9833
9840
|
if (editOpts.trigger === 'click') {
|
|
@@ -10,7 +10,7 @@ import TableHeaderComponent from './header'
|
|
|
10
10
|
import TableFooterComponent from './footer'
|
|
11
11
|
import { tableProps } from './props'
|
|
12
12
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
13
|
-
import {
|
|
13
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
14
14
|
import { crossTableDragRowGlobal, getCrossTableDragRowInfo } from './store'
|
|
15
15
|
import TableCustomPanelComponent from '../module/custom/panel'
|
|
16
16
|
import TableFilterPanelComponent from '../module/filter/panel'
|
|
@@ -29,6 +29,8 @@ import customMixin from '../module/custom/mixin'
|
|
|
29
29
|
import type { VxeTabsConstructor, VxeTabsPrivateMethods, VxeComponentStyleType, VxeModalConstructor, VxeModalMethods } from 'vxe-pc-ui'
|
|
30
30
|
import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTablePropTypes, TableInternalData, TableReactData, VxeTableDefines } from '../../../types'
|
|
31
31
|
|
|
32
|
+
const { warnLog, errLog } = createComponentLog('table')
|
|
33
|
+
|
|
32
34
|
const { getConfig, getIcon, getI18n, renderer, globalResize, globalEvents, globalMixins, renderEmptyElement } = VxeUI
|
|
33
35
|
|
|
34
36
|
function handleUpdateMergeBodyCells ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, merges: VxeTableDefines.MergeOptions | VxeTableDefines.MergeOptions[]) {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import { ColumnInfo } from './columnInfo'
|
|
3
3
|
import { isScale, isPx, queryElement } from '../../ui/src/dom'
|
|
4
|
-
import {
|
|
4
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
5
5
|
import { eqEmptyValue } from '../../ui/src/utils'
|
|
6
6
|
|
|
7
7
|
import type { VxeTableDefines, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePrivateMethods, VxeTablePropTypes } from '../../../types'
|
|
8
8
|
|
|
9
|
+
const { warnLog, errLog } = createComponentLog('table')
|
|
10
|
+
|
|
9
11
|
export function createInternalData (): TableInternalData {
|
|
10
12
|
return {
|
|
11
13
|
tZindex: 0,
|
|
@@ -800,14 +802,7 @@ export function toFilters (filters: any, colid?: string | number) {
|
|
|
800
802
|
/**
|
|
801
803
|
* 列宽拖动最大宽度
|
|
802
804
|
*/
|
|
803
|
-
export function getColReMaxWidth (params: {
|
|
804
|
-
$table: VxeTableConstructor & VxeTablePrivateMethods;
|
|
805
|
-
column: VxeTableDefines.ColumnInfo;
|
|
806
|
-
columnIndex: number;
|
|
807
|
-
$columnIndex: number;
|
|
808
|
-
$rowIndex: number;
|
|
809
|
-
cell: HTMLTableCellElement;
|
|
810
|
-
}) {
|
|
805
|
+
export function getColReMaxWidth (params: (VxeTableDefines.CellRenderHeaderParams| VxeTableDefines.CellRenderBodyParams | VxeTableDefines.CellRenderFooterParams) & { cell: HTMLTableCellElement }) {
|
|
811
806
|
const { $table, column, cell } = params
|
|
812
807
|
const internalData = $table as unknown as TableInternalData
|
|
813
808
|
const { elemStore } = internalData
|
|
@@ -844,14 +839,7 @@ export function getColReMaxWidth (params: {
|
|
|
844
839
|
/**
|
|
845
840
|
* 列宽拖动最小宽度
|
|
846
841
|
*/
|
|
847
|
-
export function getColReMinWidth (params: {
|
|
848
|
-
$table: VxeTableConstructor & VxeTablePrivateMethods;
|
|
849
|
-
column: VxeTableDefines.ColumnInfo;
|
|
850
|
-
columnIndex: number;
|
|
851
|
-
$columnIndex: number;
|
|
852
|
-
$rowIndex: number;
|
|
853
|
-
cell: HTMLTableCellElement;
|
|
854
|
-
}) {
|
|
842
|
+
export function getColReMinWidth (params: (VxeTableDefines.CellRenderHeaderParams| VxeTableDefines.CellRenderBodyParams | VxeTableDefines.CellRenderFooterParams) & { cell: HTMLTableCellElement }) {
|
|
855
843
|
const { $table, column, cell } = params
|
|
856
844
|
const tableProps = $table
|
|
857
845
|
const internalData = $table as unknown as TableInternalData
|
|
@@ -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, VxeComponentSizeType, VxeComponentSlotType, VxeButtonDefines } from 'vxe-pc-ui'
|
|
9
9
|
import type { VxeGridConstructor, GridPrivateMethods, ToolbarInternalData, VxeTableDefines, VxeToolbarEmits, VxeToolbarPropTypes, VxeTablePropTypes, ToolbarReactData, VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
|
|
10
10
|
|
|
11
|
+
const { warnLog, errLog } = createComponentLog('toolbar')
|
|
12
|
+
|
|
11
13
|
const { getConfig, getIcon, getI18n, renderer, commands, createEvent, globalMixins, renderEmptyElement } = VxeUI
|
|
12
14
|
|
|
13
15
|
function createReactData (): ToolbarReactData {
|
|
@@ -72,11 +74,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
72
74
|
data () {
|
|
73
75
|
const xID = XEUtils.uniqueId()
|
|
74
76
|
const reactData = createReactData()
|
|
75
|
-
const internalData = createInternalData()
|
|
76
77
|
return {
|
|
78
|
+
...({} as {
|
|
79
|
+
internalData: ToolbarInternalData
|
|
80
|
+
}),
|
|
77
81
|
xID,
|
|
78
|
-
reactData
|
|
79
|
-
internalData
|
|
82
|
+
reactData
|
|
80
83
|
}
|
|
81
84
|
},
|
|
82
85
|
computed: {
|
|
@@ -255,7 +258,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
255
258
|
if ($xeGGWrapper) {
|
|
256
259
|
$xeGGWrapper.triggerZoomEvent($event)
|
|
257
260
|
} else {
|
|
258
|
-
warnLog('vxe.error.notProp', ['
|
|
261
|
+
warnLog('vxe.error.notProp', ['zoom'])
|
|
259
262
|
}
|
|
260
263
|
},
|
|
261
264
|
importEvent () {
|
|
@@ -389,7 +392,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
389
392
|
if (tCommandMethod) {
|
|
390
393
|
tCommandMethod(params)
|
|
391
394
|
} else {
|
|
392
|
-
errLog('vxe.error.notCommands', [
|
|
395
|
+
errLog('vxe.error.notCommands', [code])
|
|
393
396
|
}
|
|
394
397
|
}
|
|
395
398
|
$xeToolbar.dispatchEvent('button-click', params, $event)
|
|
@@ -420,7 +423,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
420
423
|
if (tCommandMethod) {
|
|
421
424
|
tCommandMethod(params)
|
|
422
425
|
} else {
|
|
423
|
-
errLog('vxe.error.notCommands', [
|
|
426
|
+
errLog('vxe.error.notCommands', [code])
|
|
424
427
|
}
|
|
425
428
|
}
|
|
426
429
|
$xeToolbar.dispatchEvent('tool-click', params, $event)
|
|
@@ -790,31 +793,33 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
790
793
|
const $xeGantt = $xeToolbar.$xeGantt
|
|
791
794
|
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
792
795
|
|
|
796
|
+
$xeToolbar.internalData = createInternalData()
|
|
797
|
+
|
|
793
798
|
$xeToolbar.$nextTick(() => {
|
|
794
799
|
const refreshOpts = $xeToolbar.computeRefreshOpts
|
|
795
800
|
const $xeTable = $xeToolbar.fintTable() as any
|
|
796
801
|
const queryMethod = refreshOpts.queryMethod || refreshOpts.query
|
|
797
802
|
if (props.refresh && !$xeGGWrapper && !queryMethod) {
|
|
798
|
-
warnLog('vxe.error.notFunc', ['
|
|
803
|
+
warnLog('vxe.error.notFunc', ['queryMethod'])
|
|
799
804
|
}
|
|
800
805
|
|
|
801
806
|
if (XEUtils.isPlainObject(props.custom)) {
|
|
802
|
-
warnLog('vxe.error.delProp', ['
|
|
807
|
+
warnLog('vxe.error.delProp', ['custom={...}', 'custom=boolean & custom-options={...}'])
|
|
803
808
|
}
|
|
804
809
|
if (XEUtils.isPlainObject(props.print)) {
|
|
805
|
-
warnLog('vxe.error.delProp', ['
|
|
810
|
+
warnLog('vxe.error.delProp', ['print={...}', 'print=boolean & print-options={...}'])
|
|
806
811
|
}
|
|
807
812
|
if (XEUtils.isPlainObject(props.export)) {
|
|
808
|
-
warnLog('vxe.error.delProp', ['
|
|
813
|
+
warnLog('vxe.error.delProp', ['export={...}', 'export=boolean & export-options={...}'])
|
|
809
814
|
}
|
|
810
815
|
if (XEUtils.isPlainObject(props.import)) {
|
|
811
|
-
warnLog('vxe.error.delProp', ['
|
|
816
|
+
warnLog('vxe.error.delProp', ['import={...}', 'import=boolean & import-options={...}'])
|
|
812
817
|
}
|
|
813
818
|
if (XEUtils.isPlainObject(props.refresh)) {
|
|
814
|
-
warnLog('vxe.error.delProp', ['
|
|
819
|
+
warnLog('vxe.error.delProp', ['refresh={...}', 'refresh=boolean & refresh-options={...}'])
|
|
815
820
|
}
|
|
816
821
|
if (XEUtils.isPlainObject(props.refresh)) {
|
|
817
|
-
warnLog('vxe.error.delProp', ['
|
|
822
|
+
warnLog('vxe.error.delProp', ['zoom={...}', 'zoom=boolean & zoom-options={...}'])
|
|
818
823
|
}
|
|
819
824
|
|
|
820
825
|
if ($xeTable) {
|
|
@@ -822,16 +827,16 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
822
827
|
}
|
|
823
828
|
const customOpts = $xeToolbar.computeCustomOpts
|
|
824
829
|
if (customOpts.isFooter) {
|
|
825
|
-
warnLog('vxe.error.delProp', ['
|
|
830
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter'])
|
|
826
831
|
}
|
|
827
832
|
if (customOpts.showFooter) {
|
|
828
|
-
warnLog('vxe.error.delProp', ['
|
|
833
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter'])
|
|
829
834
|
}
|
|
830
835
|
if (customOpts.immediate) {
|
|
831
|
-
warnLog('vxe.error.delProp', ['
|
|
836
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate'])
|
|
832
837
|
}
|
|
833
838
|
if (customOpts.trigger) {
|
|
834
|
-
warnLog('vxe.error.delProp', ['
|
|
839
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger'])
|
|
835
840
|
}
|
|
836
841
|
})
|
|
837
842
|
|
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
|