vxe-table 4.1.4 → 4.1.7
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/edit/src/hook.js +189 -69
- package/es/form/src/form.js +2 -2
- package/es/input/src/input.js +8 -2
- package/es/table/src/body.js +6 -3
- package/es/table/src/props.js +6 -6
- package/es/table/src/table.js +53 -42
- package/es/v-x-e-table/src/conf.js +4 -1
- package/es/validator/src/hook.js +3 -3
- package/lib/edit/src/hook.js +243 -70
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/form/src/form.js +2 -2
- package/lib/form/src/form.min.js +1 -1
- package/lib/index.umd.js +340 -224
- package/lib/index.umd.min.js +2 -1
- package/lib/input/src/input.js +10 -2
- package/lib/input/src/input.min.js +1 -1
- package/lib/table/src/body.js +6 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/props.js +6 -6
- package/lib/table/src/table.js +57 -45
- package/lib/table/src/table.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +4 -1
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/validator/src/hook.js +3 -3
- package/lib/validator/src/hook.min.js +1 -1
- package/package.json +3 -26
- package/packages/edit/src/hook.ts +183 -69
- package/packages/form/src/form.ts +2 -2
- package/packages/input/src/input.ts +9 -2
- package/packages/table/src/body.ts +6 -3
- package/packages/table/src/props.ts +6 -6
- package/packages/table/src/table.ts +52 -40
- package/packages/v-x-e-table/src/conf.ts +4 -1
- package/packages/v-x-e-table/src/renderer.ts +1 -1
- package/packages/validator/src/hook.ts +3 -3
- package/types/edit.d.ts +6 -3
- package/types/plugins/pro.d.ts +6 -6
- package/types/table.d.ts +9 -0
- package/types/v-x-e-table/renderer.d.ts +4 -2
|
@@ -2313,16 +2313,12 @@ export default defineComponent({
|
|
|
2313
2313
|
const oRow = tableSourceData[rowIndex]
|
|
2314
2314
|
if (oRow && row) {
|
|
2315
2315
|
if (field) {
|
|
2316
|
-
|
|
2316
|
+
const newValue = XEUtils.get(record || row, field)
|
|
2317
|
+
XEUtils.set(row, field, newValue)
|
|
2318
|
+
XEUtils.set(oRow, field, newValue)
|
|
2317
2319
|
} else {
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
XEUtils.clear(row, undefined)
|
|
2321
|
-
Object.assign(row, tablePrivateMethods.defineField(Object.assign({}, record)))
|
|
2322
|
-
tablePrivateMethods.cacheRowMap(true)
|
|
2323
|
-
} else {
|
|
2324
|
-
XEUtils.destructuring(oRow, XEUtils.clone(row, true))
|
|
2325
|
-
}
|
|
2320
|
+
const newRecord = XEUtils.clone({ ...record }, true)
|
|
2321
|
+
XEUtils.destructuring(oRow, Object.assign(row, newRecord))
|
|
2326
2322
|
}
|
|
2327
2323
|
}
|
|
2328
2324
|
reactData.tableData = tableData.slice(0)
|
|
@@ -2341,8 +2337,8 @@ export default defineComponent({
|
|
|
2341
2337
|
const { tableSourceData, fullDataRowIdData, fullAllDataRowIdData } = internalData
|
|
2342
2338
|
const treeOpts = computeTreeOpts.value
|
|
2343
2339
|
const { children } = treeOpts
|
|
2344
|
-
const
|
|
2345
|
-
const parentLevel =
|
|
2340
|
+
const parentRest = fullAllDataRowIdData[getRowid($xetable, row)]
|
|
2341
|
+
const parentLevel = parentRest ? parentRest.level : 0
|
|
2346
2342
|
return tableMethods.createData(childRecords).then((rows) => {
|
|
2347
2343
|
if (keepSource) {
|
|
2348
2344
|
const rowid = getRowid($xetable, row)
|
|
@@ -3090,6 +3086,16 @@ export default defineComponent({
|
|
|
3090
3086
|
const treeOpts = computeTreeOpts.value
|
|
3091
3087
|
const reserveSelection: any[] = []
|
|
3092
3088
|
if (checkboxOpts.reserve) {
|
|
3089
|
+
const afterFullIdMaps: { [key: string]: number } = {}
|
|
3090
|
+
if (treeConfig) {
|
|
3091
|
+
XEUtils.eachTree(afterFullData, row => {
|
|
3092
|
+
afterFullIdMaps[getRowid($xetable, row)] = 1
|
|
3093
|
+
}, treeOpts)
|
|
3094
|
+
} else {
|
|
3095
|
+
afterFullData.forEach(row => {
|
|
3096
|
+
afterFullIdMaps[getRowid($xetable, row)] = 1
|
|
3097
|
+
})
|
|
3098
|
+
}
|
|
3093
3099
|
XEUtils.each(checkboxReserveRowMap, (oldRow, oldRowid) => {
|
|
3094
3100
|
if (oldRow) {
|
|
3095
3101
|
if (isFull) {
|
|
@@ -3097,14 +3103,8 @@ export default defineComponent({
|
|
|
3097
3103
|
reserveSelection.push(oldRow)
|
|
3098
3104
|
}
|
|
3099
3105
|
} else {
|
|
3100
|
-
if (
|
|
3101
|
-
|
|
3102
|
-
reserveSelection.push(oldRow)
|
|
3103
|
-
}
|
|
3104
|
-
} else {
|
|
3105
|
-
if (!afterFullData.some(row => getRowid($xetable, row) === oldRowid)) {
|
|
3106
|
-
reserveSelection.push(oldRow)
|
|
3107
|
-
}
|
|
3106
|
+
if (!afterFullIdMaps[oldRowid]) {
|
|
3107
|
+
reserveSelection.push(oldRow)
|
|
3108
3108
|
}
|
|
3109
3109
|
}
|
|
3110
3110
|
}
|
|
@@ -3154,11 +3154,12 @@ export default defineComponent({
|
|
|
3154
3154
|
* @param {Row} row 行对象
|
|
3155
3155
|
*/
|
|
3156
3156
|
setCurrentRow (row) {
|
|
3157
|
+
const rowOpts = computeRowOpts.value
|
|
3157
3158
|
const el = refElem.value
|
|
3158
3159
|
tableMethods.clearCurrentRow()
|
|
3159
3160
|
tableMethods.clearCurrentColumn()
|
|
3160
3161
|
reactData.currentRow = row
|
|
3161
|
-
if (props.highlightCurrentRow) {
|
|
3162
|
+
if (rowOpts.isCurrent || props.highlightCurrentRow) {
|
|
3162
3163
|
if (el) {
|
|
3163
3164
|
XEUtils.arrayEach(el.querySelectorAll(`[rowid="${getRowid($xetable, row)}"]`), elem => addClass(elem, 'row--current'))
|
|
3164
3165
|
}
|
|
@@ -3204,7 +3205,8 @@ export default defineComponent({
|
|
|
3204
3205
|
* 用于当前行,获取当前行的数据
|
|
3205
3206
|
*/
|
|
3206
3207
|
getCurrentRecord () {
|
|
3207
|
-
|
|
3208
|
+
const rowOpts = computeRowOpts.value
|
|
3209
|
+
return rowOpts.isCurrent || props.highlightCurrentRow ? reactData.currentRow : null
|
|
3208
3210
|
},
|
|
3209
3211
|
/**
|
|
3210
3212
|
* 用于单选行,获取当已选中的数据
|
|
@@ -3228,7 +3230,7 @@ export default defineComponent({
|
|
|
3228
3230
|
return selectRow
|
|
3229
3231
|
}
|
|
3230
3232
|
} else {
|
|
3231
|
-
if (
|
|
3233
|
+
if ($xetable.findRowIndexOf(afterFullData, selectRow) > -1) {
|
|
3232
3234
|
return selectRow
|
|
3233
3235
|
}
|
|
3234
3236
|
}
|
|
@@ -3237,7 +3239,8 @@ export default defineComponent({
|
|
|
3237
3239
|
return null
|
|
3238
3240
|
},
|
|
3239
3241
|
getCurrentColumn () {
|
|
3240
|
-
|
|
3242
|
+
const columnOpts = computeColumnOpts.value
|
|
3243
|
+
return columnOpts.isCurrent || props.highlightCurrentColumn ? reactData.currentColumn : null
|
|
3241
3244
|
},
|
|
3242
3245
|
/**
|
|
3243
3246
|
* 用于当前列,设置某列行为高亮状态
|
|
@@ -3990,6 +3993,7 @@ export default defineComponent({
|
|
|
3990
3993
|
const { mouseConfig, keyboardConfig } = props
|
|
3991
3994
|
const { filterStore, ctxMenuStore, editStore } = reactData
|
|
3992
3995
|
const mouseOpts = computeMouseOpts.value
|
|
3996
|
+
const keyboardOpts = computeKeyboardOpts.value
|
|
3993
3997
|
const { actived } = editStore
|
|
3994
3998
|
const isEsc = hasEventKey(evnt, EVENT_KEYS.ESCAPE)
|
|
3995
3999
|
if (isEsc) {
|
|
@@ -4003,13 +4007,15 @@ export default defineComponent({
|
|
|
4003
4007
|
$xetable.closeMenu()
|
|
4004
4008
|
}
|
|
4005
4009
|
tableMethods.closeFilter()
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4010
|
+
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
4011
|
+
// 如果是激活编辑状态,则取消编辑
|
|
4012
|
+
if (actived.row) {
|
|
4013
|
+
const params = actived.args
|
|
4014
|
+
$xetable.clearActived(evnt)
|
|
4015
|
+
// 如果配置了选中功能,则为选中状态
|
|
4016
|
+
if (mouseOpts.selected) {
|
|
4017
|
+
nextTick(() => $xetable.handleSelected(params, evnt))
|
|
4018
|
+
}
|
|
4013
4019
|
}
|
|
4014
4020
|
}
|
|
4015
4021
|
}
|
|
@@ -4034,6 +4040,7 @@ export default defineComponent({
|
|
|
4034
4040
|
const editOpts = computeEditOpts.value
|
|
4035
4041
|
const treeOpts = computeTreeOpts.value
|
|
4036
4042
|
const menuList = computeMenuList.value
|
|
4043
|
+
const rowOpts = computeRowOpts.value
|
|
4037
4044
|
const { selected, actived } = editStore
|
|
4038
4045
|
const keyCode = evnt.keyCode
|
|
4039
4046
|
const isEsc = hasEventKey(evnt, EVENT_KEYS.ESCAPE)
|
|
@@ -4072,7 +4079,7 @@ export default defineComponent({
|
|
|
4072
4079
|
$xetable.closeMenu()
|
|
4073
4080
|
}
|
|
4074
4081
|
tableMethods.closeFilter()
|
|
4075
|
-
if (
|
|
4082
|
+
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
4076
4083
|
// 如果是激活编辑状态,则取消编辑
|
|
4077
4084
|
if (actived.row) {
|
|
4078
4085
|
const params = actived.args
|
|
@@ -4106,7 +4113,7 @@ export default defineComponent({
|
|
|
4106
4113
|
keyCtxTimeout = setTimeout(() => {
|
|
4107
4114
|
internalData._keyCtx = false
|
|
4108
4115
|
}, 1000)
|
|
4109
|
-
} else if (isEnter && !isAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || (treeConfig && highlightCurrentRow && currentRow))) {
|
|
4116
|
+
} else if (isEnter && !isAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
4110
4117
|
// 退出选中
|
|
4111
4118
|
if (hasCtrlKey) {
|
|
4112
4119
|
// 如果是激活编辑状态,则取消编辑
|
|
@@ -4135,7 +4142,7 @@ export default defineComponent({
|
|
|
4135
4142
|
$xetable.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt)
|
|
4136
4143
|
}
|
|
4137
4144
|
}
|
|
4138
|
-
} else if (treeConfig && highlightCurrentRow && currentRow) {
|
|
4145
|
+
} else if (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
4139
4146
|
// 如果是树形表格当前行回车移动到子节点
|
|
4140
4147
|
const childrens = currentRow[treeOpts.children]
|
|
4141
4148
|
if (childrens && childrens.length) {
|
|
@@ -4158,7 +4165,7 @@ export default defineComponent({
|
|
|
4158
4165
|
// 如果按下了方向键
|
|
4159
4166
|
if (selected.row && selected.column) {
|
|
4160
4167
|
$xetable.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt)
|
|
4161
|
-
} else if ((isUpArrow || isDwArrow) && highlightCurrentRow) {
|
|
4168
|
+
} else if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
|
|
4162
4169
|
// 当前行按键上下移动
|
|
4163
4170
|
$xetable.moveCurrentRow(isUpArrow, isDwArrow, evnt)
|
|
4164
4171
|
}
|
|
@@ -4170,7 +4177,7 @@ export default defineComponent({
|
|
|
4170
4177
|
} else if (actived.row || actived.column) {
|
|
4171
4178
|
$xetable.moveTabSelected(actived.args, hasShiftKey, evnt)
|
|
4172
4179
|
}
|
|
4173
|
-
} else if (keyboardConfig && isEnableConf(editConfig) && (isDel || (treeConfig && highlightCurrentRow && currentRow ? isBack && keyboardOpts.isArrow : isBack))) {
|
|
4180
|
+
} else if (keyboardConfig && isEnableConf(editConfig) && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? isBack && keyboardOpts.isArrow : isBack))) {
|
|
4174
4181
|
if (!isEditStatus) {
|
|
4175
4182
|
const { delMethod, backMethod } = keyboardOpts
|
|
4176
4183
|
// 如果是删除键
|
|
@@ -4202,7 +4209,7 @@ export default defineComponent({
|
|
|
4202
4209
|
// 如果按下 del 键,更新表尾数据
|
|
4203
4210
|
tableMethods.updateFooter()
|
|
4204
4211
|
}
|
|
4205
|
-
} else if (isBack && keyboardOpts.isArrow && treeConfig && highlightCurrentRow && currentRow) {
|
|
4212
|
+
} else if (isBack && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
4206
4213
|
// 如果树形表格回退键关闭当前行返回父节点
|
|
4207
4214
|
const { parent: parentRow } = XEUtils.findTree(internalData.afterFullData, item => item === currentRow, treeOpts)
|
|
4208
4215
|
if (parentRow) {
|
|
@@ -4827,6 +4834,7 @@ export default defineComponent({
|
|
|
4827
4834
|
triggerHeaderCellClickEvent (evnt, params) {
|
|
4828
4835
|
const { _lastResizeTime } = internalData
|
|
4829
4836
|
const sortOpts = computeSortOpts.value
|
|
4837
|
+
const columnOpts = computeColumnOpts.value
|
|
4830
4838
|
const { column } = params
|
|
4831
4839
|
const cell = evnt.currentTarget
|
|
4832
4840
|
const triggerResizable = _lastResizeTime && _lastResizeTime > Date.now() - 300
|
|
@@ -4836,7 +4844,7 @@ export default defineComponent({
|
|
|
4836
4844
|
tablePrivateMethods.triggerSortEvent(evnt, column, getNextSortOrder(column))
|
|
4837
4845
|
}
|
|
4838
4846
|
tableMethods.dispatchEvent('header-cell-click', Object.assign({ triggerResizable, triggerSort, triggerFilter, cell }, params), evnt)
|
|
4839
|
-
if (props.highlightCurrentColumn) {
|
|
4847
|
+
if (columnOpts.isCurrent || props.highlightCurrentColumn) {
|
|
4840
4848
|
tableMethods.setCurrentColumn(column)
|
|
4841
4849
|
}
|
|
4842
4850
|
},
|
|
@@ -4856,6 +4864,7 @@ export default defineComponent({
|
|
|
4856
4864
|
const treeOpts = computeTreeOpts.value
|
|
4857
4865
|
const radioOpts = computeRadioOpts.value
|
|
4858
4866
|
const checkboxOpts = computeCheckboxOpts.value
|
|
4867
|
+
const rowOpts = computeRowOpts.value
|
|
4859
4868
|
const { actived } = editStore
|
|
4860
4869
|
const { row, column } = params
|
|
4861
4870
|
const { type, treeNode } = column
|
|
@@ -4882,7 +4891,7 @@ export default defineComponent({
|
|
|
4882
4891
|
if (!triggerTreeNode) {
|
|
4883
4892
|
if (!triggerExpandNode) {
|
|
4884
4893
|
// 如果是高亮行
|
|
4885
|
-
if (highlightCurrentRow) {
|
|
4894
|
+
if (rowOpts.isCurrent || highlightCurrentRow) {
|
|
4886
4895
|
if (!triggerCheckbox && !triggerRadio) {
|
|
4887
4896
|
tablePrivateMethods.triggerCurrentRowEvent(evnt, params)
|
|
4888
4897
|
}
|
|
@@ -5189,6 +5198,7 @@ export default defineComponent({
|
|
|
5189
5198
|
tablePrivateMethods.handleTableData()
|
|
5190
5199
|
tablePrivateMethods.updateScrollYSpace()
|
|
5191
5200
|
},
|
|
5201
|
+
updateVirtualTreeData,
|
|
5192
5202
|
/**
|
|
5193
5203
|
* 处理固定列的显示状态
|
|
5194
5204
|
*/
|
|
@@ -5677,6 +5687,8 @@ export default defineComponent({
|
|
|
5677
5687
|
const { leftList, rightList } = columnStore
|
|
5678
5688
|
const tooltipOpts = computeTooltipOpts.value
|
|
5679
5689
|
const treeOpts = computeTreeOpts.value
|
|
5690
|
+
const rowOpts = computeRowOpts.value
|
|
5691
|
+
const columnOpts = computeColumnOpts.value
|
|
5680
5692
|
const vSize = computeSize.value
|
|
5681
5693
|
const tableBorder = computeTableBorder.value
|
|
5682
5694
|
const mouseOpts = computeMouseOpts.value
|
|
@@ -5691,8 +5703,8 @@ export default defineComponent({
|
|
|
5691
5703
|
'cell--highlight': highlightCell,
|
|
5692
5704
|
'cell--selected': mouseConfig && mouseOpts.selected,
|
|
5693
5705
|
'cell--area': mouseConfig && mouseOpts.area,
|
|
5694
|
-
'row--highlight': highlightHoverRow,
|
|
5695
|
-
'column--highlight': highlightHoverColumn,
|
|
5706
|
+
'row--highlight': rowOpts.isHover || highlightHoverRow,
|
|
5707
|
+
'column--highlight': columnOpts.isHover || highlightHoverColumn,
|
|
5696
5708
|
'is--header': showHeader,
|
|
5697
5709
|
'is--footer': showFooter,
|
|
5698
5710
|
'is--group': isGroup,
|
|
@@ -13,6 +13,7 @@ const GlobalConfig: VXETableGlobalConfig = {
|
|
|
13
13
|
showHeader: true,
|
|
14
14
|
animat: true,
|
|
15
15
|
delayHover: 250,
|
|
16
|
+
autoResize: true,
|
|
16
17
|
// keepSource: false,
|
|
17
18
|
// showOverflow: null,
|
|
18
19
|
// showHeaderOverflow: null,
|
|
@@ -20,7 +21,6 @@ const GlobalConfig: VXETableGlobalConfig = {
|
|
|
20
21
|
// resizeInterval: 500,
|
|
21
22
|
// size: null,
|
|
22
23
|
// zIndex: null,
|
|
23
|
-
// autoResize: false,
|
|
24
24
|
// stripe: false,
|
|
25
25
|
// border: false,
|
|
26
26
|
// round: false,
|
|
@@ -93,6 +93,9 @@ const GlobalConfig: VXETableGlobalConfig = {
|
|
|
93
93
|
mouseConfig: {
|
|
94
94
|
extension: true
|
|
95
95
|
},
|
|
96
|
+
keyboardConfig: {
|
|
97
|
+
isEsc: true
|
|
98
|
+
},
|
|
96
99
|
areaConfig: {
|
|
97
100
|
selectCellByHeader: true
|
|
98
101
|
},
|
|
@@ -685,7 +685,7 @@ export const renderer: VxeGlobalRenderer = {
|
|
|
685
685
|
XEUtils.each(opts, (options, name) => renderer.add(name, options))
|
|
686
686
|
return renderer
|
|
687
687
|
},
|
|
688
|
-
get (name) {
|
|
688
|
+
get (name: string) {
|
|
689
689
|
return renderMap[name] || null
|
|
690
690
|
},
|
|
691
691
|
add (name, options) {
|
|
@@ -149,21 +149,21 @@ const validatorHook: VxeGlobalHooksHandles.HookOptions = {
|
|
|
149
149
|
const ruleProps = Object.keys(validRest)
|
|
150
150
|
return nextTick().then(() => {
|
|
151
151
|
if (ruleProps.length) {
|
|
152
|
-
return
|
|
152
|
+
return validRest[ruleProps[0]][0]
|
|
153
153
|
}
|
|
154
154
|
if (cb) {
|
|
155
155
|
cb()
|
|
156
156
|
}
|
|
157
157
|
})
|
|
158
158
|
}).catch(firstErrParams => {
|
|
159
|
-
return new Promise<void>((resolve
|
|
159
|
+
return new Promise<void>((resolve) => {
|
|
160
160
|
const finish = () => {
|
|
161
161
|
nextTick(() => {
|
|
162
162
|
if (cb) {
|
|
163
163
|
cb(validRest)
|
|
164
164
|
resolve()
|
|
165
165
|
} else {
|
|
166
|
-
|
|
166
|
+
resolve(validRest)
|
|
167
167
|
}
|
|
168
168
|
})
|
|
169
169
|
}
|
package/types/edit.d.ts
CHANGED
|
@@ -13,9 +13,12 @@ export interface TableEditMethods {
|
|
|
13
13
|
*/
|
|
14
14
|
insert(records: RecordInfo | RecordInfo[]): Promise<{ row: any, rows: any[] }>;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* 往表格指定行中插入临时数据
|
|
17
|
+
* 如果 row 为空则从插入到顶部,如果为树结构,则插入到目标节点顶部
|
|
18
|
+
* 如果 row 为 -1 则从插入到底部,如果为树结构,则插入到目标节点底部
|
|
19
|
+
* 如果 row 为有效行则插入到该行的位置,如果为树结构,则有插入到效的目标节点该行的位置
|
|
20
|
+
* @param {Object/Array} records 新的数据
|
|
21
|
+
* @param {Row} row 指定行
|
|
19
22
|
*/
|
|
20
23
|
insertAt(records: RecordInfo | RecordInfo[], row: any | -1 | null): Promise<{ row: any, rows: any[] }>;
|
|
21
24
|
/**
|
package/types/plugins/pro.d.ts
CHANGED
|
@@ -28,9 +28,9 @@ export interface VxeTableProMethods {
|
|
|
28
28
|
*/
|
|
29
29
|
pasteCellArea(): Promise<any>;
|
|
30
30
|
/**
|
|
31
|
-
* 用于 mouse-config.area
|
|
31
|
+
* 用于 mouse-config.area,用于清除鼠标选择的区域,可以指定清除的区域
|
|
32
32
|
*/
|
|
33
|
-
clearCellAreas(): Promise<any>;
|
|
33
|
+
clearCellAreas(area?: number | VxeTableProDefines.MouseCellArea): Promise<any>;
|
|
34
34
|
/**
|
|
35
35
|
* 用于 mouse-config.area,手动清除标记为复制粘贴的区域
|
|
36
36
|
*/
|
|
@@ -40,9 +40,9 @@ export interface VxeTableProMethods {
|
|
|
40
40
|
* @param areaConfigs 指定区域
|
|
41
41
|
*/
|
|
42
42
|
setCellAreas(areaConfigs: VxeTableProDefines.CellAreaConfig[], activeArea?: {
|
|
43
|
-
area?: VxeTableProDefines.CellAreaConfig;
|
|
44
|
-
column
|
|
45
|
-
row
|
|
43
|
+
area?: number | VxeTableProDefines.CellAreaConfig;
|
|
44
|
+
column?: number | VxeTableDefines.ColumnInfo;
|
|
45
|
+
row?: any;
|
|
46
46
|
}): Promise<any>;
|
|
47
47
|
/**
|
|
48
48
|
* 用于 mouse-config.area,设置活动的区域的单元格
|
|
@@ -148,7 +148,7 @@ export namespace VxeTableProDefines {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
export interface ActiveCellAreaConfig {
|
|
151
|
-
area: VxeTableProDefines.MouseCellArea;
|
|
151
|
+
area: VxeTableProDefines.MouseCellArea | number;
|
|
152
152
|
column: VxeTableDefines.ColumnInfo | number;
|
|
153
153
|
row: any;
|
|
154
154
|
}
|
package/types/table.d.ts
CHANGED
|
@@ -707,6 +707,7 @@ export interface TablePrivateMethods {
|
|
|
707
707
|
updateScrollYSpace(): void;
|
|
708
708
|
updateScrollXData(): void;
|
|
709
709
|
updateScrollYData(): void;
|
|
710
|
+
updateVirtualTreeData(): Promise<any>;
|
|
710
711
|
checkScrolling(): void;
|
|
711
712
|
updateZindex(): void;
|
|
712
713
|
updateCellAreas(): void;
|
|
@@ -1208,6 +1209,8 @@ export namespace VxeTablePropTypes {
|
|
|
1208
1209
|
* 列配置信息
|
|
1209
1210
|
*/
|
|
1210
1211
|
export interface ColumnConfig {
|
|
1212
|
+
isCurrent?: boolean;
|
|
1213
|
+
isHover?: boolean;
|
|
1211
1214
|
resizable?: VxeColumnPropTypes.Resizable;
|
|
1212
1215
|
width?: VxeColumnPropTypes.Width;
|
|
1213
1216
|
minWidth?: VxeColumnPropTypes.MinWidth;
|
|
@@ -1218,6 +1221,8 @@ export namespace VxeTablePropTypes {
|
|
|
1218
1221
|
* 行配置信息
|
|
1219
1222
|
*/
|
|
1220
1223
|
export interface RowConfig {
|
|
1224
|
+
isCurrent?: boolean;
|
|
1225
|
+
isHover?: boolean;
|
|
1221
1226
|
height?: number;
|
|
1222
1227
|
}
|
|
1223
1228
|
export interface RowOpts extends RowConfig { }
|
|
@@ -1550,6 +1555,10 @@ export namespace VxeTablePropTypes {
|
|
|
1550
1555
|
* 是否开启非编辑状态下,上下左右移动功能
|
|
1551
1556
|
*/
|
|
1552
1557
|
isArrow?: boolean;
|
|
1558
|
+
/**
|
|
1559
|
+
* 是否开启Esc键退出编辑功能
|
|
1560
|
+
*/
|
|
1561
|
+
isEsc?: boolean;
|
|
1553
1562
|
/**
|
|
1554
1563
|
* 是否开启删除键功能
|
|
1555
1564
|
*/
|
|
@@ -17,6 +17,8 @@ export interface DefineRendererOption<T> {
|
|
|
17
17
|
filterRemoteMethod?(params: VxeGlobalRendererHandles.FilterRemoteMethod): boolean;
|
|
18
18
|
filterResetMethod?(params: VxeGlobalRendererHandles.FilterResetMethodParams): void;
|
|
19
19
|
filterRecoverMethod?(params: VxeGlobalRendererHandles.FilterRecoverMethodParams): void;
|
|
20
|
+
// 默认行为
|
|
21
|
+
defaultFilterMethod?(params: VxeGlobalRendererHandles.FilterMethodParams): boolean;
|
|
20
22
|
|
|
21
23
|
// 单元格渲染
|
|
22
24
|
renderHeader?(renderOpts: VxeGlobalRendererHandles.RenderHeaderOptions, params: VxeGlobalRendererHandles.RenderHeaderParams): T;
|
|
@@ -197,7 +199,7 @@ export namespace VxeGlobalRendererHandles {
|
|
|
197
199
|
/**
|
|
198
200
|
* 渲染器名称
|
|
199
201
|
*/
|
|
200
|
-
name
|
|
202
|
+
name?: string;
|
|
201
203
|
/**
|
|
202
204
|
* 目标组件渲染的参数
|
|
203
205
|
*/
|
|
@@ -246,7 +248,7 @@ export interface VxeGlobalRenderer {
|
|
|
246
248
|
mixin(options: {
|
|
247
249
|
[name: string]: RendererOptions;
|
|
248
250
|
}): VxeGlobalRenderer;
|
|
249
|
-
get(name: string): DefineRendererOption<VxeGlobalRendererHandles.RenderResult>;
|
|
251
|
+
get(name: string | null | undefined): DefineRendererOption<VxeGlobalRendererHandles.RenderResult>;
|
|
250
252
|
add(name: string, options: RendererOptions): VxeGlobalRenderer;
|
|
251
253
|
delete(name: string): void;
|
|
252
254
|
}
|