vxe-table 4.5.8 → 4.5.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/es/button/style.css +2 -3
- package/es/edit/src/hook.js +3 -3
- package/es/export/src/hook.js +5 -5
- package/es/form/src/form-config-item.js +4 -2
- package/es/form/src/form-item.js +8 -2
- package/es/form/src/form.js +4 -0
- package/es/form/style.css +12 -0
- package/es/icon/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/body.js +2 -5
- package/es/table/src/cell.js +6 -3
- package/es/table/src/table.js +58 -47
- package/es/tools/log.js +1 -1
- package/es/v-x-e-table/index.js +7 -5
- package/es/v-x-e-table/src/{setup.js → config.js} +1 -1
- package/es/vxe-button/style.css +2 -3
- package/es/vxe-form/style.css +12 -0
- package/helper/vetur/attributes.json +18 -2
- package/helper/vetur/tags.json +4 -0
- package/lib/button/style/style.css +2 -3
- package/lib/button/style/style.min.css +1 -1
- package/lib/edit/src/hook.js +2 -2
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/export/src/hook.js +5 -5
- package/lib/export/src/hook.min.js +1 -1
- package/lib/form/src/form-config-item.js +5 -1
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-item.js +9 -1
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +4 -0
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +12 -0
- package/lib/form/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +101 -59
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +2 -5
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +6 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/table.js +61 -51
- package/lib/table/src/table.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +15 -11
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/{setup.js → config.js} +3 -3
- package/lib/v-x-e-table/src/config.min.js +1 -0
- package/lib/vxe-button/style/style.css +2 -3
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-form/style/style.css +12 -0
- package/lib/vxe-form/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/edit/src/hook.ts +2 -2
- package/packages/export/src/hook.ts +5 -5
- package/packages/form/src/form-config-item.ts +4 -2
- package/packages/form/src/form-item.ts +8 -2
- package/packages/form/src/form.ts +4 -0
- package/packages/table/src/body.ts +2 -5
- package/packages/table/src/cell.ts +6 -3
- package/packages/table/src/table.ts +36 -25
- package/packages/v-x-e-table/index.ts +8 -4
- package/packages/v-x-e-table/src/{setup.ts → config.ts} +1 -1
- package/styles/button.scss +5 -3
- package/styles/form.scss +14 -0
- package/types/form-item.d.ts +5 -0
- package/types/form.d.ts +3 -0
- package/types/table.d.ts +5 -5
- package/types/v-x-e-table/index.d.ts +31 -14
- package/lib/v-x-e-table/src/setup.min.js +0 -1
- /package/es/icon/style/{iconfont.1693370199154.ttf → iconfont.1694565686263.ttf} +0 -0
- /package/es/icon/style/{iconfont.1693370199154.woff → iconfont.1694565686263.woff} +0 -0
- /package/es/icon/style/{iconfont.1693370199154.woff2 → iconfont.1694565686263.woff2} +0 -0
- /package/es/{iconfont.1693370199154.ttf → iconfont.1694565686263.ttf} +0 -0
- /package/es/{iconfont.1693370199154.woff → iconfont.1694565686263.woff} +0 -0
- /package/es/{iconfont.1693370199154.woff2 → iconfont.1694565686263.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1693370199154.ttf → iconfont.1694565686263.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1693370199154.woff → iconfont.1694565686263.woff} +0 -0
- /package/lib/icon/style/{iconfont.1693370199154.woff2 → iconfont.1694565686263.woff2} +0 -0
- /package/lib/{iconfont.1693370199154.ttf → iconfont.1694565686263.ttf} +0 -0
- /package/lib/{iconfont.1693370199154.woff → iconfont.1694565686263.woff} +0 -0
- /package/lib/{iconfont.1693370199154.woff2 → iconfont.1694565686263.woff2} +0 -0
- /package/types/v-x-e-table/{setup.d.ts → config.d.ts} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -1776,6 +1776,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1776
1776
|
"config": function() { return /* reexport */ config; },
|
|
1777
1777
|
"default": function() { return /* binding */ entry_lib; },
|
|
1778
1778
|
"formats": function() { return /* reexport */ formats; },
|
|
1779
|
+
"globalConfs": function() { return /* reexport */ globalConfs; },
|
|
1779
1780
|
"hooks": function() { return /* reexport */ hooks; },
|
|
1780
1781
|
"install": function() { return /* reexport */ install; },
|
|
1781
1782
|
"interceptor": function() { return /* reexport */ interceptor; },
|
|
@@ -1866,6 +1867,7 @@ __webpack_require__.d(all_namespaceObject, {
|
|
|
1866
1867
|
"commands": function() { return commands; },
|
|
1867
1868
|
"config": function() { return config; },
|
|
1868
1869
|
"formats": function() { return formats; },
|
|
1870
|
+
"globalConfs": function() { return globalConfs; },
|
|
1869
1871
|
"hooks": function() { return hooks; },
|
|
1870
1872
|
"install": function() { return install; },
|
|
1871
1873
|
"interceptor": function() { return interceptor; },
|
|
@@ -2277,7 +2279,7 @@ const GlobalConfig = {
|
|
|
2277
2279
|
;// CONCATENATED MODULE: ./packages/tools/log.ts
|
|
2278
2280
|
|
|
2279
2281
|
function getLog(message, params) {
|
|
2280
|
-
return `[vxe-table v${"4.5.
|
|
2282
|
+
return `[vxe-table v${"4.5.10"}] ${conf.i18n(message, params)}`;
|
|
2281
2283
|
}
|
|
2282
2284
|
function outLog(type) {
|
|
2283
2285
|
return function (message, params) {
|
|
@@ -4272,13 +4274,13 @@ if (true) {
|
|
|
4272
4274
|
;// CONCATENATED MODULE: ./packages/v-x-e-table/src/hooks.ts
|
|
4273
4275
|
|
|
4274
4276
|
const hooks = new store();
|
|
4275
|
-
;// CONCATENATED MODULE: ./packages/v-x-e-table/src/
|
|
4277
|
+
;// CONCATENATED MODULE: ./packages/v-x-e-table/src/config.ts
|
|
4276
4278
|
|
|
4277
4279
|
|
|
4278
4280
|
/**
|
|
4279
4281
|
* 全局参数设置
|
|
4280
4282
|
*/
|
|
4281
|
-
const
|
|
4283
|
+
const config = options => {
|
|
4282
4284
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, options);
|
|
4283
4285
|
};
|
|
4284
4286
|
;// CONCATENATED MODULE: ./packages/v-x-e-table/index.ts
|
|
@@ -4346,12 +4348,15 @@ class VXETableConfig {
|
|
|
4346
4348
|
return getExportOrImpotType(conf["export"].types, 2);
|
|
4347
4349
|
}
|
|
4348
4350
|
}
|
|
4349
|
-
|
|
4351
|
+
// 已废弃
|
|
4352
|
+
const globalConfs = new VXETableConfig();
|
|
4350
4353
|
const v = 'v4';
|
|
4354
|
+
const setup = config;
|
|
4351
4355
|
const VXETable = {
|
|
4352
4356
|
v,
|
|
4353
|
-
version: "4.5.
|
|
4354
|
-
setup
|
|
4357
|
+
version: "4.5.10",
|
|
4358
|
+
setup,
|
|
4359
|
+
config: config,
|
|
4355
4360
|
interceptor: interceptor,
|
|
4356
4361
|
renderer: renderer,
|
|
4357
4362
|
commands: commands,
|
|
@@ -4359,7 +4364,6 @@ const VXETable = {
|
|
|
4359
4364
|
validators: validators,
|
|
4360
4365
|
menus: menus,
|
|
4361
4366
|
hooks: hooks,
|
|
4362
|
-
config,
|
|
4363
4367
|
use,
|
|
4364
4368
|
t,
|
|
4365
4369
|
_t
|
|
@@ -5777,10 +5781,10 @@ const editHook = {
|
|
|
5777
5781
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(records)) {
|
|
5778
5782
|
records = [records];
|
|
5779
5783
|
}
|
|
5780
|
-
const newRecords = $xetable.defineField(records.map(record => Object.assign(treeConfig && transform ? {
|
|
5784
|
+
const newRecords = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)($xetable.defineField(records.map(record => Object.assign(treeConfig && transform ? {
|
|
5781
5785
|
[mapChildrenField]: [],
|
|
5782
5786
|
[childrenField]: []
|
|
5783
|
-
} : {}, record)));
|
|
5787
|
+
} : {}, record))));
|
|
5784
5788
|
if (!row) {
|
|
5785
5789
|
// 如果为虚拟树
|
|
5786
5790
|
if (treeConfig && transform) {
|
|
@@ -13909,7 +13913,7 @@ const tableExportHook = {
|
|
|
13909
13913
|
filename
|
|
13910
13914
|
} = parseFile(file);
|
|
13911
13915
|
// 检查类型,如果为自定义导出,则不需要校验类型
|
|
13912
|
-
if (!importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(VXETable.
|
|
13916
|
+
if (!importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(VXETable.globalConfs.importTypes, type)) {
|
|
13913
13917
|
if (opts.message !== false) {
|
|
13914
13918
|
// 检测弹窗模块
|
|
13915
13919
|
if (true) {
|
|
@@ -14045,7 +14049,7 @@ const tableExportHook = {
|
|
|
14045
14049
|
isHeader: showHeader,
|
|
14046
14050
|
isFooter: showFooter
|
|
14047
14051
|
}, options);
|
|
14048
|
-
const types = defOpts.types || VXETable.
|
|
14052
|
+
const types = defOpts.types || VXETable.globalConfs.exportTypes;
|
|
14049
14053
|
const modes = defOpts.modes;
|
|
14050
14054
|
const checkMethod = customOpts.checkMethod;
|
|
14051
14055
|
const exportColumns = collectColumn.slice(0);
|
|
@@ -14250,7 +14254,7 @@ const tableExportHook = {
|
|
|
14250
14254
|
opts.sheetName = document.title;
|
|
14251
14255
|
}
|
|
14252
14256
|
// 检查类型,如果为自定义导出,则不需要校验类型
|
|
14253
|
-
if (!opts.exportMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(VXETable.
|
|
14257
|
+
if (!opts.exportMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(VXETable.globalConfs.exportTypes, type)) {
|
|
14254
14258
|
if (true) {
|
|
14255
14259
|
errLog('vxe.error.notType', [type]);
|
|
14256
14260
|
}
|
|
@@ -14344,7 +14348,7 @@ const tableExportHook = {
|
|
|
14344
14348
|
importData(options) {
|
|
14345
14349
|
const importOpts = computeImportOpts.value;
|
|
14346
14350
|
const opts = Object.assign({
|
|
14347
|
-
types: VXETable.
|
|
14351
|
+
types: VXETable.globalConfs.importTypes
|
|
14348
14352
|
// beforeImportMethod: null,
|
|
14349
14353
|
// afterImportMethod: null
|
|
14350
14354
|
}, importOpts, options);
|
|
@@ -14420,7 +14424,7 @@ const tableExportHook = {
|
|
|
14420
14424
|
const defOpts = Object.assign({
|
|
14421
14425
|
mode: 'insert',
|
|
14422
14426
|
message: true,
|
|
14423
|
-
types: VXETable.
|
|
14427
|
+
types: VXETable.globalConfs.importTypes
|
|
14424
14428
|
}, options, importOpts);
|
|
14425
14429
|
const {
|
|
14426
14430
|
types
|
|
@@ -16197,9 +16201,9 @@ const Cell = {
|
|
|
16197
16201
|
row
|
|
16198
16202
|
});
|
|
16199
16203
|
let isDisabled = !!checkMethod;
|
|
16200
|
-
const rowid = getRowid($table, row);
|
|
16201
16204
|
let ons;
|
|
16202
16205
|
if (!isHidden) {
|
|
16206
|
+
const rowid = getRowid($table, row);
|
|
16203
16207
|
isChecked = !!selectCheckboxMaps[rowid];
|
|
16204
16208
|
ons = {
|
|
16205
16209
|
onClick(evnt) {
|
|
@@ -16292,6 +16296,7 @@ const Cell = {
|
|
|
16292
16296
|
let isDisabled = !!checkMethod;
|
|
16293
16297
|
let ons;
|
|
16294
16298
|
if (!isHidden) {
|
|
16299
|
+
const rowid = getRowid($table, row);
|
|
16295
16300
|
isChecked = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField);
|
|
16296
16301
|
ons = {
|
|
16297
16302
|
onClick(evnt) {
|
|
@@ -16307,7 +16312,7 @@ const Cell = {
|
|
|
16307
16312
|
});
|
|
16308
16313
|
}
|
|
16309
16314
|
if (treeConfig) {
|
|
16310
|
-
isIndeterminate = !!treeIndeterminateMaps[
|
|
16315
|
+
isIndeterminate = !!treeIndeterminateMaps[rowid];
|
|
16311
16316
|
}
|
|
16312
16317
|
}
|
|
16313
16318
|
const checkboxParams = {
|
|
@@ -16534,7 +16539,9 @@ const Cell = {
|
|
|
16534
16539
|
class: ['vxe-filter--btn', hasFilter ? iconMatch || conf.icon.TABLE_FILTER_MATCH : iconNone || conf.icon.TABLE_FILTER_NONE],
|
|
16535
16540
|
title: conf.i18n('vxe.table.filter'),
|
|
16536
16541
|
onClick(evnt) {
|
|
16537
|
-
$table.triggerFilterEvent
|
|
16542
|
+
if ($table.triggerFilterEvent) {
|
|
16543
|
+
$table.triggerFilterEvent(evnt, params.column, params);
|
|
16544
|
+
}
|
|
16538
16545
|
}
|
|
16539
16546
|
})])] : [];
|
|
16540
16547
|
},
|
|
@@ -21152,7 +21159,8 @@ const VxeFormConfigItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.defin
|
|
|
21152
21159
|
titleWidth: allTitleWidth,
|
|
21153
21160
|
titleColon: allTitleColon,
|
|
21154
21161
|
titleAsterisk: allTitleAsterisk,
|
|
21155
|
-
titleOverflow: allTitleOverflow
|
|
21162
|
+
titleOverflow: allTitleOverflow,
|
|
21163
|
+
vertical: allVertical
|
|
21156
21164
|
} = $xeform.props;
|
|
21157
21165
|
const {
|
|
21158
21166
|
computeValidOpts
|
|
@@ -21174,6 +21182,7 @@ const VxeFormConfigItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.defin
|
|
|
21174
21182
|
errRule,
|
|
21175
21183
|
className,
|
|
21176
21184
|
titleOverflow,
|
|
21185
|
+
vertical,
|
|
21177
21186
|
children,
|
|
21178
21187
|
showTitle,
|
|
21179
21188
|
contentClassName,
|
|
@@ -21197,6 +21206,7 @@ const VxeFormConfigItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.defin
|
|
|
21197
21206
|
const titleColon = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleColon) ? allTitleColon : item.titleColon;
|
|
21198
21207
|
const titleAsterisk = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleAsterisk) ? allTitleAsterisk : item.titleAsterisk;
|
|
21199
21208
|
const itemOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(titleOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(titleOverflow) ? allTitleOverflow : titleOverflow;
|
|
21209
|
+
const itemVertical = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(vertical) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(vertical) ? allVertical : vertical;
|
|
21200
21210
|
const ovEllipsis = itemOverflow === 'ellipsis';
|
|
21201
21211
|
const ovTitle = itemOverflow === 'title';
|
|
21202
21212
|
const ovTooltip = itemOverflow === true || itemOverflow === 'tooltip';
|
|
@@ -21268,6 +21278,7 @@ const VxeFormConfigItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.defin
|
|
|
21268
21278
|
class: ['vxe-form--item', item.id, span ? `vxe-col--${span} is--span` : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className(params) : className : '', itemClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemClassName) ? itemClassName(params) : itemClassName : '', {
|
|
21269
21279
|
'is--title': title,
|
|
21270
21280
|
'is--colon': titleColon,
|
|
21281
|
+
'is--vertical': itemVertical,
|
|
21271
21282
|
'is--asterisk': titleAsterisk,
|
|
21272
21283
|
'is--required': isRequired,
|
|
21273
21284
|
'is--hidden': folding && collapseAll,
|
|
@@ -21408,6 +21419,10 @@ function getResetValue(value, resetValue) {
|
|
|
21408
21419
|
type: [Boolean, String],
|
|
21409
21420
|
default: null
|
|
21410
21421
|
},
|
|
21422
|
+
vertical: {
|
|
21423
|
+
type: Boolean,
|
|
21424
|
+
default: null
|
|
21425
|
+
},
|
|
21411
21426
|
className: [String, Function],
|
|
21412
21427
|
readonly: Boolean,
|
|
21413
21428
|
items: Array,
|
|
@@ -22101,6 +22116,10 @@ const formItemProps = {
|
|
|
22101
22116
|
type: Boolean,
|
|
22102
22117
|
default: true
|
|
22103
22118
|
},
|
|
22119
|
+
vertical: {
|
|
22120
|
+
type: Boolean,
|
|
22121
|
+
default: null
|
|
22122
|
+
},
|
|
22104
22123
|
className: [String, Function],
|
|
22105
22124
|
contentClassName: [String, Function],
|
|
22106
22125
|
contentStyle: [Object, Function],
|
|
@@ -22163,7 +22182,8 @@ const formItemProps = {
|
|
|
22163
22182
|
titleWidth: allTitleWidth,
|
|
22164
22183
|
titleColon: allTitleColon,
|
|
22165
22184
|
titleAsterisk: allTitleAsterisk,
|
|
22166
|
-
titleOverflow: allTitleOverflow
|
|
22185
|
+
titleOverflow: allTitleOverflow,
|
|
22186
|
+
vertical: allVertical
|
|
22167
22187
|
} = props;
|
|
22168
22188
|
const {
|
|
22169
22189
|
collapseAll
|
|
@@ -22184,6 +22204,7 @@ const formItemProps = {
|
|
|
22184
22204
|
errRule,
|
|
22185
22205
|
className,
|
|
22186
22206
|
titleOverflow,
|
|
22207
|
+
vertical,
|
|
22187
22208
|
showTitle,
|
|
22188
22209
|
contentClassName,
|
|
22189
22210
|
contentStyle,
|
|
@@ -22206,6 +22227,7 @@ const formItemProps = {
|
|
|
22206
22227
|
const titleColon = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleColon) ? allTitleColon : item.titleColon;
|
|
22207
22228
|
const titleAsterisk = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleAsterisk) ? allTitleAsterisk : item.titleAsterisk;
|
|
22208
22229
|
const itemOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(titleOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(titleOverflow) ? allTitleOverflow : titleOverflow;
|
|
22230
|
+
const itemVertical = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(vertical) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(vertical) ? allVertical : vertical;
|
|
22209
22231
|
const ovEllipsis = itemOverflow === 'ellipsis';
|
|
22210
22232
|
const ovTitle = itemOverflow === 'title';
|
|
22211
22233
|
const ovTooltip = itemOverflow === true || itemOverflow === 'tooltip';
|
|
@@ -22265,6 +22287,7 @@ const formItemProps = {
|
|
|
22265
22287
|
class: ['vxe-form--item', item.id, span ? `vxe-col--${span} is--span` : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className(params) : className : '', itemClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemClassName) ? itemClassName(params) : itemClassName : '', {
|
|
22266
22288
|
'is--title': title,
|
|
22267
22289
|
'is--colon': titleColon,
|
|
22290
|
+
'is--vertical': itemVertical,
|
|
22268
22291
|
'is--asterisk': titleAsterisk,
|
|
22269
22292
|
'is--required': isRequired,
|
|
22270
22293
|
'is--hidden': folding && collapseAll,
|
|
@@ -24112,11 +24135,8 @@ const lineOffsetSizes = {
|
|
|
24112
24135
|
}, [expandColumn.renderData(expandParams)])])]));
|
|
24113
24136
|
}
|
|
24114
24137
|
// 如果是树形表格
|
|
24115
|
-
if (
|
|
24116
|
-
|
|
24117
|
-
if (rowChildren && rowChildren.length && treeExpandedMaps[rowid]) {
|
|
24118
|
-
rows.push(...renderRows(fixedType, rowChildren, tableColumn));
|
|
24119
|
-
}
|
|
24138
|
+
if (isExpandTree) {
|
|
24139
|
+
rows.push(...renderRows(fixedType, rowChildren, tableColumn));
|
|
24120
24140
|
}
|
|
24121
24141
|
});
|
|
24122
24142
|
return rows;
|
|
@@ -27699,13 +27719,6 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
27699
27719
|
}
|
|
27700
27720
|
};
|
|
27701
27721
|
const handleAsyncTreeExpandChilds = row => {
|
|
27702
|
-
const {
|
|
27703
|
-
treeExpandedMaps,
|
|
27704
|
-
treeExpandLazyLoadedMaps
|
|
27705
|
-
} = reactData;
|
|
27706
|
-
const {
|
|
27707
|
-
fullAllDataRowIdData
|
|
27708
|
-
} = internalData;
|
|
27709
27722
|
const treeOpts = computeTreeOpts.value;
|
|
27710
27723
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
27711
27724
|
const {
|
|
@@ -27715,10 +27728,16 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
27715
27728
|
const {
|
|
27716
27729
|
checkStrictly
|
|
27717
27730
|
} = checkboxOpts;
|
|
27718
|
-
const rowid = getRowid($xetable, row);
|
|
27719
|
-
const rest = fullAllDataRowIdData[rowid];
|
|
27720
27731
|
return new Promise(resolve => {
|
|
27721
27732
|
if (loadMethod) {
|
|
27733
|
+
const {
|
|
27734
|
+
treeExpandLazyLoadedMaps
|
|
27735
|
+
} = reactData;
|
|
27736
|
+
const {
|
|
27737
|
+
fullAllDataRowIdData
|
|
27738
|
+
} = internalData;
|
|
27739
|
+
const rowid = getRowid($xetable, row);
|
|
27740
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
27722
27741
|
treeExpandLazyLoadedMaps[rowid] = row;
|
|
27723
27742
|
loadMethod({
|
|
27724
27743
|
$table: $xetable,
|
|
@@ -27733,6 +27752,9 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
27733
27752
|
}
|
|
27734
27753
|
if (childRecords) {
|
|
27735
27754
|
return tableMethods.loadTreeChildren(row, childRecords).then(childRows => {
|
|
27755
|
+
const {
|
|
27756
|
+
treeExpandedMaps
|
|
27757
|
+
} = reactData;
|
|
27736
27758
|
if (childRows.length && !treeExpandedMaps[rowid]) {
|
|
27737
27759
|
treeExpandedMaps[rowid] = row;
|
|
27738
27760
|
}
|
|
@@ -27748,6 +27770,9 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
27748
27770
|
});
|
|
27749
27771
|
}
|
|
27750
27772
|
}).catch(() => {
|
|
27773
|
+
const {
|
|
27774
|
+
treeExpandLazyLoadedMaps
|
|
27775
|
+
} = reactData;
|
|
27751
27776
|
rest.treeLoaded = false;
|
|
27752
27777
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
27753
27778
|
delete treeExpandLazyLoadedMaps[rowid];
|
|
@@ -27775,19 +27800,18 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
27775
27800
|
}
|
|
27776
27801
|
};
|
|
27777
27802
|
const handleAsyncRowExpand = row => {
|
|
27778
|
-
const {
|
|
27779
|
-
fullAllDataRowIdData
|
|
27780
|
-
} = internalData;
|
|
27781
|
-
const {
|
|
27782
|
-
rowExpandLazyLoadedMaps,
|
|
27783
|
-
rowExpandedMaps
|
|
27784
|
-
} = reactData;
|
|
27785
27803
|
return new Promise(resolve => {
|
|
27786
27804
|
const expandOpts = computeExpandOpts.value;
|
|
27787
27805
|
const {
|
|
27788
27806
|
loadMethod
|
|
27789
27807
|
} = expandOpts;
|
|
27790
27808
|
if (loadMethod) {
|
|
27809
|
+
const {
|
|
27810
|
+
fullAllDataRowIdData
|
|
27811
|
+
} = internalData;
|
|
27812
|
+
const {
|
|
27813
|
+
rowExpandLazyLoadedMaps
|
|
27814
|
+
} = reactData;
|
|
27791
27815
|
const rowid = getRowid($xetable, row);
|
|
27792
27816
|
const rest = fullAllDataRowIdData[rowid];
|
|
27793
27817
|
rowExpandLazyLoadedMaps[rowid] = row;
|
|
@@ -27797,11 +27821,17 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
27797
27821
|
rowIndex: tableMethods.getRowIndex(row),
|
|
27798
27822
|
$rowIndex: tableMethods.getVMRowIndex(row)
|
|
27799
27823
|
}).then(() => {
|
|
27824
|
+
const {
|
|
27825
|
+
rowExpandedMaps
|
|
27826
|
+
} = reactData;
|
|
27800
27827
|
rest.expandLoaded = true;
|
|
27801
27828
|
rowExpandedMaps[rowid] = row;
|
|
27802
27829
|
}).catch(() => {
|
|
27803
27830
|
rest.expandLoaded = false;
|
|
27804
27831
|
}).finally(() => {
|
|
27832
|
+
const {
|
|
27833
|
+
rowExpandLazyLoadedMaps
|
|
27834
|
+
} = reactData;
|
|
27805
27835
|
if (rowExpandLazyLoadedMaps[rowid]) {
|
|
27806
27836
|
delete rowExpandLazyLoadedMaps[rowid];
|
|
27807
27837
|
}
|
|
@@ -28285,6 +28315,9 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
28285
28315
|
treeExpandLazyLoadedMaps,
|
|
28286
28316
|
treeNodeColumn
|
|
28287
28317
|
} = reactData;
|
|
28318
|
+
const treeTempExpandedMaps = {
|
|
28319
|
+
...treeExpandedMaps
|
|
28320
|
+
};
|
|
28288
28321
|
const {
|
|
28289
28322
|
fullAllDataRowIdData,
|
|
28290
28323
|
tableFullData
|
|
@@ -28318,8 +28351,8 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
28318
28351
|
if (matchObj) {
|
|
28319
28352
|
matchObj.items.forEach(item => {
|
|
28320
28353
|
const rowid = getRowid($xetable, item);
|
|
28321
|
-
if (
|
|
28322
|
-
delete
|
|
28354
|
+
if (treeTempExpandedMaps[rowid]) {
|
|
28355
|
+
delete treeTempExpandedMaps[rowid];
|
|
28323
28356
|
}
|
|
28324
28357
|
});
|
|
28325
28358
|
}
|
|
@@ -28327,7 +28360,7 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
28327
28360
|
if (expanded) {
|
|
28328
28361
|
validRows.forEach(row => {
|
|
28329
28362
|
const rowid = getRowid($xetable, row);
|
|
28330
|
-
if (!
|
|
28363
|
+
if (!treeTempExpandedMaps[rowid]) {
|
|
28331
28364
|
const rest = fullAllDataRowIdData[rowid];
|
|
28332
28365
|
const isLoad = lazy && row[hasChildField] && !rest.treeLoaded && !treeExpandLazyLoadedMaps[rowid];
|
|
28333
28366
|
// 是否使用懒加载
|
|
@@ -28335,7 +28368,7 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
28335
28368
|
result.push(handleAsyncTreeExpandChilds(row));
|
|
28336
28369
|
} else {
|
|
28337
28370
|
if (row[childrenField] && row[childrenField].length) {
|
|
28338
|
-
|
|
28371
|
+
treeTempExpandedMaps[rowid] = row;
|
|
28339
28372
|
}
|
|
28340
28373
|
}
|
|
28341
28374
|
}
|
|
@@ -28343,14 +28376,15 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
28343
28376
|
} else {
|
|
28344
28377
|
validRows.forEach(item => {
|
|
28345
28378
|
const rowid = getRowid($xetable, item);
|
|
28346
|
-
if (
|
|
28347
|
-
delete
|
|
28379
|
+
if (treeTempExpandedMaps[rowid]) {
|
|
28380
|
+
delete treeTempExpandedMaps[rowid];
|
|
28348
28381
|
}
|
|
28349
28382
|
});
|
|
28350
28383
|
}
|
|
28351
28384
|
if (reserve) {
|
|
28352
28385
|
validRows.forEach(row => handleTreeExpandReserve(row, expanded));
|
|
28353
28386
|
}
|
|
28387
|
+
reactData.treeExpandedMaps = treeTempExpandedMaps;
|
|
28354
28388
|
return Promise.all(result).then(() => {
|
|
28355
28389
|
return tableMethods.recalculate();
|
|
28356
28390
|
});
|
|
@@ -28587,7 +28621,8 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
28587
28621
|
const {
|
|
28588
28622
|
tableSourceData,
|
|
28589
28623
|
fullDataRowIdData,
|
|
28590
|
-
fullAllDataRowIdData
|
|
28624
|
+
fullAllDataRowIdData,
|
|
28625
|
+
sourceDataRowIdData
|
|
28591
28626
|
} = internalData;
|
|
28592
28627
|
const treeOpts = computeTreeOpts.value;
|
|
28593
28628
|
const {
|
|
@@ -28606,6 +28641,10 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
28606
28641
|
if (matchObj) {
|
|
28607
28642
|
matchObj.item[childrenField] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(rows, true);
|
|
28608
28643
|
}
|
|
28644
|
+
rows.forEach(childRow => {
|
|
28645
|
+
const rowid = getRowid($xetable, childRow);
|
|
28646
|
+
sourceDataRowIdData[rowid] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(childRow, true);
|
|
28647
|
+
});
|
|
28609
28648
|
}
|
|
28610
28649
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(rows, (childRow, index, items, path, parent, nodes) => {
|
|
28611
28650
|
const rowid = getRowid($xetable, childRow);
|
|
@@ -29332,7 +29371,7 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
29332
29371
|
const {
|
|
29333
29372
|
treeIndeterminateMaps
|
|
29334
29373
|
} = reactData;
|
|
29335
|
-
return treeIndeterminateMaps[getRowid($xetable, row)] && !tableMethods.isCheckedByCheckboxRow(row);
|
|
29374
|
+
return !!treeIndeterminateMaps[getRowid($xetable, row)] && !tableMethods.isCheckedByCheckboxRow(row);
|
|
29336
29375
|
},
|
|
29337
29376
|
/**
|
|
29338
29377
|
* 多选,切换某一行的选中状态
|
|
@@ -29845,7 +29884,7 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
29845
29884
|
* @param {Boolean} expanded 是否展开
|
|
29846
29885
|
*/
|
|
29847
29886
|
setRowExpand(rows, expanded) {
|
|
29848
|
-
|
|
29887
|
+
const {
|
|
29849
29888
|
rowExpandedMaps,
|
|
29850
29889
|
rowExpandLazyLoadedMaps,
|
|
29851
29890
|
expandColumn: column
|
|
@@ -29853,6 +29892,9 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
29853
29892
|
const {
|
|
29854
29893
|
fullAllDataRowIdData
|
|
29855
29894
|
} = internalData;
|
|
29895
|
+
let rExpandedMaps = {
|
|
29896
|
+
...rowExpandedMaps
|
|
29897
|
+
};
|
|
29856
29898
|
const expandOpts = computeExpandOpts.value;
|
|
29857
29899
|
const {
|
|
29858
29900
|
reserve,
|
|
@@ -29869,7 +29911,7 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
29869
29911
|
}
|
|
29870
29912
|
if (accordion) {
|
|
29871
29913
|
// 只能同时展开一个
|
|
29872
|
-
|
|
29914
|
+
rExpandedMaps = {};
|
|
29873
29915
|
rows = rows.slice(rows.length - 1, rows.length);
|
|
29874
29916
|
}
|
|
29875
29917
|
const validRows = toggleMethod ? rows.filter(row => toggleMethod({
|
|
@@ -29885,21 +29927,21 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
29885
29927
|
if (expanded) {
|
|
29886
29928
|
validRows.forEach(row => {
|
|
29887
29929
|
const rowid = getRowid($xetable, row);
|
|
29888
|
-
if (!
|
|
29930
|
+
if (!rExpandedMaps[rowid]) {
|
|
29889
29931
|
const rest = fullAllDataRowIdData[rowid];
|
|
29890
29932
|
const isLoad = lazy && !rest.expandLoaded && !rowExpandLazyLoadedMaps[rowid];
|
|
29891
29933
|
if (isLoad) {
|
|
29892
29934
|
lazyRests.push(handleAsyncRowExpand(row));
|
|
29893
29935
|
} else {
|
|
29894
|
-
|
|
29936
|
+
rExpandedMaps[rowid] = row;
|
|
29895
29937
|
}
|
|
29896
29938
|
}
|
|
29897
29939
|
});
|
|
29898
29940
|
} else {
|
|
29899
29941
|
validRows.forEach(item => {
|
|
29900
29942
|
const rowid = getRowid($xetable, item);
|
|
29901
|
-
if (
|
|
29902
|
-
delete
|
|
29943
|
+
if (rExpandedMaps[rowid]) {
|
|
29944
|
+
delete rExpandedMaps[rowid];
|
|
29903
29945
|
}
|
|
29904
29946
|
});
|
|
29905
29947
|
}
|
|
@@ -29907,7 +29949,7 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
29907
29949
|
validRows.forEach(row => handleRowExpandReserve(row, expanded));
|
|
29908
29950
|
}
|
|
29909
29951
|
}
|
|
29910
|
-
reactData.rowExpandedMaps =
|
|
29952
|
+
reactData.rowExpandedMaps = rExpandedMaps;
|
|
29911
29953
|
return Promise.all(lazyRests).then(() => tableMethods.recalculate());
|
|
29912
29954
|
},
|
|
29913
29955
|
/**
|
|
@@ -32785,11 +32827,11 @@ const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
|
|
|
32785
32827
|
} = props;
|
|
32786
32828
|
const exportOpts = computeExportOpts.value;
|
|
32787
32829
|
const importOpts = computeImportOpts.value;
|
|
32788
|
-
if (importConfig && importOpts.types && !importOpts.importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includeArrays(VXETable.
|
|
32789
|
-
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter(type => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(VXETable.
|
|
32830
|
+
if (importConfig && importOpts.types && !importOpts.importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includeArrays(VXETable.globalConfs.importTypes, importOpts.types)) {
|
|
32831
|
+
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter(type => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(VXETable.globalConfs.importTypes, type)).join(',') || VXETable.globalConfs.importTypes.join(',')]);
|
|
32790
32832
|
}
|
|
32791
|
-
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includeArrays(VXETable.
|
|
32792
|
-
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter(type => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(VXETable.
|
|
32833
|
+
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includeArrays(VXETable.globalConfs.exportTypes, exportOpts.types)) {
|
|
32834
|
+
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter(type => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(VXETable.globalConfs.exportTypes, type)).join(',') || VXETable.globalConfs.exportTypes.join(',')]);
|
|
32793
32835
|
}
|
|
32794
32836
|
}
|
|
32795
32837
|
if (true) {
|