vxe-table 4.20.9 → 4.20.11
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 +339 -204
- package/dist/style.css +1 -1
- package/es/grid/src/grid.js +252 -161
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +3 -3
- package/es/table/module/export/hook.js +53 -33
- package/es/table/render/index.js +12 -2
- package/es/table/src/table.js +17 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +321 -204
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +442 -259
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +3 -3
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/hook.js +67 -40
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/render/index.js +24 -2
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/table.js +3 -3
- package/lib/table/src/table.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 +243 -153
- package/packages/table/module/custom/panel.ts +3 -3
- package/packages/table/module/export/hook.ts +51 -30
- package/packages/table/render/index.ts +12 -2
- package/packages/table/src/table.ts +17 -3
- /package/es/{iconfont.1785242738274.ttf → iconfont.1786329229929.ttf} +0 -0
- /package/es/{iconfont.1785242738274.woff → iconfont.1786329229929.woff} +0 -0
- /package/es/{iconfont.1785242738274.woff2 → iconfont.1786329229929.woff2} +0 -0
- /package/lib/{iconfont.1785242738274.ttf → iconfont.1786329229929.ttf} +0 -0
- /package/lib/{iconfont.1785242738274.woff → iconfont.1786329229929.woff} +0 -0
- /package/lib/{iconfont.1785242738274.woff2 → iconfont.1786329229929.woff2} +0 -0
|
@@ -1219,7 +1219,7 @@ export default defineVxeComponent({
|
|
|
1219
1219
|
}, VxeUIRadioGroupComponent
|
|
1220
1220
|
? [
|
|
1221
1221
|
h(VxeUIRadioGroupComponent, {
|
|
1222
|
-
modelValue: column.renderAlign || '',
|
|
1222
|
+
modelValue: column.renderAlign || 'left',
|
|
1223
1223
|
type: 'button',
|
|
1224
1224
|
strict: false,
|
|
1225
1225
|
disabled: isHidden,
|
|
@@ -1240,7 +1240,7 @@ export default defineVxeComponent({
|
|
|
1240
1240
|
: (VxeUIRadioGroupComponent
|
|
1241
1241
|
? [
|
|
1242
1242
|
h(VxeUIRadioGroupComponent, {
|
|
1243
|
-
modelValue: column.renderHeaderAlign || '',
|
|
1243
|
+
modelValue: column.renderHeaderAlign || 'left',
|
|
1244
1244
|
type: 'button',
|
|
1245
1245
|
strict: false,
|
|
1246
1246
|
disabled: isHidden,
|
|
@@ -1261,7 +1261,7 @@ export default defineVxeComponent({
|
|
|
1261
1261
|
: (VxeUIRadioGroupComponent
|
|
1262
1262
|
? [
|
|
1263
1263
|
h(VxeUIRadioGroupComponent, {
|
|
1264
|
-
modelValue: column.renderFooterAlign || '',
|
|
1264
|
+
modelValue: column.renderFooterAlign || 'left',
|
|
1265
1265
|
type: 'button',
|
|
1266
1266
|
strict: false,
|
|
1267
1267
|
disabled: isHidden,
|
|
@@ -1588,15 +1588,17 @@ hooks.add('tableExportModule', {
|
|
|
1588
1588
|
const { computeProxyOpts } = $xeGGWrapper.getComputeMaps();
|
|
1589
1589
|
const proxyOpts = computeProxyOpts.value;
|
|
1590
1590
|
const { sortData } = gridReactData;
|
|
1591
|
-
const { beforeQueryAll, afterQueryAll, ajax = {} } = proxyOpts;
|
|
1591
|
+
const { beforeQueryAll: oldBeforeQueryAll, afterQueryAll: oldAfterQueryAll, ajax = {} } = proxyOpts;
|
|
1592
1592
|
const resConfigs = proxyOpts.response || proxyOpts.props || {};
|
|
1593
|
-
const
|
|
1594
|
-
const
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1593
|
+
const beforeQueryAllMethod = ajax.beforeQueryAll;
|
|
1594
|
+
const queryAllMethod = ajax.queryAll;
|
|
1595
|
+
const afterQueryAllMethod = ajax.afterQueryAll;
|
|
1596
|
+
const queryAllSuccessMethod = ajax.queryAllSuccess;
|
|
1597
|
+
const queryAllErrorMethod = ajax.queryAllError;
|
|
1598
|
+
if (!queryAllMethod) {
|
|
1597
1599
|
errLog('vxe.error.notFunc', ['proxy-config.ajax.queryAll']);
|
|
1598
1600
|
}
|
|
1599
|
-
if (
|
|
1601
|
+
if (queryAllMethod) {
|
|
1600
1602
|
const params = {
|
|
1601
1603
|
$table: $xeTable,
|
|
1602
1604
|
$grid: $xeGrid,
|
|
@@ -1607,37 +1609,55 @@ hooks.add('tableExportModule', {
|
|
|
1607
1609
|
form: gridReactData.formData,
|
|
1608
1610
|
options: handleOptions
|
|
1609
1611
|
};
|
|
1610
|
-
|
|
1611
|
-
.
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
if (XEUtils.isFunction(listProp)) {
|
|
1616
|
-
tdData = listProp({ data: rest, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
1612
|
+
const handleQueryAll = () => {
|
|
1613
|
+
return Promise.resolve((oldBeforeQueryAll || queryAllMethod)(params))
|
|
1614
|
+
.then((rest) => {
|
|
1615
|
+
if (afterQueryAllMethod) {
|
|
1616
|
+
afterQueryAllMethod(Object.assign(Object.assign({}, params), { response: rest, status: 'success' }));
|
|
1617
1617
|
}
|
|
1618
1618
|
else {
|
|
1619
|
-
|
|
1619
|
+
const listProp = resConfigs.list;
|
|
1620
|
+
let tdData = [];
|
|
1621
|
+
if (listProp) {
|
|
1622
|
+
if (XEUtils.isFunction(listProp)) {
|
|
1623
|
+
tdData = listProp({ data: rest, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
1624
|
+
}
|
|
1625
|
+
else {
|
|
1626
|
+
tdData = XEUtils.isArray(rest) ? rest : XEUtils.get(rest, listProp);
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
else {
|
|
1630
|
+
if (XEUtils.isArray(rest)) {
|
|
1631
|
+
tdData = rest;
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
handleOptions.data = tdData;
|
|
1635
|
+
if (oldAfterQueryAll) {
|
|
1636
|
+
oldAfterQueryAll(Object.assign(Object.assign({}, params), { response: rest }));
|
|
1637
|
+
}
|
|
1620
1638
|
}
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
if (XEUtils.isArray(rest)) {
|
|
1624
|
-
tdData = rest;
|
|
1639
|
+
if (queryAllSuccessMethod) {
|
|
1640
|
+
queryAllSuccessMethod(Object.assign(Object.assign({}, params), { response: rest }));
|
|
1625
1641
|
}
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1642
|
+
return handleExport(handleOptions);
|
|
1643
|
+
})
|
|
1644
|
+
.catch((rest) => {
|
|
1645
|
+
if (afterQueryAllMethod) {
|
|
1646
|
+
afterQueryAllMethod(Object.assign(Object.assign({}, params), { response: rest, status: 'error' }));
|
|
1647
|
+
}
|
|
1648
|
+
if (queryAllErrorMethod) {
|
|
1649
|
+
queryAllErrorMethod(Object.assign(Object.assign({}, params), { response: rest }));
|
|
1650
|
+
}
|
|
1651
|
+
});
|
|
1652
|
+
};
|
|
1653
|
+
if (beforeQueryAllMethod) {
|
|
1654
|
+
return Promise.resolve(beforeQueryAllMethod(params)).then(status => {
|
|
1655
|
+
if (status !== false) {
|
|
1656
|
+
return handleQueryAll();
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1660
|
+
return handleQueryAll();
|
|
1641
1661
|
}
|
|
1642
1662
|
}
|
|
1643
1663
|
}
|
package/es/table/render/index.js
CHANGED
|
@@ -844,7 +844,12 @@ renderer.mixin({
|
|
|
844
844
|
},
|
|
845
845
|
FormatNumberInput: {
|
|
846
846
|
renderTableDefault: handleNumberCell,
|
|
847
|
-
tableFilterDefaultMethod
|
|
847
|
+
tableFilterDefaultMethod({ option, row, column }) {
|
|
848
|
+
const { data } = option;
|
|
849
|
+
const cellValue = XEUtils.get(row, column.field);
|
|
850
|
+
/* eslint-disable eqeqeq */
|
|
851
|
+
return cellValue == data;
|
|
852
|
+
},
|
|
848
853
|
tableExportMethod(params) {
|
|
849
854
|
const { row, column } = params;
|
|
850
855
|
const cellValue = XEUtils.get(row, column.field);
|
|
@@ -896,7 +901,12 @@ renderer.mixin({
|
|
|
896
901
|
createTableFilterOptions: defaultFilterOptions,
|
|
897
902
|
renderTableFilter: defaultFilterRender,
|
|
898
903
|
renderTableFloatingFilter: defaultFloatingFilterRender,
|
|
899
|
-
tableFilterDefaultMethod
|
|
904
|
+
tableFilterDefaultMethod({ option, row, column }) {
|
|
905
|
+
const { data } = option;
|
|
906
|
+
const cellValue = XEUtils.get(row, column.field);
|
|
907
|
+
/* eslint-disable eqeqeq */
|
|
908
|
+
return cellValue == data;
|
|
909
|
+
},
|
|
900
910
|
tableExportMethod(params) {
|
|
901
911
|
const { row, column } = params;
|
|
902
912
|
const cellValue = XEUtils.get(row, column.field);
|
package/es/table/src/table.js
CHANGED
|
@@ -3438,7 +3438,7 @@ export default defineVxeComponent({
|
|
|
3438
3438
|
return;
|
|
3439
3439
|
}
|
|
3440
3440
|
internalData.rsePending = true;
|
|
3441
|
-
handleLazyRecalculate(
|
|
3441
|
+
handleLazyRecalculate(true, true, true, {
|
|
3442
3442
|
minRunDelay: 200
|
|
3443
3443
|
}).then(() => {
|
|
3444
3444
|
internalData.rsePending = false;
|
|
@@ -5377,6 +5377,18 @@ export default defineVxeComponent({
|
|
|
5377
5377
|
}
|
|
5378
5378
|
const { editConfig } = props;
|
|
5379
5379
|
const { formatter, editRender, cellRender } = column;
|
|
5380
|
+
let etOpSize = null;
|
|
5381
|
+
let etOgSize = null;
|
|
5382
|
+
let clOpSize = null;
|
|
5383
|
+
let clOgSize = null;
|
|
5384
|
+
if (editRender) {
|
|
5385
|
+
etOpSize = editRender.options ? editRender.options.length : 0;
|
|
5386
|
+
etOgSize = editRender.optionGroups ? editRender.optionGroups.length : 0;
|
|
5387
|
+
}
|
|
5388
|
+
if (cellRender) {
|
|
5389
|
+
clOpSize = cellRender.options ? cellRender.options.length : 0;
|
|
5390
|
+
clOgSize = cellRender.optionGroups ? cellRender.optionGroups.length : 0;
|
|
5391
|
+
}
|
|
5380
5392
|
// formatter > tableCellFormatter
|
|
5381
5393
|
const renderOpts = formatter ? null : (editConfig && isEnableConf(editRender) ? editRender : (isEnableConf(cellRender) ? cellRender : null));
|
|
5382
5394
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
|
|
@@ -5395,7 +5407,8 @@ export default defineVxeComponent({
|
|
|
5395
5407
|
formatData = fullAllDataRowIdData[rowid].formatData = {};
|
|
5396
5408
|
}
|
|
5397
5409
|
if (rowRest && formatData[colid]) {
|
|
5398
|
-
|
|
5410
|
+
const ftValue = formatData[colid].value;
|
|
5411
|
+
if (ftValue && ftValue[0] === cellValue && ftValue[1] === etOpSize && ftValue[2] === etOgSize && ftValue[3] === clOpSize && ftValue[4] === clOgSize) {
|
|
5399
5412
|
return formatData[colid].label;
|
|
5400
5413
|
}
|
|
5401
5414
|
}
|
|
@@ -5427,7 +5440,8 @@ export default defineVxeComponent({
|
|
|
5427
5440
|
cellLabel = tcFormatter(renderOpts, formatParams);
|
|
5428
5441
|
}
|
|
5429
5442
|
if (formatData) {
|
|
5430
|
-
|
|
5443
|
+
const ftValue = [cellValue, etOpSize, etOgSize, clOpSize, clOgSize];
|
|
5444
|
+
formatData[colid] = { value: ftValue, label: cellLabel };
|
|
5431
5445
|
}
|
|
5432
5446
|
}
|
|
5433
5447
|
return cellLabel;
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
const { log } = VxeUI;
|
|
3
|
-
const tableVersion = `table v${"4.20.
|
|
3
|
+
const tableVersion = `table v${"4.20.11"}`;
|
|
4
4
|
export function createComponentLog(name) {
|
|
5
5
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
6
6
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|