vxe-table 4.11.4 → 4.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/zh-CHT.js +1 -1
- package/es/locale/lang/zh-CN.js +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/render/index.js +29 -6
- package/es/table/src/header.js +2 -4
- package/es/table/src/table.js +30 -32
- package/es/table/style.css +19 -0
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +19 -0
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +61 -46
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +1 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CN.js +1 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/render/index.js +27 -6
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/header.js +1 -4
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +28 -31
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +19 -0
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +19 -0
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/zh-CHT.ts +1 -1
- package/packages/locale/lang/zh-CN.ts +1 -1
- package/packages/table/render/index.ts +30 -6
- package/packages/table/src/header.ts +2 -4
- package/packages/table/src/table.ts +29 -32
- package/styles/components/table.scss +29 -0
- package/styles/index.scss +1 -1
- package/styles/theme/base.scss +2 -1
- package/styles/variable.scss +1 -0
- /package/es/{iconfont.1739938274682.ttf → iconfont.1740038200666.ttf} +0 -0
- /package/es/{iconfont.1739938274682.woff → iconfont.1740038200666.woff} +0 -0
- /package/es/{iconfont.1739938274682.woff2 → iconfont.1740038200666.woff2} +0 -0
- /package/lib/{iconfont.1739938274682.ttf → iconfont.1740038200666.ttf} +0 -0
- /package/lib/{iconfont.1739938274682.woff → iconfont.1740038200666.woff} +0 -0
- /package/lib/{iconfont.1739938274682.woff2 → iconfont.1740038200666.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3138
3138
|
;// ./packages/ui/index.ts
|
|
3139
3139
|
|
|
3140
3140
|
|
|
3141
|
-
const version = "4.11.
|
|
3141
|
+
const version = "4.11.6";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3586,7 +3586,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3586
3586
|
const {
|
|
3587
3587
|
log: log_log
|
|
3588
3588
|
} = core_.VxeUI;
|
|
3589
|
-
const log_version = `table v${"4.11.
|
|
3589
|
+
const log_version = `table v${"4.11.6"}`;
|
|
3590
3590
|
const warnLog = log_log.create('warn', log_version);
|
|
3591
3591
|
const errLog = log_log.create('error', log_version);
|
|
3592
3592
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -7134,7 +7134,6 @@ const header_renderType = 'header';
|
|
|
7134
7134
|
} = props;
|
|
7135
7135
|
const {
|
|
7136
7136
|
resizable: allResizable,
|
|
7137
|
-
border,
|
|
7138
7137
|
columnKey,
|
|
7139
7138
|
headerCellClassName,
|
|
7140
7139
|
headerCellStyle,
|
|
@@ -7291,9 +7290,7 @@ const header_renderType = 'header';
|
|
|
7291
7290
|
* 列宽拖动
|
|
7292
7291
|
*/
|
|
7293
7292
|
!fixedHiddenColumn && showResizable ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7294
|
-
class:
|
|
7295
|
-
'is--line': !border || border === 'none'
|
|
7296
|
-
}],
|
|
7293
|
+
class: 'vxe-cell--col-resizable',
|
|
7297
7294
|
onMousedown: evnt => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
|
|
7298
7295
|
onDblclick: evnt => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
|
|
7299
7296
|
}) : header_renderEmptyElement($xeTable)]);
|
|
@@ -13432,15 +13429,11 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13432
13429
|
internalData.tableFullData = fullData;
|
|
13433
13430
|
internalData.tableFullTreeData = treeData;
|
|
13434
13431
|
// 缓存数据
|
|
13435
|
-
$xeTable.cacheRowMap(true
|
|
13432
|
+
$xeTable.cacheRowMap(true);
|
|
13436
13433
|
// 原始数据
|
|
13437
13434
|
internalData.tableSynchData = datas;
|
|
13438
13435
|
if (isReset) {
|
|
13439
13436
|
internalData.isResizeCellHeight = false;
|
|
13440
|
-
reactData.rowExpandedMaps = {};
|
|
13441
|
-
reactData.rowExpandLazyLoadedMaps = {};
|
|
13442
|
-
reactData.treeExpandedMaps = {};
|
|
13443
|
-
reactData.treeExpandLazyLoadedMaps = {};
|
|
13444
13437
|
}
|
|
13445
13438
|
// 克隆原数据,用于显示编辑状态,与编辑值做对比
|
|
13446
13439
|
if (keepSource) {
|
|
@@ -14947,7 +14940,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14947
14940
|
treeConfig
|
|
14948
14941
|
} = props;
|
|
14949
14942
|
const {
|
|
14950
|
-
|
|
14943
|
+
fullAllDataRowIdData
|
|
14951
14944
|
} = internalData;
|
|
14952
14945
|
const treeOpts = computeTreeOpts.value;
|
|
14953
14946
|
const {
|
|
@@ -14963,7 +14956,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14963
14956
|
rowid = getRowid($xeTable, rowOrRowid);
|
|
14964
14957
|
}
|
|
14965
14958
|
if (rowid) {
|
|
14966
|
-
const rest =
|
|
14959
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
14967
14960
|
const row = rest ? rest.row : null;
|
|
14968
14961
|
if (row) {
|
|
14969
14962
|
return row[transform ? mapChildrenField : childrenField] || [];
|
|
@@ -14980,7 +14973,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14980
14973
|
treeConfig
|
|
14981
14974
|
} = props;
|
|
14982
14975
|
const {
|
|
14983
|
-
|
|
14976
|
+
fullAllDataRowIdData
|
|
14984
14977
|
} = internalData;
|
|
14985
14978
|
if (rowOrRowid && treeConfig) {
|
|
14986
14979
|
let rowid;
|
|
@@ -14990,7 +14983,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14990
14983
|
rowid = getRowid($xeTable, rowOrRowid);
|
|
14991
14984
|
}
|
|
14992
14985
|
if (rowid) {
|
|
14993
|
-
const rest =
|
|
14986
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
14994
14987
|
return rest ? rest.parent : null;
|
|
14995
14988
|
}
|
|
14996
14989
|
}
|
|
@@ -15006,10 +14999,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
15006
14999
|
*/
|
|
15007
15000
|
getRowById(cellValue) {
|
|
15008
15001
|
const {
|
|
15009
|
-
|
|
15002
|
+
fullAllDataRowIdData
|
|
15010
15003
|
} = internalData;
|
|
15011
15004
|
const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(cellValue) ? '' : encodeURIComponent(cellValue || '');
|
|
15012
|
-
return
|
|
15005
|
+
return fullAllDataRowIdData[rowid] ? fullAllDataRowIdData[rowid].row : null;
|
|
15013
15006
|
},
|
|
15014
15007
|
/**
|
|
15015
15008
|
* 根据行获取行的唯一主键
|
|
@@ -16375,9 +16368,6 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16375
16368
|
return rowRest && !!rowRest.treeLoaded;
|
|
16376
16369
|
},
|
|
16377
16370
|
clearTreeExpandLoaded(rows) {
|
|
16378
|
-
const tExpandedMaps = {
|
|
16379
|
-
...reactData.treeExpandedMaps
|
|
16380
|
-
};
|
|
16381
16371
|
const {
|
|
16382
16372
|
fullAllDataRowIdData
|
|
16383
16373
|
} = internalData;
|
|
@@ -16385,7 +16375,11 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16385
16375
|
const {
|
|
16386
16376
|
transform
|
|
16387
16377
|
} = treeOpts;
|
|
16378
|
+
let tExpandedMaps = {};
|
|
16388
16379
|
if (rows) {
|
|
16380
|
+
tExpandedMaps = {
|
|
16381
|
+
...reactData.treeExpandedMaps
|
|
16382
|
+
};
|
|
16389
16383
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
|
|
16390
16384
|
rows = [rows];
|
|
16391
16385
|
}
|
|
@@ -16399,11 +16393,15 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16399
16393
|
}
|
|
16400
16394
|
}
|
|
16401
16395
|
});
|
|
16396
|
+
} else {
|
|
16397
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(fullAllDataRowIdData, rowRest => {
|
|
16398
|
+
rowRest.treeLoaded = false;
|
|
16399
|
+
});
|
|
16402
16400
|
}
|
|
16403
|
-
reactData.treeExpandedMaps =
|
|
16401
|
+
reactData.treeExpandedMaps = {};
|
|
16404
16402
|
if (transform) {
|
|
16405
16403
|
handleVirtualTreeToList();
|
|
16406
|
-
return
|
|
16404
|
+
return $xeTable.handleTableData();
|
|
16407
16405
|
}
|
|
16408
16406
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
16409
16407
|
},
|
|
@@ -17948,7 +17946,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
17948
17946
|
/**
|
|
17949
17947
|
* 更新数据行的 Map
|
|
17950
17948
|
*/
|
|
17951
|
-
cacheRowMap(
|
|
17949
|
+
cacheRowMap() {
|
|
17952
17950
|
const {
|
|
17953
17951
|
treeConfig
|
|
17954
17952
|
} = props;
|
|
@@ -17975,9 +17973,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
17975
17973
|
if (isLazy && row[hasChildField] && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(row[childrenField])) {
|
|
17976
17974
|
row[childrenField] = null;
|
|
17977
17975
|
}
|
|
17978
|
-
let
|
|
17979
|
-
if (
|
|
17980
|
-
|
|
17976
|
+
let rowRest = fullAllDataRowIdData[rowid];
|
|
17977
|
+
if (!rowRest) {
|
|
17978
|
+
rowRest = {
|
|
17981
17979
|
row,
|
|
17982
17980
|
rowid,
|
|
17983
17981
|
seq,
|
|
@@ -17994,19 +17992,15 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
17994
17992
|
expandHeight: 0
|
|
17995
17993
|
};
|
|
17996
17994
|
}
|
|
17997
|
-
|
|
17998
|
-
|
|
17999
|
-
|
|
18000
|
-
|
|
18001
|
-
|
|
18002
|
-
|
|
18003
|
-
|
|
18004
|
-
}
|
|
18005
|
-
fullAllDataRowIdMaps[rowid] = cacheItem;
|
|
17995
|
+
rowRest.row = row;
|
|
17996
|
+
rowRest.items = items;
|
|
17997
|
+
rowRest.parent = parentRow;
|
|
17998
|
+
rowRest.level = level;
|
|
17999
|
+
rowRest.index = treeConfig && parentRow ? -1 : index;
|
|
18000
|
+
fullDataRowIdMaps[rowid] = rowRest;
|
|
18001
|
+
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
18006
18002
|
};
|
|
18007
|
-
|
|
18008
|
-
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
18009
|
-
}
|
|
18003
|
+
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
18010
18004
|
internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;
|
|
18011
18005
|
if (treeConfig) {
|
|
18012
18006
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, handleRow, {
|
|
@@ -21584,7 +21578,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
21584
21578
|
if (value && value.length >= 50000) {
|
|
21585
21579
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
|
|
21586
21580
|
}
|
|
21587
|
-
loadTableData(value,
|
|
21581
|
+
loadTableData(value, false).then(() => {
|
|
21588
21582
|
const {
|
|
21589
21583
|
scrollXLoad,
|
|
21590
21584
|
scrollYLoad,
|
|
@@ -27515,12 +27509,12 @@ function getCellEditFilterProps(renderOpts, params, value, defaultProps) {
|
|
|
27515
27509
|
function isImmediateCell(renderOpts, params) {
|
|
27516
27510
|
return params.$type === 'cell' || getInputImmediateModel(renderOpts);
|
|
27517
27511
|
}
|
|
27518
|
-
function getCellLabelVNs(renderOpts, params, cellLabel) {
|
|
27512
|
+
function getCellLabelVNs(renderOpts, params, cellLabel, opts) {
|
|
27519
27513
|
const {
|
|
27520
27514
|
placeholder
|
|
27521
27515
|
} = renderOpts;
|
|
27522
27516
|
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
27523
|
-
class: 'vxe-cell--label'
|
|
27517
|
+
class: ['vxe-cell--label', opts ? opts.class : '']
|
|
27524
27518
|
}, placeholder && isEmptyValue(cellLabel) ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
27525
27519
|
class: 'vxe-cell--placeholder'
|
|
27526
27520
|
}, formatText(getFuncText(placeholder), 1))] : formatText(cellLabel, 1))];
|
|
@@ -28169,7 +28163,8 @@ render_renderer.mixin({
|
|
|
28169
28163
|
renderTableEdit: defaultEditRender,
|
|
28170
28164
|
renderTableCell(renderOpts, params) {
|
|
28171
28165
|
const {
|
|
28172
|
-
props = {}
|
|
28166
|
+
props = {},
|
|
28167
|
+
showNegativeStatus
|
|
28173
28168
|
} = renderOpts;
|
|
28174
28169
|
const {
|
|
28175
28170
|
row,
|
|
@@ -28179,7 +28174,8 @@ render_renderer.mixin({
|
|
|
28179
28174
|
type
|
|
28180
28175
|
} = props;
|
|
28181
28176
|
let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
28182
|
-
|
|
28177
|
+
let isNegative = false;
|
|
28178
|
+
if (!isEmptyValue(cellValue)) {
|
|
28183
28179
|
const numberInputConfig = render_getConfig().numberInput || {};
|
|
28184
28180
|
if (type === 'float') {
|
|
28185
28181
|
const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
|
|
@@ -28188,11 +28184,22 @@ render_renderer.mixin({
|
|
|
28188
28184
|
if (!autoFill) {
|
|
28189
28185
|
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);
|
|
28190
28186
|
}
|
|
28187
|
+
if (showNegativeStatus) {
|
|
28188
|
+
if (cellValue < 0) {
|
|
28189
|
+
isNegative = true;
|
|
28190
|
+
}
|
|
28191
|
+
}
|
|
28191
28192
|
} else if (type === 'amount') {
|
|
28192
28193
|
const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
|
|
28193
28194
|
const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 2);
|
|
28194
28195
|
const showCurrency = handleDefaultValue(props.showCurrency, numberInputConfig.showCurrency, false);
|
|
28195
|
-
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().
|
|
28196
|
+
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);
|
|
28197
|
+
if (showNegativeStatus) {
|
|
28198
|
+
if (cellValue < 0) {
|
|
28199
|
+
isNegative = true;
|
|
28200
|
+
}
|
|
28201
|
+
}
|
|
28202
|
+
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(cellValue, {
|
|
28196
28203
|
digits
|
|
28197
28204
|
});
|
|
28198
28205
|
if (!autoFill) {
|
|
@@ -28205,9 +28212,17 @@ render_renderer.mixin({
|
|
|
28205
28212
|
if (showCurrency) {
|
|
28206
28213
|
cellValue = `${props.currencySymbol || numberInputConfig.currencySymbol || render_getI18n('vxe.numberInput.currencySymbol') || ''}${cellValue}`;
|
|
28207
28214
|
}
|
|
28215
|
+
} else {
|
|
28216
|
+
if (showNegativeStatus) {
|
|
28217
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue) < 0) {
|
|
28218
|
+
isNegative = true;
|
|
28219
|
+
}
|
|
28220
|
+
}
|
|
28208
28221
|
}
|
|
28209
28222
|
}
|
|
28210
|
-
return getCellLabelVNs(renderOpts, params, cellValue
|
|
28223
|
+
return getCellLabelVNs(renderOpts, params, cellValue, isNegative ? {
|
|
28224
|
+
class: 'is--negative'
|
|
28225
|
+
} : {});
|
|
28211
28226
|
},
|
|
28212
28227
|
renderTableFooter(renderOpts, params) {
|
|
28213
28228
|
const {
|
|
@@ -31203,7 +31218,7 @@ const Grid = VxeGrid;
|
|
|
31203
31218
|
}
|
|
31204
31219
|
},
|
|
31205
31220
|
numberInput: {
|
|
31206
|
-
currencySymbol: '
|
|
31221
|
+
currencySymbol: '¥'
|
|
31207
31222
|
},
|
|
31208
31223
|
imagePreview: {
|
|
31209
31224
|
popupTitle: '预览',
|