vxe-table 4.19.8 → 4.19.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.esm.js +219 -28
- package/dist/style.css +1 -1
- package/es/grid/src/grid.js +1 -1
- package/es/locale/lang/ar-EG.js +9 -9
- package/es/locale/lang/de-DE.js +8 -8
- package/es/locale/lang/en-US.js +8 -8
- package/es/locale/lang/es-ES.js +10 -10
- package/es/locale/lang/fr-FR.js +10 -10
- package/es/locale/lang/hu-HU.js +9 -9
- package/es/locale/lang/hy-AM.js +1 -1
- package/es/locale/lang/id-ID.js +10 -10
- package/es/locale/lang/it-IT.js +10 -10
- package/es/locale/lang/ja-JP.js +10 -10
- package/es/locale/lang/ko-KR.js +9 -9
- package/es/locale/lang/ms-MY.js +10 -10
- package/es/locale/lang/nb-NO.js +9 -9
- package/es/locale/lang/pt-BR.js +10 -10
- package/es/locale/lang/ru-RU.js +10 -10
- package/es/locale/lang/th-TH.js +9 -9
- package/es/locale/lang/ug-CN.js +9 -9
- package/es/locale/lang/uk-UA.js +10 -10
- package/es/locale/lang/uz-UZ.js +10 -10
- package/es/locale/lang/vi-VN.js +10 -10
- package/es/style.css +1 -1
- package/es/table/render/index.js +153 -14
- package/es/table/src/body.js +11 -11
- package/es/table/src/table.js +51 -0
- package/es/table/src/util.js +1 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +1 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +279 -31
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +9 -9
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +9 -9
- package/lib/locale/lang/de-DE.js +8 -8
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +8 -8
- package/lib/locale/lang/en-US.js +8 -8
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +8 -8
- package/lib/locale/lang/es-ES.js +10 -10
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +10 -10
- package/lib/locale/lang/fr-FR.js +10 -10
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +10 -10
- package/lib/locale/lang/hu-HU.js +9 -9
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +9 -9
- package/lib/locale/lang/hy-AM.js +1 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +1 -1
- package/lib/locale/lang/id-ID.js +10 -10
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +10 -10
- package/lib/locale/lang/it-IT.js +10 -10
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +10 -10
- package/lib/locale/lang/ja-JP.js +10 -10
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +10 -10
- package/lib/locale/lang/ko-KR.js +9 -9
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +9 -9
- package/lib/locale/lang/ms-MY.js +10 -10
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +10 -10
- package/lib/locale/lang/nb-NO.js +9 -9
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +9 -9
- package/lib/locale/lang/pt-BR.js +10 -10
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +10 -10
- package/lib/locale/lang/ru-RU.js +10 -10
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +10 -10
- package/lib/locale/lang/th-TH.js +9 -9
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +9 -9
- package/lib/locale/lang/ug-CN.js +9 -9
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +9 -9
- package/lib/locale/lang/uk-UA.js +10 -10
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +10 -10
- package/lib/locale/lang/uz-UZ.js +10 -10
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +10 -10
- package/lib/locale/lang/vi-VN.js +10 -10
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +10 -10
- package/lib/style.css +1 -1
- package/lib/table/render/index.js +259 -15
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +11 -11
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/table.js +2 -2
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -0
- package/lib/table/src/util.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 +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +1 -1
- package/packages/locale/lang/ar-EG.ts +9 -9
- package/packages/locale/lang/de-DE.ts +8 -8
- package/packages/locale/lang/en-US.ts +8 -8
- package/packages/locale/lang/es-ES.ts +10 -10
- package/packages/locale/lang/fr-FR.ts +10 -10
- package/packages/locale/lang/hu-HU.ts +9 -9
- package/packages/locale/lang/hy-AM.ts +1 -1
- package/packages/locale/lang/id-ID.ts +10 -10
- package/packages/locale/lang/it-IT.ts +10 -10
- package/packages/locale/lang/ja-JP.ts +10 -10
- package/packages/locale/lang/ko-KR.ts +9 -9
- package/packages/locale/lang/ms-MY.ts +10 -10
- package/packages/locale/lang/nb-NO.ts +9 -9
- package/packages/locale/lang/pt-BR.ts +10 -10
- package/packages/locale/lang/ru-RU.ts +10 -10
- package/packages/locale/lang/th-TH.ts +9 -9
- package/packages/locale/lang/ug-CN.ts +9 -9
- package/packages/locale/lang/uk-UA.ts +10 -10
- package/packages/locale/lang/uz-UZ.ts +10 -10
- package/packages/locale/lang/vi-VN.ts +10 -10
- package/packages/table/render/index.ts +156 -15
- package/packages/table/src/body.ts +13 -13
- package/packages/table/src/table.ts +53 -0
- package/packages/table/src/util.ts +2 -0
- /package/es/{iconfont.1780726776354.ttf → iconfont.1780911752570.ttf} +0 -0
- /package/es/{iconfont.1780726776354.woff → iconfont.1780911752570.woff} +0 -0
- /package/es/{iconfont.1780726776354.woff2 → iconfont.1780911752570.woff2} +0 -0
- /package/lib/{iconfont.1780726776354.ttf → iconfont.1780911752570.ttf} +0 -0
- /package/lib/{iconfont.1780726776354.woff → iconfont.1780911752570.woff} +0 -0
- /package/lib/{iconfont.1780726776354.woff2 → iconfont.1780911752570.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -44,7 +44,7 @@ function eqEmptyValue(cellValue) {
|
|
|
44
44
|
return cellValue === '' || XEUtils.eqNull(cellValue);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
const version$1 = "4.19.
|
|
47
|
+
const version$1 = "4.19.10";
|
|
48
48
|
VxeUI.version = version$1;
|
|
49
49
|
VxeUI.tableVersion = version$1;
|
|
50
50
|
VxeUI.setConfig({
|
|
@@ -556,7 +556,7 @@ const modal = {
|
|
|
556
556
|
const defineVxeComponent = defineComponent;
|
|
557
557
|
|
|
558
558
|
const { log } = VxeUI;
|
|
559
|
-
const version = `table v${"4.19.
|
|
559
|
+
const version = `table v${"4.19.10"}`;
|
|
560
560
|
const warnLog = log.create('warn', version);
|
|
561
561
|
const errLog = log.create('error', version);
|
|
562
562
|
|
|
@@ -1020,6 +1020,7 @@ function createInternalData$3() {
|
|
|
1020
1020
|
fullColumnIdData: {},
|
|
1021
1021
|
fullColumnFieldData: {},
|
|
1022
1022
|
fullCellHeightMaps: {},
|
|
1023
|
+
fullCellStoreMaps: {},
|
|
1023
1024
|
// 当前行
|
|
1024
1025
|
currentRow: null,
|
|
1025
1026
|
// 合并表头单元格的数据
|
|
@@ -4306,11 +4307,21 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4306
4307
|
class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
|
|
4307
4308
|
}, column.renderCell(cellParams)));
|
|
4308
4309
|
}
|
|
4310
|
+
tdVNs.push(h('div', {
|
|
4311
|
+
key: 'tc',
|
|
4312
|
+
class: ['vxe-cell', {
|
|
4313
|
+
'c--title': showTitle,
|
|
4314
|
+
'c--tooltip': showTooltip,
|
|
4315
|
+
'c--ellipsis': showEllipsis
|
|
4316
|
+
}],
|
|
4317
|
+
style: tcStyle,
|
|
4318
|
+
title: showTitle ? $xeTable.getCellLabel(row, column) : null
|
|
4319
|
+
}, clVNs));
|
|
4309
4320
|
if (showValidTip && errorValidItem) {
|
|
4310
4321
|
const errRule = errorValidItem.rule;
|
|
4311
4322
|
const validSlot = slots ? slots.valid : null;
|
|
4312
4323
|
const validParams = Object.assign(Object.assign(Object.assign({}, cellParams), errorValidItem), { rule: errorValidItem });
|
|
4313
|
-
|
|
4324
|
+
tdVNs.push(h('div', {
|
|
4314
4325
|
key: 'tcv',
|
|
4315
4326
|
class: ['vxe-cell--valid-error-tip', getPropClass(validOpts.className, validParams)],
|
|
4316
4327
|
style: errRule && errRule.maxWidth
|
|
@@ -4332,16 +4343,6 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4332
4343
|
])
|
|
4333
4344
|
]));
|
|
4334
4345
|
}
|
|
4335
|
-
tdVNs.push(h('div', {
|
|
4336
|
-
key: 'tc',
|
|
4337
|
-
class: ['vxe-cell', {
|
|
4338
|
-
'c--title': showTitle,
|
|
4339
|
-
'c--tooltip': showTooltip,
|
|
4340
|
-
'c--ellipsis': showEllipsis
|
|
4341
|
-
}],
|
|
4342
|
-
style: tcStyle,
|
|
4343
|
-
title: showTitle ? $xeTable.getCellLabel(row, column) : null
|
|
4344
|
-
}, clVNs));
|
|
4345
4346
|
}
|
|
4346
4347
|
let showAreaRowStatus = false;
|
|
4347
4348
|
if (mouseConfig && mouseOpts.area && !_columnIndex && selectCellToRow) {
|
|
@@ -14229,7 +14230,24 @@ renderer$2.mixin({
|
|
|
14229
14230
|
renderTableEdit: nativeSelectEditRender,
|
|
14230
14231
|
renderTableDefault: nativeSelectEditRender,
|
|
14231
14232
|
renderTableCell(renderOpts, params) {
|
|
14232
|
-
|
|
14233
|
+
const { options, optionGroups } = renderOpts;
|
|
14234
|
+
const { $table, row, column } = params;
|
|
14235
|
+
const opSize = options ? options.length : null;
|
|
14236
|
+
const ogSize = optionGroups ? optionGroups.length : null;
|
|
14237
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
14238
|
+
key: 'render_table_cell',
|
|
14239
|
+
isChanged({ oldValue, cellValue }) {
|
|
14240
|
+
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
14241
|
+
},
|
|
14242
|
+
setValue({ cellValue }) {
|
|
14243
|
+
return [cellValue, opSize, ogSize];
|
|
14244
|
+
},
|
|
14245
|
+
getResult({ cellValue }) {
|
|
14246
|
+
return handleSelectCellValue(cellValue, renderOpts);
|
|
14247
|
+
}
|
|
14248
|
+
});
|
|
14249
|
+
// const cellResult = getSelectCellValue(renderOpts, params)
|
|
14250
|
+
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
14233
14251
|
},
|
|
14234
14252
|
createTableFilterOptions: defaultFilterOptions,
|
|
14235
14253
|
renderTableFilter(renderOpts, params) {
|
|
@@ -14340,15 +14358,20 @@ renderer$2.mixin({
|
|
|
14340
14358
|
tableAutoFocus: 'input',
|
|
14341
14359
|
renderTableEdit: defaultEditRender,
|
|
14342
14360
|
renderTableCell(renderOpts, params) {
|
|
14343
|
-
const
|
|
14344
|
-
const { row, column } = params;
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
14348
|
-
|
|
14361
|
+
const props = renderOpts.props || {};
|
|
14362
|
+
const { $table, row, column } = params;
|
|
14363
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
14364
|
+
key: 'render_table_cell',
|
|
14365
|
+
getResult({ cellValue }) {
|
|
14366
|
+
if (cellValue) {
|
|
14367
|
+
if (props.type !== 'time') {
|
|
14368
|
+
return getLabelFormatDate(cellValue, props);
|
|
14369
|
+
}
|
|
14370
|
+
}
|
|
14371
|
+
return cellValue;
|
|
14349
14372
|
}
|
|
14350
|
-
}
|
|
14351
|
-
return getCellLabelVNs(renderOpts, params,
|
|
14373
|
+
});
|
|
14374
|
+
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
14352
14375
|
},
|
|
14353
14376
|
tableCellFormatter: handleFormatDatePicker,
|
|
14354
14377
|
renderTableDefault: defaultEditRender,
|
|
@@ -14396,6 +14419,37 @@ renderer$2.mixin({
|
|
|
14396
14419
|
}, seOs)))
|
|
14397
14420
|
];
|
|
14398
14421
|
},
|
|
14422
|
+
renderTableDefault(renderOpts, params) {
|
|
14423
|
+
const { startField, endField } = renderOpts;
|
|
14424
|
+
const { row, column } = params;
|
|
14425
|
+
const { model } = column;
|
|
14426
|
+
const cellValue = getCellValue(row, column);
|
|
14427
|
+
const seProps = {};
|
|
14428
|
+
const seOs = {};
|
|
14429
|
+
if (startField && endField) {
|
|
14430
|
+
seProps.startValue = XEUtils.get(row, startField);
|
|
14431
|
+
seProps.endValue = XEUtils.get(row, endField);
|
|
14432
|
+
seOs['onUpdate:startValue'] = (value) => {
|
|
14433
|
+
if (startField) {
|
|
14434
|
+
XEUtils.set(row, startField, value);
|
|
14435
|
+
}
|
|
14436
|
+
};
|
|
14437
|
+
seOs['onUpdate:endValue'] = (value) => {
|
|
14438
|
+
if (endField) {
|
|
14439
|
+
XEUtils.set(row, endField, value);
|
|
14440
|
+
}
|
|
14441
|
+
};
|
|
14442
|
+
}
|
|
14443
|
+
return [
|
|
14444
|
+
h(getDefaultComponent(renderOpts), Object.assign(Object.assign({}, getCellEditProps(renderOpts, params, cellValue, seProps)), getComponentOns(renderOpts, params, {
|
|
14445
|
+
model(cellValue) {
|
|
14446
|
+
model.update = true;
|
|
14447
|
+
model.value = cellValue;
|
|
14448
|
+
setCellValue(row, column, cellValue);
|
|
14449
|
+
}
|
|
14450
|
+
}, seOs)))
|
|
14451
|
+
];
|
|
14452
|
+
},
|
|
14399
14453
|
renderTableCell(renderOpts, params) {
|
|
14400
14454
|
const { startField, endField } = renderOpts;
|
|
14401
14455
|
const { row, column } = params;
|
|
@@ -14428,6 +14482,7 @@ renderer$2.mixin({
|
|
|
14428
14482
|
},
|
|
14429
14483
|
VxeTextarea: {
|
|
14430
14484
|
tableAutoFocus: 'textarea',
|
|
14485
|
+
renderTableDefault: defaultEditRender,
|
|
14431
14486
|
renderTableEdit: defaultEditRender,
|
|
14432
14487
|
renderTableCell(renderOpts, params) {
|
|
14433
14488
|
const { row, column } = params;
|
|
@@ -14451,7 +14506,24 @@ renderer$2.mixin({
|
|
|
14451
14506
|
renderTableEdit: defaultSelectEditRender,
|
|
14452
14507
|
renderTableDefault: defaultSelectEditRender,
|
|
14453
14508
|
renderTableCell(renderOpts, params) {
|
|
14454
|
-
|
|
14509
|
+
const { options, optionGroups } = renderOpts;
|
|
14510
|
+
const { $table, row, column } = params;
|
|
14511
|
+
const opSize = options ? options.length : null;
|
|
14512
|
+
const ogSize = optionGroups ? optionGroups.length : null;
|
|
14513
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
14514
|
+
key: 'render_table_cell',
|
|
14515
|
+
isChanged({ oldValue, cellValue }) {
|
|
14516
|
+
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
14517
|
+
},
|
|
14518
|
+
setValue({ cellValue }) {
|
|
14519
|
+
return [cellValue, opSize, ogSize];
|
|
14520
|
+
},
|
|
14521
|
+
getResult({ cellValue }) {
|
|
14522
|
+
return handleSelectCellValue(cellValue, renderOpts);
|
|
14523
|
+
}
|
|
14524
|
+
});
|
|
14525
|
+
// const cellResult = getSelectCellValue(renderOpts, params)
|
|
14526
|
+
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
14455
14527
|
},
|
|
14456
14528
|
createTableFilterOptions: defaultFilterOptions,
|
|
14457
14529
|
renderTableFilter(renderOpts, params) {
|
|
@@ -14506,7 +14578,24 @@ renderer$2.mixin({
|
|
|
14506
14578
|
},
|
|
14507
14579
|
FormatSelect: {
|
|
14508
14580
|
renderTableDefault(renderOpts, params) {
|
|
14509
|
-
|
|
14581
|
+
const { options, optionGroups } = renderOpts;
|
|
14582
|
+
const { $table, row, column } = params;
|
|
14583
|
+
const opSize = options ? options.length : null;
|
|
14584
|
+
const ogSize = optionGroups ? optionGroups.length : null;
|
|
14585
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
14586
|
+
key: 'render_table_cell',
|
|
14587
|
+
isChanged({ oldValue, cellValue }) {
|
|
14588
|
+
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
14589
|
+
},
|
|
14590
|
+
setValue({ cellValue }) {
|
|
14591
|
+
return [cellValue, opSize, ogSize];
|
|
14592
|
+
},
|
|
14593
|
+
getResult({ cellValue }) {
|
|
14594
|
+
return handleSelectCellValue(cellValue, renderOpts);
|
|
14595
|
+
}
|
|
14596
|
+
});
|
|
14597
|
+
// const cellResult = getSelectCellValue(renderOpts, params)
|
|
14598
|
+
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
14510
14599
|
},
|
|
14511
14600
|
tableCellFormatter: handleFormatSelect,
|
|
14512
14601
|
tableCellCopyMethod: handleFormatSelect,
|
|
@@ -14518,7 +14607,24 @@ renderer$2.mixin({
|
|
|
14518
14607
|
tableAutoFocus: 'input',
|
|
14519
14608
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
|
14520
14609
|
renderTableCell(renderOpts, params) {
|
|
14521
|
-
|
|
14610
|
+
const { options, optionGroups } = renderOpts;
|
|
14611
|
+
const { $table, row, column } = params;
|
|
14612
|
+
const opSize = options ? options.length : null;
|
|
14613
|
+
const ogSize = optionGroups ? optionGroups.length : null;
|
|
14614
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
14615
|
+
key: 'render_table_cell',
|
|
14616
|
+
isChanged({ oldValue, cellValue }) {
|
|
14617
|
+
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
14618
|
+
},
|
|
14619
|
+
setValue({ cellValue }) {
|
|
14620
|
+
return [cellValue, opSize, ogSize];
|
|
14621
|
+
},
|
|
14622
|
+
getResult({ cellValue }) {
|
|
14623
|
+
return handleTreeSelectCellValue(cellValue, renderOpts);
|
|
14624
|
+
}
|
|
14625
|
+
});
|
|
14626
|
+
// const cellResult = getTreeSelectCellValue(renderOpts, params)
|
|
14627
|
+
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
14522
14628
|
},
|
|
14523
14629
|
tableCellFormatter: handleFormatTreeSelect,
|
|
14524
14630
|
tableCellCopyMethod: handleFormatTreeSelect,
|
|
@@ -14536,7 +14642,24 @@ renderer$2.mixin({
|
|
|
14536
14642
|
},
|
|
14537
14643
|
FormatTreeSelect: {
|
|
14538
14644
|
renderTableDefault(renderOpts, params) {
|
|
14539
|
-
|
|
14645
|
+
const { options, optionGroups } = renderOpts;
|
|
14646
|
+
const { $table, row, column } = params;
|
|
14647
|
+
const opSize = options ? options.length : null;
|
|
14648
|
+
const ogSize = optionGroups ? optionGroups.length : null;
|
|
14649
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
14650
|
+
key: 'render_table_cell',
|
|
14651
|
+
isChanged({ oldValue, cellValue }) {
|
|
14652
|
+
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
14653
|
+
},
|
|
14654
|
+
setValue({ cellValue }) {
|
|
14655
|
+
return [cellValue, opSize, ogSize];
|
|
14656
|
+
},
|
|
14657
|
+
getResult({ cellValue }) {
|
|
14658
|
+
return handleTreeSelectCellValue(cellValue, renderOpts);
|
|
14659
|
+
}
|
|
14660
|
+
});
|
|
14661
|
+
// const cellResult = getTreeSelectCellValue(renderOpts, params)
|
|
14662
|
+
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
14540
14663
|
},
|
|
14541
14664
|
tableCellFormatter: handleFormatTreeSelect,
|
|
14542
14665
|
tableCellCopyMethod: handleFormatTreeSelect,
|
|
@@ -14547,7 +14670,24 @@ renderer$2.mixin({
|
|
|
14547
14670
|
tableAutoFocus: 'input',
|
|
14548
14671
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
|
14549
14672
|
renderTableCell(renderOpts, params) {
|
|
14550
|
-
|
|
14673
|
+
const { options, optionGroups } = renderOpts;
|
|
14674
|
+
const { $table, row, column } = params;
|
|
14675
|
+
const opSize = options ? options.length : null;
|
|
14676
|
+
const ogSize = optionGroups ? optionGroups.length : null;
|
|
14677
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
14678
|
+
key: 'render_table_cell',
|
|
14679
|
+
isChanged({ oldValue, cellValue }) {
|
|
14680
|
+
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
14681
|
+
},
|
|
14682
|
+
setValue({ cellValue }) {
|
|
14683
|
+
return [cellValue, opSize, ogSize];
|
|
14684
|
+
},
|
|
14685
|
+
getResult({ cellValue }) {
|
|
14686
|
+
return handleTreeSelectCellValue(cellValue, renderOpts);
|
|
14687
|
+
}
|
|
14688
|
+
});
|
|
14689
|
+
// const cellResult = getTreeSelectCellValue(renderOpts, params)
|
|
14690
|
+
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
14551
14691
|
},
|
|
14552
14692
|
tableCellFormatter: handleFormatTreeSelect,
|
|
14553
14693
|
tableCellCopyMethod: handleFormatTreeSelect,
|
|
@@ -18421,6 +18561,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
18421
18561
|
internalData.removeRowMaps = {};
|
|
18422
18562
|
reactData.removeRowFlag++;
|
|
18423
18563
|
internalData.fullCellHeightMaps = {};
|
|
18564
|
+
internalData.fullCellStoreMaps = {};
|
|
18424
18565
|
const sYLoad = updateScrollYStatus(fullData);
|
|
18425
18566
|
// 全量数据
|
|
18426
18567
|
internalData.tableFullData = fullData;
|
|
@@ -19913,6 +20054,56 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
19913
20054
|
}
|
|
19914
20055
|
return nextTick();
|
|
19915
20056
|
},
|
|
20057
|
+
effectCellData(row, column, options) {
|
|
20058
|
+
const { fullCellStoreMaps } = internalData;
|
|
20059
|
+
const editOpts = computeEditOpts.value;
|
|
20060
|
+
const { key, isChanged, setValue, getResult } = options;
|
|
20061
|
+
const rowid = getRowid($xeTable, row);
|
|
20062
|
+
const colid = column.id;
|
|
20063
|
+
let rowStore = fullCellStoreMaps[rowid];
|
|
20064
|
+
const cellValue = XEUtils.get(row, column.field);
|
|
20065
|
+
const restParams = {
|
|
20066
|
+
$table: $xeTable,
|
|
20067
|
+
row,
|
|
20068
|
+
rowid,
|
|
20069
|
+
column,
|
|
20070
|
+
colid,
|
|
20071
|
+
cellValue,
|
|
20072
|
+
oldValue: null
|
|
20073
|
+
};
|
|
20074
|
+
if (editOpts.cache === false && key === 'render_table_cell') {
|
|
20075
|
+
const rest = restParams;
|
|
20076
|
+
rest.cellResult = getResult ? getResult(restParams) : cellValue;
|
|
20077
|
+
return rest;
|
|
20078
|
+
}
|
|
20079
|
+
if (!rowStore) {
|
|
20080
|
+
rowStore = {};
|
|
20081
|
+
fullCellStoreMaps[rowid] = rowStore;
|
|
20082
|
+
}
|
|
20083
|
+
let cellStore = rowStore[colid];
|
|
20084
|
+
if (!cellStore) {
|
|
20085
|
+
cellStore = {
|
|
20086
|
+
value: undefined,
|
|
20087
|
+
result: {}
|
|
20088
|
+
};
|
|
20089
|
+
rowStore[colid] = cellStore;
|
|
20090
|
+
}
|
|
20091
|
+
const restData = rowStore[colid];
|
|
20092
|
+
const oldValue = restData.value;
|
|
20093
|
+
restParams.oldValue = oldValue;
|
|
20094
|
+
if (isChanged ? !isChanged(restParams) : oldValue !== cellValue) {
|
|
20095
|
+
restData.value = setValue ? setValue(restParams) : cellValue;
|
|
20096
|
+
restData.result = {};
|
|
20097
|
+
}
|
|
20098
|
+
const storeData = restData.result;
|
|
20099
|
+
if (XEUtils.isUndefined(storeData[key])) {
|
|
20100
|
+
storeData[key] = getResult ? getResult(restParams) : cellValue;
|
|
20101
|
+
}
|
|
20102
|
+
const cellResult = storeData[key];
|
|
20103
|
+
const rest = restParams;
|
|
20104
|
+
rest.cellResult = cellResult;
|
|
20105
|
+
return rest;
|
|
20106
|
+
},
|
|
19916
20107
|
getCellElement(row, fieldOrColumn) {
|
|
19917
20108
|
const { elemStore } = internalData;
|
|
19918
20109
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
@@ -29646,7 +29837,7 @@ var VxeToolbarComponent = defineVxeComponent({
|
|
|
29646
29837
|
|
|
29647
29838
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI;
|
|
29648
29839
|
const tableComponentPropKeys = Object.keys(tableProps);
|
|
29649
|
-
const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeRowLevel', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'recalcRowHeight', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'setFilterByEvent', 'sort', 'setSort', 'setSortByEvent', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'getScrollData', 'scrollTo', 'scrollToStartRow', 'scrollToEndRow', 'scrollToRow', 'scrollToStartColumn', 'scrollToEndColumn', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'setMergeHeaderCells', 'removeMergeHeaderCells', 'getMergeHeaderCells', 'clearMergeHeaderCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'setCustomStoreData', 'getCustomStoreData', 'setRowGroupExpand', 'setRowGroupExpandByField', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'isAggregateRecord', 'isAggregateExpandByRow', 'getAggregateContentByRow', 'getAggregateRowChildren', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'updateCellLabel', 'clearFormatterCache', 'getFooterCellLabel', 'updateFooterCellLabel', 'clearFooterFormatterCache', 'undo', 'redo', 'getCellElement', 'focus', 'blur', 'connect', 'connectToolbar'];
|
|
29840
|
+
const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeRowLevel', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'recalcRowHeight', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'setFilterByEvent', 'sort', 'setSort', 'setSortByEvent', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'getScrollData', 'scrollTo', 'scrollToStartRow', 'scrollToEndRow', 'scrollToRow', 'scrollToStartColumn', 'scrollToEndColumn', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'setMergeHeaderCells', 'removeMergeHeaderCells', 'getMergeHeaderCells', 'clearMergeHeaderCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'setCustomStoreData', 'getCustomStoreData', 'setRowGroupExpand', 'setRowGroupExpandByField', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'isAggregateRecord', 'isAggregateExpandByRow', 'getAggregateContentByRow', 'getAggregateRowChildren', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'updateCellLabel', 'clearFormatterCache', 'getFooterCellLabel', 'updateFooterCellLabel', 'clearFooterFormatterCache', 'undo', 'redo', 'effectCellData', 'getCellElement', 'focus', 'blur', 'connect', 'connectToolbar'];
|
|
29650
29841
|
function createReactData() {
|
|
29651
29842
|
var _a;
|
|
29652
29843
|
return {
|