vxe-table 3.19.34 → 3.19.36
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/style.css +1 -1
- package/es/table/module/edit/mixin.js +29 -15
- package/es/table/src/cell.js +53 -23
- package/es/table/src/methods.js +0 -13
- package/es/table/src/props.js +2 -0
- package/es/table/src/table.js +5 -0
- package/es/ui/index.js +4 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +107 -41
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +31 -15
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/cell.js +63 -23
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +0 -18
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +2 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +5 -0
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +4 -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/package.json +1 -1
- package/packages/table/module/edit/mixin.ts +29 -15
- package/packages/table/src/cell.ts +53 -23
- package/packages/table/src/methods.ts +0 -16
- package/packages/table/src/props.ts +2 -0
- package/packages/table/src/table.ts +6 -0
- package/packages/ui/index.ts +3 -0
- /package/es/{iconfont.1766711835500.ttf → iconfont.1766978388668.ttf} +0 -0
- /package/es/{iconfont.1766711835500.woff → iconfont.1766978388668.woff} +0 -0
- /package/es/{iconfont.1766711835500.woff2 → iconfont.1766978388668.woff2} +0 -0
- /package/lib/{iconfont.1766711835500.ttf → iconfont.1766978388668.ttf} +0 -0
- /package/lib/{iconfont.1766711835500.woff → iconfont.1766978388668.woff} +0 -0
- /package/lib/{iconfont.1766711835500.woff2 → iconfont.1766978388668.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
|
|
|
2005
2005
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2006
2006
|
|
|
2007
2007
|
|
|
2008
|
-
const version = "3.19.
|
|
2008
|
+
const version = "3.19.36";
|
|
2009
2009
|
core_.VxeUI.version = version;
|
|
2010
2010
|
core_.VxeUI.tableVersion = version;
|
|
2011
2011
|
core_.VxeUI.setConfig({
|
|
@@ -2260,6 +2260,9 @@ core_.VxeUI.setConfig({
|
|
|
2260
2260
|
// position: 'right',
|
|
2261
2261
|
visible: true
|
|
2262
2262
|
}
|
|
2263
|
+
},
|
|
2264
|
+
undoHistoryConfig: {
|
|
2265
|
+
isEditRow: true
|
|
2263
2266
|
}
|
|
2264
2267
|
},
|
|
2265
2268
|
grid: {
|
|
@@ -2715,7 +2718,7 @@ function isNodeElement(elem) {
|
|
|
2715
2718
|
const {
|
|
2716
2719
|
log: log_log
|
|
2717
2720
|
} = core_.VxeUI;
|
|
2718
|
-
const log_version = `table v${"3.19.
|
|
2721
|
+
const log_version = `table v${"3.19.36"}`;
|
|
2719
2722
|
const warnLog = log_log.create('warn', log_version);
|
|
2720
2723
|
const errLog = log_log.create('error', log_version);
|
|
2721
2724
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3991,15 +3994,23 @@ function getFooterContent(h, params) {
|
|
|
3991
3994
|
column,
|
|
3992
3995
|
row
|
|
3993
3996
|
} = params;
|
|
3997
|
+
const tableProps = $table;
|
|
3998
|
+
const {
|
|
3999
|
+
editConfig
|
|
4000
|
+
} = tableProps;
|
|
3994
4001
|
const {
|
|
3995
4002
|
slots,
|
|
3996
4003
|
editRender,
|
|
3997
4004
|
cellRender
|
|
3998
4005
|
} = column;
|
|
3999
|
-
const
|
|
4000
|
-
if (
|
|
4001
|
-
return $table.callSlot(
|
|
4006
|
+
const footerSlot = slots ? slots.footer : null;
|
|
4007
|
+
if (footerSlot) {
|
|
4008
|
+
return $table.callSlot(footerSlot, params, h);
|
|
4002
4009
|
}
|
|
4010
|
+
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
4011
|
+
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
4012
|
+
const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
|
|
4013
|
+
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
4003
4014
|
const itemValue = $table.getFooterCellLabel(row, column);
|
|
4004
4015
|
if (renderOpts) {
|
|
4005
4016
|
const compConf = cell_renderer.get(renderOpts.name);
|
|
@@ -4061,7 +4072,9 @@ function renderCellHandle(h, params) {
|
|
|
4061
4072
|
case 'html':
|
|
4062
4073
|
return isDeepCell ? Cell.renderDeepHTMLCell(h, params) : Cell.renderHTMLCell(h, params);
|
|
4063
4074
|
}
|
|
4064
|
-
|
|
4075
|
+
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
4076
|
+
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
4077
|
+
if (editRenderOpts) {
|
|
4065
4078
|
return editOpts.mode === 'cell' ? isDeepCell ? Cell.renderDeepCellEdit(h, params) : Cell.renderCellEdit(h, params) : isDeepCell ? Cell.renderDeepRowEdit(h, params) : Cell.renderRowEdit(h, params);
|
|
4066
4079
|
}
|
|
4067
4080
|
return isDeepCell ? Cell.renderDeepCell(h, params) : Cell.renderDefaultCell(h, params);
|
|
@@ -4075,7 +4088,6 @@ function renderHeaderHandle(h, params) {
|
|
|
4075
4088
|
const {
|
|
4076
4089
|
editConfig
|
|
4077
4090
|
} = tableProps;
|
|
4078
|
-
const editOpts = $table.computeEditOpts;
|
|
4079
4091
|
const {
|
|
4080
4092
|
type,
|
|
4081
4093
|
filters,
|
|
@@ -4099,7 +4111,9 @@ function renderHeaderHandle(h, params) {
|
|
|
4099
4111
|
}
|
|
4100
4112
|
break;
|
|
4101
4113
|
}
|
|
4102
|
-
|
|
4114
|
+
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
4115
|
+
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
4116
|
+
if (editRenderOpts) {
|
|
4103
4117
|
return Cell.renderEditHeader(h, params);
|
|
4104
4118
|
} else if (filters && sortable) {
|
|
4105
4119
|
return Cell.renderSortAndFilterHeader(h, params);
|
|
@@ -4136,15 +4150,23 @@ const Cell = {
|
|
|
4136
4150
|
$table,
|
|
4137
4151
|
column
|
|
4138
4152
|
} = params;
|
|
4153
|
+
const tableProps = $table;
|
|
4154
|
+
const {
|
|
4155
|
+
editConfig
|
|
4156
|
+
} = tableProps;
|
|
4139
4157
|
const {
|
|
4140
4158
|
slots,
|
|
4141
4159
|
editRender,
|
|
4142
4160
|
cellRender
|
|
4143
4161
|
} = column;
|
|
4144
|
-
const
|
|
4145
|
-
if (
|
|
4146
|
-
return renderTitleContent(h, params, $table.callSlot(
|
|
4162
|
+
const headerSlot = slots ? slots.header : null;
|
|
4163
|
+
if (headerSlot) {
|
|
4164
|
+
return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
|
|
4147
4165
|
}
|
|
4166
|
+
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
4167
|
+
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
4168
|
+
const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
|
|
4169
|
+
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
4148
4170
|
if (renderOpts) {
|
|
4149
4171
|
const compConf = cell_renderer.get(renderOpts.name);
|
|
4150
4172
|
const rtHeader = compConf ? compConf.renderTableHeader || compConf.renderHeader : null;
|
|
@@ -4181,7 +4203,9 @@ const Cell = {
|
|
|
4181
4203
|
aggFunc,
|
|
4182
4204
|
formatter
|
|
4183
4205
|
} = column;
|
|
4184
|
-
const
|
|
4206
|
+
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
4207
|
+
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
4208
|
+
const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
|
|
4185
4209
|
const defaultSlot = slots ? slots.default : null;
|
|
4186
4210
|
const gcSlot = slots ? slots.groupContent || slots['group-content'] : null;
|
|
4187
4211
|
const gvSlot = slots ? slots.groupValues || slots['group-values'] : null;
|
|
@@ -4274,26 +4298,25 @@ const Cell = {
|
|
|
4274
4298
|
if (defaultSlot) {
|
|
4275
4299
|
return renderCellBaseVNs(h, params, $table.callSlot(defaultSlot, params, h));
|
|
4276
4300
|
}
|
|
4301
|
+
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
4277
4302
|
// formatter > (renderTableCell | renderTableDefault)
|
|
4278
4303
|
if (renderOpts && !formatter) {
|
|
4279
4304
|
const compConf = cell_renderer.get(renderOpts.name);
|
|
4280
|
-
const
|
|
4281
|
-
const rtCell = compConf ? compConf.renderTableCell || compConf.renderCell : null;
|
|
4282
|
-
const renderFn = editRender ? rtCell : rtDefault;
|
|
4305
|
+
const renderFn = editRenderOpts ? compConf.renderTableCell || compConf.renderCell : compConf.renderTableDefault || compConf.renderDefault;
|
|
4283
4306
|
if (renderFn) {
|
|
4284
4307
|
return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({
|
|
4285
|
-
$type:
|
|
4308
|
+
$type: editRenderOpts ? 'edit' : 'cell'
|
|
4286
4309
|
}, params))));
|
|
4287
4310
|
}
|
|
4288
4311
|
}
|
|
4289
4312
|
cellValue = $table.getCellLabel(row, column);
|
|
4290
4313
|
}
|
|
4291
|
-
const cellPlaceholder =
|
|
4314
|
+
const cellPlaceholder = editRenderOpts ? editRenderOpts.placeholder : '';
|
|
4292
4315
|
return renderCellBaseVNs(h, params, [h('span', {
|
|
4293
4316
|
class: 'vxe-cell--label'
|
|
4294
4317
|
}, [
|
|
4295
4318
|
// 如果设置占位符
|
|
4296
|
-
|
|
4319
|
+
editRenderOpts && eqEmptyValue(cellValue) ? h('span', {
|
|
4297
4320
|
class: 'vxe-cell--placeholder'
|
|
4298
4321
|
}, formatText(getFuncText(cellPlaceholder), 1)) : h('span', formatText(cellValue, 1))])]);
|
|
4299
4322
|
},
|
|
@@ -5111,6 +5134,8 @@ const Cell = {
|
|
|
5111
5134
|
filters,
|
|
5112
5135
|
editRender
|
|
5113
5136
|
} = column;
|
|
5137
|
+
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
5138
|
+
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
5114
5139
|
let isRequired = false;
|
|
5115
5140
|
if (editRules) {
|
|
5116
5141
|
const columnRules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, column.field);
|
|
@@ -5119,7 +5144,7 @@ const Cell = {
|
|
|
5119
5144
|
}
|
|
5120
5145
|
}
|
|
5121
5146
|
let editIconVNs = [];
|
|
5122
|
-
if (
|
|
5147
|
+
if (isEnableEdit) {
|
|
5123
5148
|
const {
|
|
5124
5149
|
showAsterisk,
|
|
5125
5150
|
showIcon,
|
|
@@ -5129,7 +5154,7 @@ const Cell = {
|
|
|
5129
5154
|
class: 'vxe-cell--required-icon'
|
|
5130
5155
|
}, [h('i', {
|
|
5131
5156
|
class: 'vxe-cell--required-icon'
|
|
5132
|
-
})]) : renderEmptyElement($table),
|
|
5157
|
+
})]) : renderEmptyElement($table), editRenderOpts && showIcon ? h('i', {
|
|
5133
5158
|
class: 'vxe-cell--edit-icon'
|
|
5134
5159
|
}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(icon) ? getSlotVNs(icon({})) : [h('i', {
|
|
5135
5160
|
class: icon || cell_getIcon().TABLE_EDIT
|
|
@@ -5143,7 +5168,11 @@ const Cell = {
|
|
|
5143
5168
|
$table,
|
|
5144
5169
|
column
|
|
5145
5170
|
} = params;
|
|
5171
|
+
const tableProps = $table;
|
|
5146
5172
|
const tableReactData = $table;
|
|
5173
|
+
const {
|
|
5174
|
+
editConfig
|
|
5175
|
+
} = tableProps;
|
|
5147
5176
|
const {
|
|
5148
5177
|
editStore
|
|
5149
5178
|
} = tableReactData;
|
|
@@ -5153,7 +5182,9 @@ const Cell = {
|
|
|
5153
5182
|
const {
|
|
5154
5183
|
editRender
|
|
5155
5184
|
} = column;
|
|
5156
|
-
|
|
5185
|
+
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
5186
|
+
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
5187
|
+
return Cell.runRenderer(h, params, !!(editRenderOpts && actived && actived.row === params.row));
|
|
5157
5188
|
},
|
|
5158
5189
|
renderDeepRowEdit(h, params) {
|
|
5159
5190
|
return Cell.renderDeepNodeBtn(h, params, Cell.renderRowEdit(h, params));
|
|
@@ -5164,7 +5195,11 @@ const Cell = {
|
|
|
5164
5195
|
$table,
|
|
5165
5196
|
column
|
|
5166
5197
|
} = params;
|
|
5198
|
+
const tableProps = $table;
|
|
5167
5199
|
const tableReactData = $table;
|
|
5200
|
+
const {
|
|
5201
|
+
editConfig
|
|
5202
|
+
} = tableProps;
|
|
5168
5203
|
const {
|
|
5169
5204
|
editStore
|
|
5170
5205
|
} = tableReactData;
|
|
@@ -5174,7 +5209,9 @@ const Cell = {
|
|
|
5174
5209
|
const {
|
|
5175
5210
|
editRender
|
|
5176
5211
|
} = column;
|
|
5177
|
-
|
|
5212
|
+
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
5213
|
+
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
5214
|
+
return Cell.runRenderer(h, params, !!(editRenderOpts && actived && actived.row === params.row && actived.column === params.column));
|
|
5178
5215
|
},
|
|
5179
5216
|
renderDeepCellEdit(h, params) {
|
|
5180
5217
|
return Cell.renderDeepNodeBtn(h, params, Cell.renderCellEdit(h, params));
|
|
@@ -5185,7 +5222,11 @@ const Cell = {
|
|
|
5185
5222
|
row,
|
|
5186
5223
|
column
|
|
5187
5224
|
} = params;
|
|
5225
|
+
const tableProps = $table;
|
|
5188
5226
|
const tableReactData = $table;
|
|
5227
|
+
const {
|
|
5228
|
+
editConfig
|
|
5229
|
+
} = tableProps;
|
|
5189
5230
|
const {
|
|
5190
5231
|
isRowGroupStatus
|
|
5191
5232
|
} = tableReactData;
|
|
@@ -5195,18 +5236,20 @@ const Cell = {
|
|
|
5195
5236
|
editRender,
|
|
5196
5237
|
formatter
|
|
5197
5238
|
} = column;
|
|
5198
|
-
const
|
|
5199
|
-
const
|
|
5239
|
+
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
5240
|
+
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
5200
5241
|
const defaultSlot = slots ? slots.default : null;
|
|
5201
5242
|
const gcSlot = slots ? slots.groupContent || slots['group-content'] : null;
|
|
5202
5243
|
const cellParams = Object.assign({
|
|
5203
5244
|
$type: '',
|
|
5204
5245
|
isEdit
|
|
5205
5246
|
}, params);
|
|
5206
|
-
if (isEdit) {
|
|
5247
|
+
if (isEdit && editRenderOpts) {
|
|
5207
5248
|
if (slots && slots.edit) {
|
|
5208
5249
|
return $table.callSlot(slots.edit, cellParams, h);
|
|
5209
5250
|
}
|
|
5251
|
+
const compConf = cell_renderer.get(editRender.name);
|
|
5252
|
+
const rtEdit = compConf ? compConf.renderTableEdit || compConf.renderEdit : null;
|
|
5210
5253
|
if (rtEdit) {
|
|
5211
5254
|
return getSlotVNs(rtEdit.call($table, h, editRender, cellParams));
|
|
5212
5255
|
}
|
|
@@ -5832,6 +5875,8 @@ const tableProps = {
|
|
|
5832
5875
|
virtualYConfig: Object,
|
|
5833
5876
|
// 滚动条配置项
|
|
5834
5877
|
scrollbarConfig: Object,
|
|
5878
|
+
// 可撤销配置项
|
|
5879
|
+
undoHistoryConfig: Object,
|
|
5835
5880
|
// (即将废弃)优化相关
|
|
5836
5881
|
animat: {
|
|
5837
5882
|
type: Boolean,
|
|
@@ -6311,7 +6356,7 @@ if(!rowRest){return false;}const row=rowRest.row;const oRow=sourceDataRowIdData[
|
|
|
6311
6356
|
* 如果存在排序,继续处理
|
|
6312
6357
|
*/getTableData(){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{tableData,footerTableData}=reactData;const{tableFullData,afterFullData,tableFullTreeData}=internalData;return{fullData:props.treeConfig?tableFullTreeData.slice(0):tableFullData.slice(0),visibleData:afterFullData.slice(0),tableData:tableData.slice(0),footerData:footerTableData.slice(0)};},/**
|
|
6313
6358
|
* 获取表格的全量数据,如果是 tree-config 则返回带层级的树结构
|
|
6314
|
-
*/getFullData(){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const{tableFullData,tableFullTreeData}=internalData;if(treeConfig){
|
|
6359
|
+
*/getFullData(){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const{tableFullData,tableFullTreeData}=internalData;if(treeConfig){return tableFullTreeData.slice(0);}return tableFullData.slice(0);},/**
|
|
6315
6360
|
* 处理数据加载默认行为
|
|
6316
6361
|
* 默认执行一次,除非被重置
|
|
6317
6362
|
*/handleLoadDefaults(){const $xeTable=this;handleLoadDefaults($xeTable);},/**
|
|
@@ -12450,7 +12495,7 @@ function insertTreeRow($xeTable, newRecords, isAppend) {
|
|
|
12450
12495
|
}
|
|
12451
12496
|
// function insertGroupRow ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, newRecords: any[], isAppend: boolean) {
|
|
12452
12497
|
// }
|
|
12453
|
-
function handleInsertRowAt($xeTable, records,
|
|
12498
|
+
function handleInsertRowAt($xeTable, records, targetRowOrRowid, isInsertNextRow) {
|
|
12454
12499
|
const props = $xeTable;
|
|
12455
12500
|
const reactData = $xeTable;
|
|
12456
12501
|
const internalData = $xeTable;
|
|
@@ -12481,6 +12526,13 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
12481
12526
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(records)) {
|
|
12482
12527
|
records = [records];
|
|
12483
12528
|
}
|
|
12529
|
+
let targetRow = targetRowOrRowid;
|
|
12530
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(targetRowOrRowid) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(targetRowOrRowid)) {
|
|
12531
|
+
const rowRest = fullAllDataRowIdData[targetRowOrRowid];
|
|
12532
|
+
if (rowRest) {
|
|
12533
|
+
targetRow = rowRest.row;
|
|
12534
|
+
}
|
|
12535
|
+
}
|
|
12484
12536
|
const newRecords = $xeTable.defineField(records.map(record => Object.assign(treeConfig && transform ? {
|
|
12485
12537
|
[mapChildrenField]: [],
|
|
12486
12538
|
[childrenField]: []
|
|
@@ -12747,11 +12799,15 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
12747
12799
|
};
|
|
12748
12800
|
});
|
|
12749
12801
|
}
|
|
12750
|
-
function handleInsertChildRowAt($xeTable, records,
|
|
12802
|
+
function handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid, isInsertNextRow) {
|
|
12751
12803
|
const props = $xeTable;
|
|
12804
|
+
const internalData = $xeTable;
|
|
12752
12805
|
const {
|
|
12753
12806
|
treeConfig
|
|
12754
12807
|
} = props;
|
|
12808
|
+
const {
|
|
12809
|
+
fullAllDataRowIdData
|
|
12810
|
+
} = internalData;
|
|
12755
12811
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
12756
12812
|
const {
|
|
12757
12813
|
transform,
|
|
@@ -12762,9 +12818,16 @@ function handleInsertChildRowAt($xeTable, records, parentRow, targetRow, isInser
|
|
|
12762
12818
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(records)) {
|
|
12763
12819
|
records = [records];
|
|
12764
12820
|
}
|
|
12821
|
+
let parentRow = parentRowOrParentId;
|
|
12822
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(parentRowOrParentId) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(parentRowOrParentId)) {
|
|
12823
|
+
const rowRest = fullAllDataRowIdData[parentRowOrParentId];
|
|
12824
|
+
if (rowRest) {
|
|
12825
|
+
parentRow = rowRest.row;
|
|
12826
|
+
}
|
|
12827
|
+
}
|
|
12765
12828
|
return handleInsertRowAt($xeTable, records.map(item => Object.assign({}, item, {
|
|
12766
12829
|
[parentField]: parentRow[rowField]
|
|
12767
|
-
})),
|
|
12830
|
+
})), targetRowOrRowid, isInsertNextRow);
|
|
12768
12831
|
} else {
|
|
12769
12832
|
errLog('vxe.error.errProp', ['tree-config.transform=false', 'tree-config.transform=true']);
|
|
12770
12833
|
}
|
|
@@ -12990,24 +13053,22 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
|
|
|
12990
13053
|
* 如果 row 为空则从插入到顶部
|
|
12991
13054
|
* 如果 row 为 -1 则从插入到底部
|
|
12992
13055
|
* 如果 row 为有效行则插入到该行的位置
|
|
12993
|
-
* @param {Object/Array} records 新的数据
|
|
12994
|
-
* @param {Row} targetRow 指定行
|
|
12995
13056
|
* @returns
|
|
12996
13057
|
*/
|
|
12997
|
-
_insertAt(records,
|
|
12998
|
-
return handleInsertRowAt(this, records,
|
|
13058
|
+
_insertAt(records, targetRowOrRowid) {
|
|
13059
|
+
return handleInsertRowAt(this, records, targetRowOrRowid);
|
|
12999
13060
|
},
|
|
13000
|
-
_insertNextAt(records,
|
|
13001
|
-
return handleInsertRowAt(this, records,
|
|
13061
|
+
_insertNextAt(records, targetRowOrRowid) {
|
|
13062
|
+
return handleInsertRowAt(this, records, targetRowOrRowid, true);
|
|
13002
13063
|
},
|
|
13003
|
-
_insertChild(records,
|
|
13004
|
-
return handleInsertChildRowAt(this, records,
|
|
13064
|
+
_insertChild(records, parentRowOrParentId) {
|
|
13065
|
+
return handleInsertChildRowAt(this, records, parentRowOrParentId, null);
|
|
13005
13066
|
},
|
|
13006
|
-
_insertChildAt(records,
|
|
13007
|
-
return handleInsertChildRowAt(this, records,
|
|
13067
|
+
_insertChildAt(records, parentRowOrParentId, targetRowOrRowid) {
|
|
13068
|
+
return handleInsertChildRowAt(this, records, parentRowOrParentId, targetRowOrRowid);
|
|
13008
13069
|
},
|
|
13009
|
-
_insertChildNextAt(records,
|
|
13010
|
-
return handleInsertChildRowAt(this, records,
|
|
13070
|
+
_insertChildNextAt(records, parentRowOrParentId, targetRowOrRowid) {
|
|
13071
|
+
return handleInsertChildRowAt(this, records, parentRowOrParentId, targetRowOrRowid, true);
|
|
13011
13072
|
},
|
|
13012
13073
|
/**
|
|
13013
13074
|
* 删除指定行数据
|
|
@@ -18796,6 +18857,11 @@ function renderBody(h, $xeTable) {
|
|
|
18796
18857
|
}
|
|
18797
18858
|
return [];
|
|
18798
18859
|
},
|
|
18860
|
+
computeUndoHistoryOpts() {
|
|
18861
|
+
const $xeTable = this;
|
|
18862
|
+
const props = $xeTable;
|
|
18863
|
+
return Object.assign({}, table_getConfig().table.undoHistoryConfig, props.undoHistoryConfig);
|
|
18864
|
+
},
|
|
18799
18865
|
tabsResizeFlag() {
|
|
18800
18866
|
const $xeTable = this;
|
|
18801
18867
|
const $xeTabs = $xeTable.$xeTabs;
|