vxe-table 3.22.9 → 3.22.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/es/grid/src/grid.js +251 -165
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +3 -3
- package/es/table/module/export/mixin.js +53 -33
- package/es/table/render/index.js +12 -2
- package/es/table/src/methods.js +16 -2
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +319 -209
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +438 -263
- 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/mixin.js +67 -40
- package/lib/table/module/export/mixin.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/methods.js +2 -2
- package/lib/table/src/methods.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 +239 -157
- package/packages/table/module/custom/panel.ts +3 -3
- package/packages/table/module/export/mixin.ts +51 -30
- package/packages/table/render/index.ts +12 -2
- package/packages/table/src/methods.ts +16 -2
- /package/es/{iconfont.1785242725062.ttf → iconfont.1786329223308.ttf} +0 -0
- /package/es/{iconfont.1785242725062.woff → iconfont.1786329223308.woff} +0 -0
- /package/es/{iconfont.1785242725062.woff2 → iconfont.1786329223308.woff2} +0 -0
- /package/lib/{iconfont.1785242725062.ttf → iconfont.1786329223308.ttf} +0 -0
- /package/lib/{iconfont.1785242725062.woff → iconfont.1786329223308.woff} +0 -0
- /package/lib/{iconfont.1785242725062.woff2 → iconfont.1786329223308.woff2} +0 -0
|
@@ -1433,7 +1433,7 @@ export default {
|
|
|
1433
1433
|
? [
|
|
1434
1434
|
h(VxeUIRadioGroupComponent, {
|
|
1435
1435
|
props: {
|
|
1436
|
-
value: column.renderAlign || '',
|
|
1436
|
+
value: column.renderAlign || 'left',
|
|
1437
1437
|
type: 'button',
|
|
1438
1438
|
strict: false,
|
|
1439
1439
|
disabled: isHidden,
|
|
@@ -1458,7 +1458,7 @@ export default {
|
|
|
1458
1458
|
? [
|
|
1459
1459
|
h(VxeUIRadioGroupComponent, {
|
|
1460
1460
|
props: {
|
|
1461
|
-
value: column.renderHeaderAlign || '',
|
|
1461
|
+
value: column.renderHeaderAlign || 'left',
|
|
1462
1462
|
type: 'button',
|
|
1463
1463
|
strict: false,
|
|
1464
1464
|
disabled: isHidden,
|
|
@@ -1483,7 +1483,7 @@ export default {
|
|
|
1483
1483
|
? [
|
|
1484
1484
|
h(VxeUIRadioGroupComponent, {
|
|
1485
1485
|
props: {
|
|
1486
|
-
value: column.renderFooterAlign || '',
|
|
1486
|
+
value: column.renderFooterAlign || 'left',
|
|
1487
1487
|
type: 'button',
|
|
1488
1488
|
strict: false,
|
|
1489
1489
|
disabled: isHidden,
|
|
@@ -1607,15 +1607,17 @@ export default {
|
|
|
1607
1607
|
const gridReactData = $xeGGWrapper.reactData;
|
|
1608
1608
|
const proxyOpts = $xeGGWrapper.computeProxyOpts;
|
|
1609
1609
|
const { sortData } = gridReactData;
|
|
1610
|
-
const { beforeQueryAll, afterQueryAll, ajax = {} } = proxyOpts;
|
|
1610
|
+
const { beforeQueryAll: oldBeforeQueryAll, afterQueryAll: oldAfterQueryAll, ajax = {} } = proxyOpts;
|
|
1611
1611
|
const resConfigs = proxyOpts.response || proxyOpts.props || {};
|
|
1612
|
-
const
|
|
1613
|
-
const
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1612
|
+
const beforeQueryAllMethod = ajax.beforeQueryAll;
|
|
1613
|
+
const queryAllMethod = ajax.queryAll;
|
|
1614
|
+
const afterQueryAllMethod = ajax.afterQueryAll;
|
|
1615
|
+
const queryAllSuccessMethod = ajax.queryAllSuccess;
|
|
1616
|
+
const queryAllErrorMethod = ajax.queryAllError;
|
|
1617
|
+
if (!queryAllMethod) {
|
|
1616
1618
|
errLog('vxe.error.notFunc', ['proxy-config.ajax.queryAll']);
|
|
1617
1619
|
}
|
|
1618
|
-
if (
|
|
1620
|
+
if (queryAllMethod) {
|
|
1619
1621
|
const params = {
|
|
1620
1622
|
$table: $xeTable,
|
|
1621
1623
|
$grid: $xeGrid,
|
|
@@ -1626,37 +1628,55 @@ export default {
|
|
|
1626
1628
|
form: gridReactData.formData,
|
|
1627
1629
|
options: handleOptions
|
|
1628
1630
|
};
|
|
1629
|
-
|
|
1630
|
-
.
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
if (XEUtils.isFunction(listProp)) {
|
|
1635
|
-
tdData = listProp({ data: rest, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
1631
|
+
const handleQueryAll = () => {
|
|
1632
|
+
return Promise.resolve((oldBeforeQueryAll || queryAllMethod)(params))
|
|
1633
|
+
.then((rest) => {
|
|
1634
|
+
if (afterQueryAllMethod) {
|
|
1635
|
+
afterQueryAllMethod(Object.assign(Object.assign({}, params), { response: rest, status: 'success' }));
|
|
1636
1636
|
}
|
|
1637
1637
|
else {
|
|
1638
|
-
|
|
1638
|
+
const listProp = resConfigs.list;
|
|
1639
|
+
let tdData = [];
|
|
1640
|
+
if (listProp) {
|
|
1641
|
+
if (XEUtils.isFunction(listProp)) {
|
|
1642
|
+
tdData = listProp({ data: rest, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
1643
|
+
}
|
|
1644
|
+
else {
|
|
1645
|
+
tdData = XEUtils.isArray(rest) ? rest : XEUtils.get(rest, listProp);
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
else {
|
|
1649
|
+
if (XEUtils.isArray(rest)) {
|
|
1650
|
+
tdData = rest;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
handleOptions.data = tdData;
|
|
1654
|
+
if (oldAfterQueryAll) {
|
|
1655
|
+
oldAfterQueryAll(Object.assign(Object.assign({}, params), { response: rest }));
|
|
1656
|
+
}
|
|
1639
1657
|
}
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
if (XEUtils.isArray(rest)) {
|
|
1643
|
-
tdData = rest;
|
|
1658
|
+
if (queryAllSuccessMethod) {
|
|
1659
|
+
queryAllSuccessMethod(Object.assign(Object.assign({}, params), { response: rest }));
|
|
1644
1660
|
}
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1661
|
+
return handleExport($xeTable, handleOptions);
|
|
1662
|
+
})
|
|
1663
|
+
.catch((rest) => {
|
|
1664
|
+
if (afterQueryAllMethod) {
|
|
1665
|
+
afterQueryAllMethod(Object.assign(Object.assign({}, params), { response: rest, status: 'error' }));
|
|
1666
|
+
}
|
|
1667
|
+
if (queryAllErrorMethod) {
|
|
1668
|
+
queryAllErrorMethod(Object.assign(Object.assign({}, params), { response: rest }));
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
};
|
|
1672
|
+
if (beforeQueryAllMethod) {
|
|
1673
|
+
return Promise.resolve(beforeQueryAllMethod(params)).then(status => {
|
|
1674
|
+
if (status !== false) {
|
|
1675
|
+
return handleQueryAll();
|
|
1676
|
+
}
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1679
|
+
return handleQueryAll();
|
|
1660
1680
|
}
|
|
1661
1681
|
}
|
|
1662
1682
|
}
|
package/es/table/render/index.js
CHANGED
|
@@ -909,7 +909,12 @@ renderer.mixin({
|
|
|
909
909
|
},
|
|
910
910
|
FormatNumberInput: {
|
|
911
911
|
renderTableDefault: handleNumberCell,
|
|
912
|
-
tableFilterDefaultMethod
|
|
912
|
+
tableFilterDefaultMethod({ option, row, column }) {
|
|
913
|
+
const { data } = option;
|
|
914
|
+
const cellValue = XEUtils.get(row, column.field);
|
|
915
|
+
/* eslint-disable eqeqeq */
|
|
916
|
+
return cellValue == data;
|
|
917
|
+
},
|
|
913
918
|
tableExportMethod(params) {
|
|
914
919
|
const { row, column } = params;
|
|
915
920
|
const cellValue = XEUtils.get(row, column.field);
|
|
@@ -961,7 +966,12 @@ renderer.mixin({
|
|
|
961
966
|
createTableFilterOptions: defaultFilterOptions,
|
|
962
967
|
renderTableFilter: defaultFilterRender,
|
|
963
968
|
renderTableFloatingFilter: defaultFloatingFilterRender,
|
|
964
|
-
tableFilterDefaultMethod
|
|
969
|
+
tableFilterDefaultMethod({ option, row, column }) {
|
|
970
|
+
const { data } = option;
|
|
971
|
+
const cellValue = XEUtils.get(row, column.field);
|
|
972
|
+
/* eslint-disable eqeqeq */
|
|
973
|
+
return cellValue == data;
|
|
974
|
+
},
|
|
965
975
|
tableExportMethod(params) {
|
|
966
976
|
const { row, column } = params;
|
|
967
977
|
const cellValue = XEUtils.get(row, column.field);
|
package/es/table/src/methods.js
CHANGED
|
@@ -5512,6 +5512,18 @@ const tableMethods = {
|
|
|
5512
5512
|
}
|
|
5513
5513
|
const { editConfig } = props;
|
|
5514
5514
|
const { formatter, editRender, cellRender } = column;
|
|
5515
|
+
let etOpSize = null;
|
|
5516
|
+
let etOgSize = null;
|
|
5517
|
+
let clOpSize = null;
|
|
5518
|
+
let clOgSize = null;
|
|
5519
|
+
if (editRender) {
|
|
5520
|
+
etOpSize = editRender.options ? editRender.options.length : 0;
|
|
5521
|
+
etOgSize = editRender.optionGroups ? editRender.optionGroups.length : 0;
|
|
5522
|
+
}
|
|
5523
|
+
if (cellRender) {
|
|
5524
|
+
clOpSize = cellRender.options ? cellRender.options.length : 0;
|
|
5525
|
+
clOgSize = cellRender.optionGroups ? cellRender.optionGroups.length : 0;
|
|
5526
|
+
}
|
|
5515
5527
|
// formatter > tableCellFormatter
|
|
5516
5528
|
const renderOpts = formatter ? null : (editConfig && isEnableConf(editRender) ? editRender : (isEnableConf(cellRender) ? cellRender : null));
|
|
5517
5529
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
|
|
@@ -5530,7 +5542,8 @@ const tableMethods = {
|
|
|
5530
5542
|
formatData = fullAllDataRowIdData[rowid].formatData = {};
|
|
5531
5543
|
}
|
|
5532
5544
|
if (rowRest && formatData[colid]) {
|
|
5533
|
-
|
|
5545
|
+
const ftValue = formatData[colid].value;
|
|
5546
|
+
if (ftValue && ftValue[0] === cellValue && ftValue[1] === etOpSize && ftValue[2] === etOgSize && ftValue[3] === clOpSize && ftValue[4] === clOgSize) {
|
|
5534
5547
|
return formatData[colid].label;
|
|
5535
5548
|
}
|
|
5536
5549
|
}
|
|
@@ -5562,7 +5575,8 @@ const tableMethods = {
|
|
|
5562
5575
|
cellLabel = tcFormatter(renderOpts, formatParams);
|
|
5563
5576
|
}
|
|
5564
5577
|
if (formatData) {
|
|
5565
|
-
|
|
5578
|
+
const ftValue = [cellValue, etOpSize, etOgSize, clOpSize, clOgSize];
|
|
5579
|
+
formatData[colid] = { value: ftValue, label: cellLabel };
|
|
5566
5580
|
}
|
|
5567
5581
|
}
|
|
5568
5582
|
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${"3.22.
|
|
3
|
+
const tableVersion = `table v${"3.22.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}` : '';
|