vxe-table 3.21.11 → 3.21.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/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/menu/panel.js +7 -7
- package/es/table/src/cell.js +17 -13
- package/es/table/src/columnInfo.js +85 -81
- package/es/table/src/methods.js +6 -2
- package/es/table/src/table.js +1 -1
- package/es/table/style.css +29 -13
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +29 -13
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +264 -250
- 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/menu/panel.js +8 -8
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/src/cell.js +6 -4
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +93 -81
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +2 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +29 -13
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- 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 +29 -13
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/module/menu/panel.ts +7 -7
- package/packages/table/src/cell.ts +17 -13
- package/packages/table/src/columnInfo.ts +90 -84
- package/packages/table/src/methods.ts +6 -2
- package/packages/table/src/table.ts +1 -1
- package/packages/table/src/util.ts +1 -1
- package/styles/components/table-module/menu.scss +5 -2
- package/styles/components/table.scss +24 -6
- /package/es/{iconfont.1781074394243.ttf → iconfont.1781229212834.ttf} +0 -0
- /package/es/{iconfont.1781074394243.woff → iconfont.1781229212834.woff} +0 -0
- /package/es/{iconfont.1781074394243.woff2 → iconfont.1781229212834.woff2} +0 -0
- /package/lib/{iconfont.1781074394243.ttf → iconfont.1781229212834.ttf} +0 -0
- /package/lib/{iconfont.1781074394243.woff → iconfont.1781229212834.woff} +0 -0
- /package/lib/{iconfont.1781074394243.woff2 → iconfont.1781229212834.woff2} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "3.21.
|
|
3
|
+
"version": "3.21.13",
|
|
4
4
|
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"vue-i18n": "^8.15.1",
|
|
69
69
|
"vue-router": "^3.5.1",
|
|
70
70
|
"vue-template-compiler": "2.6.14",
|
|
71
|
-
"vxe-pc-ui": "3.14.
|
|
71
|
+
"vxe-pc-ui": "3.14.35"
|
|
72
72
|
},
|
|
73
73
|
"vetur": {
|
|
74
74
|
"tags": "helper/vetur/tags.json",
|
|
@@ -48,8 +48,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
48
48
|
|
|
49
49
|
const { ctxMenuStore } = tableReactData
|
|
50
50
|
const menuOpts = $xeTable.computeMenuOpts
|
|
51
|
-
const { destroyOnClose } = menuOpts
|
|
52
|
-
const { visible, list
|
|
51
|
+
const { destroyOnClose, className } = menuOpts
|
|
52
|
+
const { visible, list } = ctxMenuStore
|
|
53
53
|
return h('div', {
|
|
54
54
|
ref: 'refElem',
|
|
55
55
|
class: ['vxe-table--context-menu-wrapper', className, {
|
|
@@ -61,7 +61,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
61
61
|
return options.every((item) => item.visible === false)
|
|
62
62
|
? renderEmptyElement($xeTable)
|
|
63
63
|
: h('ul', {
|
|
64
|
-
class: 'vxe-context-menu
|
|
64
|
+
class: 'vxe-table--context-menu-group-wrapper',
|
|
65
65
|
key: gIndex
|
|
66
66
|
}, options.map((item, index) => {
|
|
67
67
|
const { children, loading } = item
|
|
@@ -74,7 +74,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
74
74
|
return item.visible === false
|
|
75
75
|
? renderEmptyElement($xeTable)
|
|
76
76
|
: h('li', {
|
|
77
|
-
class: [item.className, {
|
|
77
|
+
class: ['vxe-table--context-menu--option', item.className, {
|
|
78
78
|
'link--loading': loading,
|
|
79
79
|
'link--disabled': item.disabled,
|
|
80
80
|
'link--active': item === ctxMenuStore.selected
|
|
@@ -128,12 +128,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
128
128
|
suffixOpts.content ? h('span', `${suffixOpts.content}`) : renderEmptyElement($xeTable)
|
|
129
129
|
])
|
|
130
130
|
]),
|
|
131
|
-
hasChildMenus &&
|
|
131
|
+
hasChildMenus && children
|
|
132
132
|
? h('ul', {
|
|
133
133
|
class: ['vxe-table--context-menu-clild-wrapper', {
|
|
134
134
|
'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
135
135
|
}]
|
|
136
|
-
},
|
|
136
|
+
}, children.map((child, cIndex) => {
|
|
137
137
|
const { loading: childLoading } = child
|
|
138
138
|
const childPrefixOpts = Object.assign({}, child.prefixConfig)
|
|
139
139
|
const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon
|
|
@@ -143,7 +143,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
143
143
|
return child.visible === false
|
|
144
144
|
? null
|
|
145
145
|
: h('li', {
|
|
146
|
-
class: [child.className, {
|
|
146
|
+
class: ['vxe-table--context-menu--option', child.className, {
|
|
147
147
|
'link--loading': childLoading,
|
|
148
148
|
'link--disabled': child.disabled,
|
|
149
149
|
'link--active': child === ctxMenuStore.selectChild
|
|
@@ -981,22 +981,26 @@ export const Cell = {
|
|
|
981
981
|
}
|
|
982
982
|
return renderCellBaseVNs(h, params, [
|
|
983
983
|
showIcon && (!visibleMethod || visibleMethod(params))
|
|
984
|
-
? h('
|
|
984
|
+
? h('div', {
|
|
985
985
|
class: ['vxe-table--expanded', {
|
|
986
986
|
'is--active': isActive
|
|
987
|
-
}]
|
|
988
|
-
on: {
|
|
989
|
-
mousedown (evnt: MouseEvent) {
|
|
990
|
-
evnt.stopPropagation()
|
|
991
|
-
},
|
|
992
|
-
click (evnt: MouseEvent) {
|
|
993
|
-
$table.triggerRowExpandEvent(evnt, params)
|
|
994
|
-
}
|
|
995
|
-
}
|
|
987
|
+
}]
|
|
996
988
|
}, [
|
|
997
|
-
h('
|
|
998
|
-
class:
|
|
999
|
-
|
|
989
|
+
h('span', {
|
|
990
|
+
class: 'vxe-table--expand-btn',
|
|
991
|
+
on: {
|
|
992
|
+
mousedown (evnt: MouseEvent) {
|
|
993
|
+
evnt.stopPropagation()
|
|
994
|
+
},
|
|
995
|
+
click (evnt: MouseEvent) {
|
|
996
|
+
$table.triggerRowExpandEvent(evnt, params)
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}, [
|
|
1000
|
+
h('i', {
|
|
1001
|
+
class: isLazyLoading ? (iconLoaded || getIcon().TABLE_EXPAND_LOADED) : (isActive ? (iconOpen || getIcon().TABLE_EXPAND_OPEN) : (iconClose || getIcon().TABLE_EXPAND_CLOSE))
|
|
1002
|
+
})
|
|
1003
|
+
])
|
|
1000
1004
|
])
|
|
1001
1005
|
: renderEmptyElement($table),
|
|
1002
1006
|
defaultSlot || labelField
|
|
@@ -2,53 +2,56 @@ import XEUtils from 'xe-utils'
|
|
|
2
2
|
import { VxeUI } from '../../ui'
|
|
3
3
|
import { toFilters } from './util'
|
|
4
4
|
import { isEnableConf, getFuncText } from '../../ui/src/utils'
|
|
5
|
+
import { isPx } from '../../ui/src/dom'
|
|
5
6
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
6
7
|
|
|
7
|
-
import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines } from '../../../types'
|
|
8
|
+
import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines, VxeColumnProps } from '../../../types'
|
|
8
9
|
|
|
9
10
|
const { getI18n, formats, renderer } = VxeUI
|
|
10
11
|
|
|
11
12
|
export class ColumnInfo {
|
|
12
13
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
13
|
-
constructor ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
|
|
14
|
+
constructor ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, colConfs: VxeColumnProps & { renderHeader?: any, renderCell?: any, renderFooter?: any, slots?: any }, { renderHeader, renderCell, renderFooter, renderData }: any = {}) {
|
|
14
15
|
const tableProps = $xeTable
|
|
15
16
|
const $xeGrid = $xeTable.$xeGrid
|
|
16
17
|
const $xeGantt = $xeTable.$xeGantt
|
|
17
18
|
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
18
19
|
|
|
19
|
-
const { field, editRender, filterRender } =
|
|
20
|
+
const { type, field, width, visible, aggFunc, formatter, filterMultiple, cellRender, editRender, filterRender } = colConfs
|
|
20
21
|
|
|
21
|
-
const colId =
|
|
22
|
+
const colId = colConfs.colId || XEUtils.uniqueId('col_')
|
|
22
23
|
|
|
23
24
|
const proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : null
|
|
24
|
-
const
|
|
25
|
-
const
|
|
25
|
+
const defaultVisible = XEUtils.isBoolean(visible) ? visible : true
|
|
26
|
+
const defaultRenderWidth = width && isPx(width) && width !== 'auto' ? Math.max(0, XEUtils.toInteger(width)) : 0
|
|
26
27
|
|
|
27
|
-
const flCompConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
|
|
28
|
+
const flCompConf = filterRender && isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
|
|
28
29
|
const ctFilterOptions = flCompConf ? flCompConf.createTableFilterOptions : null
|
|
29
30
|
|
|
30
|
-
const filters = toFilters(
|
|
31
|
+
const filters = toFilters(colConfs.filters, colId)
|
|
31
32
|
|
|
32
33
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html']
|
|
33
|
-
if (
|
|
34
|
-
warnLog('vxe.error.errProp', [`type=${
|
|
34
|
+
if (type && types.indexOf(type) === -1) {
|
|
35
|
+
warnLog('vxe.error.errProp', [`type=${type}`, types.join(', ')])
|
|
35
36
|
}
|
|
36
|
-
if (XEUtils.isBoolean(
|
|
37
|
-
warnLog('vxe.error.errProp', [`column.cell-render=${
|
|
37
|
+
if (XEUtils.isBoolean(cellRender) || (cellRender && !XEUtils.isObject(cellRender))) {
|
|
38
|
+
warnLog('vxe.error.errProp', [`column.cell-render=${cellRender}`, 'column.cell-render={}'])
|
|
38
39
|
}
|
|
39
|
-
if (XEUtils.isBoolean(
|
|
40
|
-
warnLog('vxe.error.errProp', [`column.edit-render=${
|
|
40
|
+
if (XEUtils.isBoolean(editRender) || (editRender && !XEUtils.isObject(editRender))) {
|
|
41
|
+
warnLog('vxe.error.errProp', [`column.edit-render=${editRender}`, 'column.edit-render={}'])
|
|
41
42
|
}
|
|
42
|
-
if (
|
|
43
|
+
if (type === 'expand') {
|
|
43
44
|
const { treeConfig } = tableProps
|
|
44
45
|
if (treeConfig && ($xeTable.treeOpts.showLine || $xeTable.treeOpts.line)) {
|
|
45
46
|
errLog('vxe.error.errConflicts', ['tree-config.line', 'column.type=expand'])
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
+
// 参数已废弃
|
|
50
|
+
if ((colConfs as any).remoteSort) {
|
|
49
51
|
warnLog('vxe.error.delProp', ['column.remote-sort', 'sort-config.remote'])
|
|
50
52
|
}
|
|
51
|
-
|
|
53
|
+
// 参数已废弃
|
|
54
|
+
if ((colConfs as any).sortMethod) {
|
|
52
55
|
warnLog('vxe.error.delProp', ['column.sort-method', 'sort-config.sortMethod'])
|
|
53
56
|
}
|
|
54
57
|
if (formatter) {
|
|
@@ -64,9 +67,9 @@ export class ColumnInfo {
|
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
|
-
if (
|
|
68
|
-
if (!$xeTable.handlePivotTableAggData &&
|
|
69
|
-
errLog('vxe.error.errProp', [`column.agg-func=${
|
|
70
|
+
if (aggFunc) {
|
|
71
|
+
if (!$xeTable.handlePivotTableAggData && aggFunc !== true) {
|
|
72
|
+
errLog('vxe.error.errProp', [`column.agg-func=${aggFunc}`, 'column.agg-func=true'])
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
75
|
|
|
@@ -81,76 +84,79 @@ export class ColumnInfo {
|
|
|
81
84
|
|
|
82
85
|
Object.assign(this, {
|
|
83
86
|
// 基本属性
|
|
84
|
-
type:
|
|
85
|
-
property:
|
|
87
|
+
type: colConfs.type,
|
|
88
|
+
property: colConfs.field,
|
|
86
89
|
field: field,
|
|
87
|
-
title:
|
|
88
|
-
width:
|
|
89
|
-
minWidth:
|
|
90
|
-
maxWidth:
|
|
91
|
-
resizable:
|
|
92
|
-
fixed:
|
|
93
|
-
align:
|
|
94
|
-
headerAlign:
|
|
95
|
-
footerAlign:
|
|
96
|
-
showOverflow:
|
|
97
|
-
showHeaderOverflow:
|
|
98
|
-
showFooterOverflow:
|
|
99
|
-
className:
|
|
100
|
-
headerClassName:
|
|
101
|
-
footerClassName:
|
|
90
|
+
title: colConfs.title,
|
|
91
|
+
width: colConfs.width,
|
|
92
|
+
minWidth: colConfs.minWidth,
|
|
93
|
+
maxWidth: colConfs.maxWidth,
|
|
94
|
+
resizable: colConfs.resizable,
|
|
95
|
+
fixed: colConfs.fixed,
|
|
96
|
+
align: colConfs.align,
|
|
97
|
+
headerAlign: colConfs.headerAlign,
|
|
98
|
+
footerAlign: colConfs.footerAlign,
|
|
99
|
+
showOverflow: colConfs.showOverflow,
|
|
100
|
+
showHeaderOverflow: colConfs.showHeaderOverflow,
|
|
101
|
+
showFooterOverflow: colConfs.showFooterOverflow,
|
|
102
|
+
className: colConfs.className,
|
|
103
|
+
headerClassName: colConfs.headerClassName,
|
|
104
|
+
footerClassName: colConfs.footerClassName,
|
|
102
105
|
formatter,
|
|
103
|
-
headerFormatter:
|
|
104
|
-
footerFormatter:
|
|
105
|
-
padding:
|
|
106
|
-
verticalAlign:
|
|
107
|
-
sortable:
|
|
108
|
-
sortBy:
|
|
109
|
-
sortType:
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
headerFormatter: colConfs.headerFormatter,
|
|
107
|
+
footerFormatter: colConfs.footerFormatter,
|
|
108
|
+
padding: colConfs.padding,
|
|
109
|
+
verticalAlign: colConfs.verticalAlign,
|
|
110
|
+
sortable: colConfs.sortable,
|
|
111
|
+
sortBy: colConfs.sortBy,
|
|
112
|
+
sortType: colConfs.sortType,
|
|
113
|
+
|
|
114
|
+
// 参数已废弃
|
|
115
|
+
sortMethod: (colConfs as any).sortMethod,
|
|
116
|
+
// 参数已废弃
|
|
117
|
+
remoteSort: (colConfs as any).remoteSort,
|
|
118
|
+
|
|
112
119
|
filters: filters,
|
|
113
|
-
filterMultiple: XEUtils.isBoolean(
|
|
114
|
-
filterMethod:
|
|
115
|
-
filterResetMethod:
|
|
116
|
-
filterRecoverMethod:
|
|
120
|
+
filterMultiple: XEUtils.isBoolean(filterMultiple) ? filterMultiple : true,
|
|
121
|
+
filterMethod: colConfs.filterMethod,
|
|
122
|
+
filterResetMethod: colConfs.filterResetMethod,
|
|
123
|
+
filterRecoverMethod: colConfs.filterRecoverMethod,
|
|
117
124
|
filterRender: filterRender,
|
|
118
|
-
floatingFilters:
|
|
119
|
-
rules:
|
|
120
|
-
rowGroupNode:
|
|
121
|
-
treeNode:
|
|
122
|
-
dragSort:
|
|
123
|
-
rowResize:
|
|
124
|
-
cellType:
|
|
125
|
-
cellRender:
|
|
125
|
+
floatingFilters: colConfs.floatingFilters,
|
|
126
|
+
rules: colConfs.rules,
|
|
127
|
+
rowGroupNode: colConfs.rowGroupNode,
|
|
128
|
+
treeNode: colConfs.treeNode,
|
|
129
|
+
dragSort: colConfs.dragSort,
|
|
130
|
+
rowResize: colConfs.rowResize,
|
|
131
|
+
cellType: colConfs.cellType,
|
|
132
|
+
cellRender: colConfs.cellRender,
|
|
126
133
|
editRender: editRender,
|
|
127
|
-
contentRender:
|
|
128
|
-
headerExportMethod:
|
|
129
|
-
exportMethod:
|
|
130
|
-
footerExportMethod:
|
|
131
|
-
titleHelp:
|
|
132
|
-
titlePrefix:
|
|
133
|
-
titleSuffix:
|
|
134
|
-
|
|
135
|
-
aggFunc:
|
|
136
|
-
copyMethod:
|
|
137
|
-
cutMethod:
|
|
138
|
-
pasteMethod:
|
|
134
|
+
contentRender: colConfs.contentRender,
|
|
135
|
+
headerExportMethod: colConfs.headerExportMethod,
|
|
136
|
+
exportMethod: colConfs.exportMethod,
|
|
137
|
+
footerExportMethod: colConfs.footerExportMethod,
|
|
138
|
+
titleHelp: colConfs.titleHelp,
|
|
139
|
+
titlePrefix: colConfs.titlePrefix,
|
|
140
|
+
titleSuffix: colConfs.titleSuffix,
|
|
141
|
+
|
|
142
|
+
aggFunc: colConfs.aggFunc,
|
|
143
|
+
copyMethod: colConfs.copyMethod,
|
|
144
|
+
cutMethod: colConfs.cutMethod,
|
|
145
|
+
pasteMethod: colConfs.pasteMethod,
|
|
139
146
|
|
|
140
147
|
// 自定义参数
|
|
141
|
-
params:
|
|
148
|
+
params: colConfs.params,
|
|
142
149
|
// 渲染属性
|
|
143
150
|
id: colId,
|
|
144
151
|
parentId: null,
|
|
145
|
-
visible,
|
|
152
|
+
visible: defaultVisible,
|
|
146
153
|
// 内部属性(一旦被使用,将导致不可升级版本)
|
|
147
154
|
defaultParentId: null,
|
|
148
155
|
halfVisible: false,
|
|
149
|
-
defaultVisible:
|
|
150
|
-
defaultFixed:
|
|
156
|
+
defaultVisible: defaultVisible,
|
|
157
|
+
defaultFixed: colConfs.fixed,
|
|
151
158
|
|
|
152
|
-
|
|
153
|
-
defaultAggFunc: _vm.aggFunc,
|
|
159
|
+
defaultAggFunc: colConfs.aggFunc,
|
|
154
160
|
|
|
155
161
|
checked: false,
|
|
156
162
|
halfChecked: false,
|
|
@@ -177,7 +183,7 @@ export class ColumnInfo {
|
|
|
177
183
|
renderFixed: '',
|
|
178
184
|
renderVisible: false,
|
|
179
185
|
|
|
180
|
-
renderWidth:
|
|
186
|
+
renderWidth: defaultRenderWidth,
|
|
181
187
|
renderHeight: 0,
|
|
182
188
|
renderResizeWidth: 0,
|
|
183
189
|
renderAutoWidth: 0,
|
|
@@ -186,19 +192,19 @@ export class ColumnInfo {
|
|
|
186
192
|
renderLeft: 0,
|
|
187
193
|
renderArgs: [], // 渲染参数可用于扩展
|
|
188
194
|
model: {},
|
|
189
|
-
renderHeader: renderHeader ||
|
|
190
|
-
renderCell: renderCell ||
|
|
191
|
-
renderFooter: renderFooter ||
|
|
195
|
+
renderHeader: renderHeader || colConfs.renderHeader,
|
|
196
|
+
renderCell: renderCell || colConfs.renderCell,
|
|
197
|
+
renderFooter: renderFooter || colConfs.renderFooter,
|
|
192
198
|
renderData,
|
|
193
199
|
// 单元格插槽,只对 grid 有效
|
|
194
|
-
slots:
|
|
200
|
+
slots: colConfs.slots
|
|
195
201
|
})
|
|
196
202
|
if (ctFilterOptions && (!filters || !filters.length)) {
|
|
197
203
|
(this as any).filters = toFilters(ctFilterOptions({ $table: $xeTable, column: this as unknown as VxeTableDefines.ColumnInfo }), colId)
|
|
198
204
|
}
|
|
199
205
|
if ($xeGGWrapper) {
|
|
200
206
|
if (proxyOpts && proxyOpts.beforeColumn) {
|
|
201
|
-
proxyOpts.beforeColumn({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: this })
|
|
207
|
+
proxyOpts.beforeColumn({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: this as unknown as VxeTableDefines.ColumnInfo })
|
|
202
208
|
}
|
|
203
209
|
}
|
|
204
210
|
}
|
|
@@ -208,8 +214,8 @@ export class ColumnInfo {
|
|
|
208
214
|
}
|
|
209
215
|
|
|
210
216
|
getKey (this: any) {
|
|
211
|
-
const { type } = this
|
|
212
|
-
return
|
|
217
|
+
const { type, field } = this
|
|
218
|
+
return field || (type ? `type=${type}` : null)
|
|
213
219
|
}
|
|
214
220
|
|
|
215
221
|
update (this: any, name: any, value: any) {
|
|
@@ -453,7 +453,11 @@ function updateScrollYStatus ($xeTable: VxeTableConstructor & VxeTablePrivateMet
|
|
|
453
453
|
const { transform } = treeOpts
|
|
454
454
|
const allList = fullData || internalData.tableFullData
|
|
455
455
|
// 如果gt为0,则总是启用
|
|
456
|
-
|
|
456
|
+
let scrollYLoad = !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt < allList.length)
|
|
457
|
+
if (scrollYLoad && (treeConfig && !transform)) {
|
|
458
|
+
errLog('vxe.error.notSupportProp', ['[table] virtual-y-config.enabled=true', 'tree-config.transform=false', 'tree-config.transform=true'])
|
|
459
|
+
scrollYLoad = false
|
|
460
|
+
}
|
|
457
461
|
reactData.scrollYLoad = scrollYLoad
|
|
458
462
|
syncGanttScrollYStatus($xeTable)
|
|
459
463
|
return scrollYLoad
|
|
@@ -5160,7 +5164,7 @@ const tableMethods: any = {
|
|
|
5160
5164
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField
|
|
5161
5165
|
XEUtils.eachTree(tableFullTreeData, (row, index, items, path, parentRow, nodes) => {
|
|
5162
5166
|
const rowid = handleUpdateRowId(row)
|
|
5163
|
-
if (
|
|
5167
|
+
if (lazy) {
|
|
5164
5168
|
if (row[hasChildField] && row[childrenField] === undefined) {
|
|
5165
5169
|
row[childrenField] = null
|
|
5166
5170
|
}
|
|
@@ -1863,7 +1863,7 @@ export default {
|
|
|
1863
1863
|
warnLog('vxe.error.delProp', ['table.edit-config.activeMethod', 'table.edit-config.beforeEditMethod'])
|
|
1864
1864
|
}
|
|
1865
1865
|
if (props.treeConfig && checkboxOpts.isShiftKey) {
|
|
1866
|
-
errLog('vxe.error.
|
|
1866
|
+
errLog('vxe.error.reqSupportProp', ['tree-config', 'checkbox-config.isShiftKey=false'])
|
|
1867
1867
|
}
|
|
1868
1868
|
if (checkboxOpts.halfField) {
|
|
1869
1869
|
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField'])
|
|
@@ -785,7 +785,7 @@ export function getRootColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMe
|
|
|
785
785
|
return column
|
|
786
786
|
}
|
|
787
787
|
|
|
788
|
-
export function toFilters (filters: any, colid?: string) {
|
|
788
|
+
export function toFilters (filters: any, colid?: string | number) {
|
|
789
789
|
if (filters) {
|
|
790
790
|
if (XEUtils.isArray(filters)) {
|
|
791
791
|
return filters.map(({ label, value, data, resetValue, checked }) => {
|
|
@@ -18,13 +18,16 @@
|
|
|
18
18
|
font-family: var(--vxe-ui-font-family);
|
|
19
19
|
background-color: var(--vxe-ui-layout-background-color);
|
|
20
20
|
}
|
|
21
|
+
.vxe-context-menu--option {
|
|
22
|
+
color: var(--vxe-ui-font-color);
|
|
23
|
+
}
|
|
21
24
|
.vxe-context-menu--link {
|
|
22
25
|
display: flex;
|
|
23
26
|
flex-direction: row;
|
|
24
27
|
width: var(--vxe-ui-table-menu-item-width);
|
|
25
28
|
line-height: 26px;
|
|
26
29
|
padding: 0 0.8em;
|
|
27
|
-
color:
|
|
30
|
+
color: inherit;
|
|
28
31
|
cursor: pointer;
|
|
29
32
|
.vxe-context-menu--link-prefix,
|
|
30
33
|
.vxe-context-menu--link-suffix {
|
|
@@ -41,7 +44,7 @@
|
|
|
41
44
|
white-space: nowrap;
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
|
-
.vxe-context-menu
|
|
47
|
+
.vxe-table--context-menu-group-wrapper,
|
|
45
48
|
.vxe-table--context-menu-clild-wrapper {
|
|
46
49
|
margin: 0;
|
|
47
50
|
padding: 0;
|
|
@@ -2204,6 +2204,16 @@ $btnThemeList: (
|
|
|
2204
2204
|
}
|
|
2205
2205
|
|
|
2206
2206
|
/*展开行*/
|
|
2207
|
+
.vxe-body--column {
|
|
2208
|
+
&.col--expand {
|
|
2209
|
+
& > .vxe-cell {
|
|
2210
|
+
.vxe-cell--wrapper {
|
|
2211
|
+
display: flex;
|
|
2212
|
+
flex-direction: row;
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2207
2217
|
.vxe-table--row-expanded-wrapper {
|
|
2208
2218
|
position: absolute;
|
|
2209
2219
|
top: 0;
|
|
@@ -2237,20 +2247,28 @@ $btnThemeList: (
|
|
|
2237
2247
|
border-right: var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color);
|
|
2238
2248
|
}
|
|
2239
2249
|
.vxe-table--expanded {
|
|
2240
|
-
|
|
2250
|
+
display: flex;
|
|
2251
|
+
flex-direction: row;
|
|
2252
|
+
align-items: center;
|
|
2253
|
+
justify-content: center;
|
|
2254
|
+
flex-shrink: 0;
|
|
2241
2255
|
.vxe-table--expand-btn {
|
|
2242
|
-
|
|
2243
|
-
width: 1em;
|
|
2244
|
-
height: 1em;
|
|
2245
|
-
text-align: center;
|
|
2256
|
+
cursor: pointer;
|
|
2246
2257
|
user-select: none;
|
|
2247
2258
|
color: var(--vxe-ui-font-lighten-color);
|
|
2248
|
-
@include baseMixin.createAnimationTransition(transform);
|
|
2249
2259
|
&:hover {
|
|
2250
2260
|
color: var(--vxe-ui-font-color);
|
|
2251
2261
|
}
|
|
2262
|
+
i {
|
|
2263
|
+
display: inline-block;
|
|
2264
|
+
width: 1em;
|
|
2265
|
+
height: 1em;
|
|
2266
|
+
line-height: 1em;
|
|
2267
|
+
@include baseMixin.createAnimationTransition(transform);
|
|
2268
|
+
}
|
|
2252
2269
|
}
|
|
2253
2270
|
&+.vxe-table--expand-label {
|
|
2271
|
+
flex-grow: 1;
|
|
2254
2272
|
padding-left: 0.5em;
|
|
2255
2273
|
}
|
|
2256
2274
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|