vxe-table 4.2.8 → 4.3.0-beta.2
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/src/button.js +14 -14
- package/es/button/style.css +1 -58
- package/es/checkbox/src/checkbox.js +7 -4
- package/es/checkbox/style.css +37 -58
- package/es/edit/src/hook.js +29 -13
- package/es/export/src/export-panel.js +10 -20
- package/es/export/src/hook.js +45 -45
- package/es/export/src/import-panel.js +2 -2
- package/es/export/src/util.js +7 -7
- package/es/export/style.css +27 -82
- package/es/filter/src/hook.js +5 -5
- package/es/filter/src/panel.js +9 -17
- package/es/filter/style.css +27 -79
- package/es/footer/src/footer.js +15 -15
- package/es/form/src/form-config-item.js +8 -7
- package/es/form/src/form-item.js +8 -7
- package/es/form/src/form.js +8 -6
- package/es/form/style.css +0 -3
- package/es/grid/src/grid.js +18 -13
- package/es/grid/style.css +1 -1
- package/es/header/src/header.js +18 -18
- package/es/header/style.css +0 -95
- package/es/icon/style.css +379 -0
- package/es/input/src/input.js +26 -26
- package/es/input/style.css +13 -4
- package/es/keyboard/src/hook.js +7 -7
- package/es/list/src/list.js +5 -5
- package/es/loading/src/loading.js +1 -1
- package/es/menu/src/hooks.js +9 -9
- package/es/menu/src/panel.js +2 -2
- package/es/modal/src/modal.js +52 -51
- package/es/modal/style.css +2 -3
- package/es/pager/src/pager.js +3 -3
- package/es/pager/style.css +4 -2
- package/es/pulldown/src/pulldown.js +7 -7
- package/es/radio/src/button.js +1 -1
- package/es/radio/src/radio.js +5 -4
- package/es/radio/style.css +32 -55
- package/es/select/src/select.js +13 -12
- package/es/select/style.css +1 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/src/switch.js +1 -1
- package/es/table/src/body.js +38 -34
- package/es/table/src/cell.js +16 -28
- package/es/table/src/columnInfo.js +4 -4
- package/es/table/src/table.js +65 -60
- package/es/table/src/util.js +2 -2
- package/es/table/style.css +160 -139
- package/es/textarea/src/textarea.js +5 -5
- package/es/toolbar/src/toolbar.js +17 -24
- package/es/toolbar/style.css +28 -80
- package/es/tools/dom.js +2 -2
- package/es/tools/log.js +1 -1
- package/es/tools/vn.js +7 -0
- package/es/tooltip/src/tooltip.js +22 -10
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/src/conf.js +43 -38
- package/es/v-x-e-table/src/interceptor.js +1 -1
- package/es/v-x-e-table/src/renderer.js +19 -15
- package/es/v-x-e-table/style.css +405 -2
- package/lib/button/src/button.js +10 -10
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +1 -58
- package/lib/button/style/style.min.css +1 -1
- package/lib/checkbox/src/checkbox.js +5 -3
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/style/style.css +37 -58
- package/lib/checkbox/style/style.min.css +1 -1
- package/lib/edit/src/hook.js +14 -13
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/export/src/export-panel.js +11 -17
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/src/hook.js +50 -50
- package/lib/export/src/hook.min.js +1 -1
- package/lib/export/src/import-panel.js +3 -3
- package/lib/export/src/import-panel.min.js +1 -1
- package/lib/export/src/util.js +4 -4
- package/lib/export/src/util.min.js +1 -1
- package/lib/export/style/style.css +27 -82
- package/lib/export/style/style.min.css +1 -1
- package/lib/filter/src/hook.js +5 -5
- package/lib/filter/src/hook.min.js +1 -1
- package/lib/filter/src/panel.js +11 -15
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/filter/style/style.css +27 -79
- package/lib/filter/style/style.min.css +1 -1
- package/lib/footer/src/footer.js +14 -14
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/src/form-config-item.js +9 -7
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-item.js +9 -7
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +9 -6
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +0 -3
- package/lib/form/style/style.min.css +1 -1
- package/lib/grid/src/grid.js +17 -13
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +1 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/header/src/header.js +17 -17
- package/lib/header/src/header.min.js +1 -1
- package/lib/header/style/style.css +0 -95
- package/lib/header/style/style.min.css +0 -1
- package/lib/icon/style/style.css +379 -0
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +163 -159
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +23 -23
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/style/style.css +13 -4
- package/lib/input/style/style.min.css +1 -1
- package/lib/keyboard/src/hook.js +7 -7
- package/lib/keyboard/src/hook.min.js +1 -1
- package/lib/list/src/list.js +5 -5
- package/lib/list/src/list.min.js +1 -1
- package/lib/loading/src/loading.js +1 -1
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/menu/src/hooks.js +9 -9
- package/lib/menu/src/hooks.min.js +1 -1
- package/lib/menu/src/panel.js +2 -2
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/modal/src/modal.js +55 -53
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +2 -3
- package/lib/modal/style/style.min.css +1 -1
- package/lib/pager/src/pager.js +2 -2
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pager/style/style.css +4 -2
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/src/pulldown.js +7 -7
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/radio/src/button.js +1 -1
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/radio.js +4 -4
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/radio/style/style.css +32 -55
- package/lib/radio/style/style.min.css +1 -1
- package/lib/select/src/select.js +14 -12
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +1 -0
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/src/switch.js +1 -1
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/table/src/body.js +36 -34
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +21 -29
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +4 -4
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +65 -61
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +2 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +160 -139
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/src/textarea.js +6 -6
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +20 -22
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +28 -80
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/dom.js +2 -2
- package/lib/tools/dom.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/vn.js +13 -0
- package/lib/tools/vn.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +22 -8
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +43 -38
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/src/interceptor.js +1 -1
- package/lib/v-x-e-table/src/interceptor.min.js +1 -1
- package/lib/v-x-e-table/src/renderer.js +18 -16
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +405 -2
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/package.json +6 -6
- package/packages/checkbox/src/checkbox.ts +7 -4
- package/packages/edit/src/hook.ts +18 -6
- package/packages/export/src/export-panel.ts +9 -19
- package/packages/filter/src/panel.ts +8 -16
- package/packages/form/src/form-config-item.ts +4 -3
- package/packages/form/src/form-item.ts +4 -3
- package/packages/form/src/form.ts +6 -4
- package/packages/grid/src/grid.ts +2 -1
- package/packages/input/src/input.ts +3 -3
- package/packages/modal/src/modal.ts +5 -4
- package/packages/radio/src/radio.ts +4 -3
- package/packages/select/src/select.ts +2 -1
- package/packages/table/src/cell.ts +18 -35
- package/packages/table/src/table.ts +11 -10
- package/packages/toolbar/src/toolbar.ts +14 -21
- package/packages/tools/vn.ts +10 -0
- package/packages/tooltip/src/tooltip.ts +8 -4
- package/packages/v-x-e-table/src/conf.ts +43 -38
- package/styles/base/checked.scss +44 -148
- package/styles/button.scss +1 -43
- package/styles/checkbox.scss +6 -65
- package/styles/export.scss +2 -9
- package/styles/filter.scss +2 -6
- package/styles/form.scss +0 -3
- package/styles/header.scss +0 -134
- package/styles/icon.scss +509 -713
- package/styles/input.scss +8 -0
- package/styles/modal.scss +0 -1
- package/styles/old-icon.scss +713 -0
- package/styles/pager.scss +2 -0
- package/styles/radio.scss +9 -77
- package/styles/select.scss +1 -0
- package/styles/table.scss +144 -21
- package/styles/toolbar.scss +2 -6
- package/styles/variable.scss +5 -5
- package/types/all.d.ts +6 -0
- package/types/column.d.ts +11 -11
- package/types/component.d.ts +3 -1
- package/types/form-item.d.ts +1 -0
- package/types/form.d.ts +6 -2
- package/types/grid.d.ts +4 -4
- package/types/table.d.ts +2 -2
- package/types/v-x-e-table/renderer.d.ts +3 -2
package/lib/table/src/table.js
CHANGED
|
@@ -39,6 +39,8 @@ var _index = _interopRequireDefault(require("../../loading/index"));
|
|
|
39
39
|
|
|
40
40
|
var _util = require("./util");
|
|
41
41
|
|
|
42
|
+
var _vn = require("../../tools/vn");
|
|
43
|
+
|
|
42
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
45
|
|
|
44
46
|
var __assign = void 0 && (void 0).__assign || function () {
|
|
@@ -57,12 +59,14 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
57
59
|
return __assign.apply(this, arguments);
|
|
58
60
|
};
|
|
59
61
|
|
|
60
|
-
var __spreadArray = void 0 && (void 0).__spreadArray || function (to, from) {
|
|
61
|
-
for (var i = 0,
|
|
62
|
-
|
|
62
|
+
var __spreadArray = void 0 && (void 0).__spreadArray || function (to, from, pack) {
|
|
63
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
64
|
+
if (ar || !(i in from)) {
|
|
65
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
66
|
+
ar[i] = from[i];
|
|
67
|
+
}
|
|
63
68
|
}
|
|
64
|
-
|
|
65
|
-
return to;
|
|
69
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
66
70
|
};
|
|
67
71
|
|
|
68
72
|
var isWebkit = _dom.browse['-webkit'] && !_dom.browse.edge;
|
|
@@ -1660,8 +1664,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1660
1664
|
var bodyWrapperElem = bodyWrapperRef ? bodyWrapperRef.value : null;
|
|
1661
1665
|
|
|
1662
1666
|
if (emptyPlaceholderElem) {
|
|
1663
|
-
emptyPlaceholderElem.style.top = headerHeight
|
|
1664
|
-
emptyPlaceholderElem.style.height = bodyWrapperElem ? bodyWrapperElem.offsetHeight - scrollbarHeight
|
|
1667
|
+
emptyPlaceholderElem.style.top = "".concat(headerHeight, "px");
|
|
1668
|
+
emptyPlaceholderElem.style.height = bodyWrapperElem ? "".concat(bodyWrapperElem.offsetHeight - scrollbarHeight, "px") : '';
|
|
1665
1669
|
}
|
|
1666
1670
|
|
|
1667
1671
|
if (customHeight > 0) {
|
|
@@ -1683,9 +1687,9 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1683
1687
|
}
|
|
1684
1688
|
|
|
1685
1689
|
layoutList.forEach(function (layout) {
|
|
1686
|
-
var wrapperRef = elemStore[name
|
|
1690
|
+
var wrapperRef = elemStore["".concat(name, "-").concat(layout, "-wrapper")];
|
|
1687
1691
|
var wrapperElem = wrapperRef ? wrapperRef.value : null;
|
|
1688
|
-
var tableRef = elemStore[name
|
|
1692
|
+
var tableRef = elemStore["".concat(name, "-").concat(layout, "-table")];
|
|
1689
1693
|
var tableElem = tableRef ? tableRef.value : null;
|
|
1690
1694
|
|
|
1691
1695
|
if (layout === 'header') {
|
|
@@ -1712,23 +1716,23 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1712
1716
|
}, 0);
|
|
1713
1717
|
|
|
1714
1718
|
if (tableElem) {
|
|
1715
|
-
tableElem.style.width = tWidth ? tWidth + scrollbarWidth
|
|
1719
|
+
tableElem.style.width = tWidth ? "".concat(tWidth + scrollbarWidth, "px") : ''; // 修复 IE 中高度无法自适应问题
|
|
1716
1720
|
|
|
1717
1721
|
if (_dom.browse.msie) {
|
|
1718
1722
|
_xeUtils.default.arrayEach(tableElem.querySelectorAll('.vxe-resizable'), function (resizeElem) {
|
|
1719
|
-
resizeElem.style.height = resizeElem.parentNode.offsetHeight
|
|
1723
|
+
resizeElem.style.height = "".concat(resizeElem.parentNode.offsetHeight, "px");
|
|
1720
1724
|
});
|
|
1721
1725
|
}
|
|
1722
1726
|
}
|
|
1723
1727
|
|
|
1724
|
-
var repairRef = elemStore[name
|
|
1728
|
+
var repairRef = elemStore["".concat(name, "-").concat(layout, "-repair")];
|
|
1725
1729
|
var repairElem = repairRef ? repairRef.value : null;
|
|
1726
1730
|
|
|
1727
1731
|
if (repairElem) {
|
|
1728
|
-
repairElem.style.width = tableWidth
|
|
1732
|
+
repairElem.style.width = "".concat(tableWidth, "px");
|
|
1729
1733
|
}
|
|
1730
1734
|
|
|
1731
|
-
var listRef = elemStore[name
|
|
1735
|
+
var listRef = elemStore["".concat(name, "-").concat(layout, "-list")];
|
|
1732
1736
|
var listElem = listRef ? listRef.value : null;
|
|
1733
1737
|
|
|
1734
1738
|
if (isGroup && listElem) {
|
|
@@ -1758,20 +1762,20 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1758
1762
|
});
|
|
1759
1763
|
}
|
|
1760
1764
|
|
|
1761
|
-
thElem.style.width = hasEllipsis ? childWidth_1 - countChild_1 - (border ? 2 : 0)
|
|
1765
|
+
thElem.style.width = hasEllipsis ? "".concat(childWidth_1 - countChild_1 - (border ? 2 : 0), "px") : '';
|
|
1762
1766
|
}
|
|
1763
1767
|
});
|
|
1764
1768
|
}
|
|
1765
1769
|
} else if (layout === 'body') {
|
|
1766
|
-
var emptyBlockRef = elemStore[name
|
|
1770
|
+
var emptyBlockRef = elemStore["".concat(name, "-").concat(layout, "-emptyBlock")];
|
|
1767
1771
|
var emptyBlockElem = emptyBlockRef ? emptyBlockRef.value : null;
|
|
1768
1772
|
|
|
1769
1773
|
if ((0, _dom.isNodeElement)(wrapperElem)) {
|
|
1770
1774
|
if (customMaxHeight) {
|
|
1771
|
-
wrapperElem.style.maxHeight = (fixedType ? customMaxHeight - headerHeight - (showFooter ? 0 : scrollbarHeight) : customMaxHeight - headerHeight
|
|
1775
|
+
wrapperElem.style.maxHeight = "".concat(fixedType ? customMaxHeight - headerHeight - (showFooter ? 0 : scrollbarHeight) : customMaxHeight - headerHeight, "px");
|
|
1772
1776
|
} else {
|
|
1773
1777
|
if (customHeight > 0) {
|
|
1774
|
-
wrapperElem.style.height = (fixedType ? (customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight) - (showFooter ? 0 : scrollbarHeight) : customHeight - headerHeight - footerHeight
|
|
1778
|
+
wrapperElem.style.height = "".concat(fixedType ? (customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight) - (showFooter ? 0 : scrollbarHeight) : customHeight - headerHeight - footerHeight, "px");
|
|
1775
1779
|
} else {
|
|
1776
1780
|
wrapperElem.style.height = '';
|
|
1777
1781
|
}
|
|
@@ -1781,13 +1785,13 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1781
1785
|
|
|
1782
1786
|
if (fixedWrapperElem) {
|
|
1783
1787
|
if ((0, _dom.isNodeElement)(wrapperElem)) {
|
|
1784
|
-
wrapperElem.style.top = headerHeight
|
|
1788
|
+
wrapperElem.style.top = "".concat(headerHeight, "px");
|
|
1785
1789
|
}
|
|
1786
1790
|
|
|
1787
|
-
fixedWrapperElem.style.height = (customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight) + headerHeight + footerHeight - scrollbarHeight * (showFooter ? 2 : 1)
|
|
1788
|
-
fixedWrapperElem.style.width = fixedColumn.reduce(function (previous, column) {
|
|
1791
|
+
fixedWrapperElem.style.height = "".concat((customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight) + headerHeight + footerHeight - scrollbarHeight * (showFooter ? 2 : 1), "px");
|
|
1792
|
+
fixedWrapperElem.style.width = "".concat(fixedColumn.reduce(function (previous, column) {
|
|
1789
1793
|
return previous + column.renderWidth;
|
|
1790
|
-
}, isFixedLeft ? 0 : scrollbarWidth)
|
|
1794
|
+
}, isFixedLeft ? 0 : scrollbarWidth), "px");
|
|
1791
1795
|
}
|
|
1792
1796
|
|
|
1793
1797
|
var tWidth = tableWidth; // 如果是使用优化模式
|
|
@@ -1809,13 +1813,13 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1809
1813
|
}, 0);
|
|
1810
1814
|
|
|
1811
1815
|
if (tableElem) {
|
|
1812
|
-
tableElem.style.width = tWidth ? tWidth
|
|
1816
|
+
tableElem.style.width = tWidth ? "".concat(tWidth, "px") : ''; // 兼容性处理
|
|
1813
1817
|
|
|
1814
|
-
tableElem.style.paddingRight = scrollbarWidth && fixedType && (_dom.browse['-moz'] || _dom.browse.safari) ? scrollbarWidth
|
|
1818
|
+
tableElem.style.paddingRight = scrollbarWidth && fixedType && (_dom.browse['-moz'] || _dom.browse.safari) ? "".concat(scrollbarWidth, "px") : '';
|
|
1815
1819
|
}
|
|
1816
1820
|
|
|
1817
1821
|
if (emptyBlockElem) {
|
|
1818
|
-
emptyBlockElem.style.width = tWidth ? tWidth
|
|
1822
|
+
emptyBlockElem.style.width = tWidth ? "".concat(tWidth, "px") : '';
|
|
1819
1823
|
}
|
|
1820
1824
|
} else if (layout === 'footer') {
|
|
1821
1825
|
var tWidth = tableWidth; // 如果是使用优化模式
|
|
@@ -1839,18 +1843,18 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1839
1843
|
if ((0, _dom.isNodeElement)(wrapperElem)) {
|
|
1840
1844
|
// 如果是固定列
|
|
1841
1845
|
if (fixedWrapperElem) {
|
|
1842
|
-
wrapperElem.style.top = (customHeight > 0 ? customHeight - footerHeight : tableHeight + headerHeight
|
|
1846
|
+
wrapperElem.style.top = "".concat(customHeight > 0 ? customHeight - footerHeight : tableHeight + headerHeight, "px");
|
|
1843
1847
|
}
|
|
1844
1848
|
|
|
1845
|
-
wrapperElem.style.marginTop = -Math.max(1, scrollbarHeight)
|
|
1849
|
+
wrapperElem.style.marginTop = "".concat(-Math.max(1, scrollbarHeight), "px");
|
|
1846
1850
|
}
|
|
1847
1851
|
|
|
1848
1852
|
if (tableElem) {
|
|
1849
|
-
tableElem.style.width = tWidth ? tWidth + scrollbarWidth
|
|
1853
|
+
tableElem.style.width = tWidth ? "".concat(tWidth + scrollbarWidth, "px") : '';
|
|
1850
1854
|
}
|
|
1851
1855
|
}
|
|
1852
1856
|
|
|
1853
|
-
var colgroupRef = elemStore[name
|
|
1857
|
+
var colgroupRef = elemStore["".concat(name, "-").concat(layout, "-colgroup")];
|
|
1854
1858
|
var colgroupElem = colgroupRef ? colgroupRef.value : null;
|
|
1855
1859
|
|
|
1856
1860
|
if (colgroupElem) {
|
|
@@ -1858,7 +1862,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1858
1862
|
var colid = colElem.getAttribute('name');
|
|
1859
1863
|
|
|
1860
1864
|
if (colid === 'col_gutter') {
|
|
1861
|
-
colElem.style.width = scrollbarWidth
|
|
1865
|
+
colElem.style.width = "".concat(scrollbarWidth, "px");
|
|
1862
1866
|
}
|
|
1863
1867
|
|
|
1864
1868
|
if (fullColumnIdData[colid]) {
|
|
@@ -1867,7 +1871,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1867
1871
|
showFooterOverflow = column_2.showFooterOverflow,
|
|
1868
1872
|
showOverflow = column_2.showOverflow;
|
|
1869
1873
|
var cellOverflow = void 0;
|
|
1870
|
-
colElem.style.width = column_2.renderWidth
|
|
1874
|
+
colElem.style.width = "".concat(column_2.renderWidth, "px");
|
|
1871
1875
|
|
|
1872
1876
|
if (layout === 'header') {
|
|
1873
1877
|
cellOverflow = _xeUtils.default.isUndefined(showHeaderOverflow) || _xeUtils.default.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
@@ -1881,7 +1885,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1881
1885
|
var showTitle = cellOverflow === 'title';
|
|
1882
1886
|
var showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
1883
1887
|
var hasEllipsis_1 = showTitle || showTooltip || showEllipsis;
|
|
1884
|
-
var listRef = elemStore[name
|
|
1888
|
+
var listRef = elemStore["".concat(name, "-").concat(layout, "-list")];
|
|
1885
1889
|
var listElem = listRef ? listRef.value : null; // 纵向虚拟滚动不支持动态行高
|
|
1886
1890
|
|
|
1887
1891
|
if (scrollYLoad && !hasEllipsis_1) {
|
|
@@ -1889,7 +1893,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1889
1893
|
}
|
|
1890
1894
|
|
|
1891
1895
|
if (listElem) {
|
|
1892
|
-
_xeUtils.default.arrayEach(listElem.querySelectorAll("."
|
|
1896
|
+
_xeUtils.default.arrayEach(listElem.querySelectorAll(".".concat(column_2.id)), function (elem) {
|
|
1893
1897
|
var colspan = parseInt(elem.getAttribute('colspan') || 1);
|
|
1894
1898
|
var cellElem = elem.querySelector('.vxe-cell');
|
|
1895
1899
|
var colWidth = column_2.renderWidth;
|
|
@@ -1907,7 +1911,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
1907
1911
|
}
|
|
1908
1912
|
}
|
|
1909
1913
|
|
|
1910
|
-
cellElem.style.width = hasEllipsis_1 ? colWidth - cellOffsetWidth * colspan
|
|
1914
|
+
cellElem.style.width = hasEllipsis_1 ? "".concat(colWidth - cellOffsetWidth * colspan, "px") : '';
|
|
1911
1915
|
}
|
|
1912
1916
|
});
|
|
1913
1917
|
}
|
|
@@ -2415,7 +2419,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
2415
2419
|
|
|
2416
2420
|
fullData.forEach(function (row) {
|
|
2417
2421
|
if (row[treeOpts.children] && row[treeOpts.children].length) {
|
|
2418
|
-
(0, _log.warnLog)('vxe.error.errConflicts', ['tree-config.transform', "row."
|
|
2422
|
+
(0, _log.warnLog)('vxe.error.errConflicts', ['tree-config.transform', "row.".concat(treeOpts.children)]);
|
|
2419
2423
|
}
|
|
2420
2424
|
});
|
|
2421
2425
|
}
|
|
@@ -3286,7 +3290,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
3286
3290
|
var treeOpts = computeTreeOpts.value;
|
|
3287
3291
|
|
|
3288
3292
|
var handleRrecord = function handleRrecord(record) {
|
|
3289
|
-
return (0, _vue.reactive)(tablePrivateMethods.defineField(
|
|
3293
|
+
return (0, _vue.reactive)(tablePrivateMethods.defineField(record || {}));
|
|
3290
3294
|
};
|
|
3291
3295
|
|
|
3292
3296
|
var rows = treeConfig ? _xeUtils.default.mapTree(records, handleRrecord, treeOpts) : records.map(handleRrecord);
|
|
@@ -4154,7 +4158,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
4154
4158
|
|
|
4155
4159
|
if (rowOpts.isCurrent || props.highlightCurrentRow) {
|
|
4156
4160
|
if (el) {
|
|
4157
|
-
_xeUtils.default.arrayEach(el.querySelectorAll("[rowid=\""
|
|
4161
|
+
_xeUtils.default.arrayEach(el.querySelectorAll("[rowid=\"".concat((0, _util.getRowid)($xetable, row), "\"]")), function (elem) {
|
|
4158
4162
|
return (0, _dom.addClass)(elem, 'row--current');
|
|
4159
4163
|
});
|
|
4160
4164
|
}
|
|
@@ -5175,7 +5179,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
5175
5179
|
if (isClear || // 如果点击了当前表格之外
|
|
5176
5180
|
!(0, _dom.getEventTargetNode)(evnt, el).flag) {
|
|
5177
5181
|
setTimeout(function () {
|
|
5178
|
-
return $xetable.
|
|
5182
|
+
return $xetable.clearEdit(evnt);
|
|
5179
5183
|
});
|
|
5180
5184
|
}
|
|
5181
5185
|
});
|
|
@@ -5267,7 +5271,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
5267
5271
|
// 如果是激活编辑状态,则取消编辑
|
|
5268
5272
|
if (actived.row) {
|
|
5269
5273
|
var params_1 = actived.args;
|
|
5270
|
-
$xetable.
|
|
5274
|
+
$xetable.clearEdit(evnt); // 如果配置了选中功能,则为选中状态
|
|
5271
5275
|
|
|
5272
5276
|
if (mouseOpts.selected) {
|
|
5273
5277
|
(0, _vue.nextTick)(function () {
|
|
@@ -5355,7 +5359,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
5355
5359
|
// 如果是激活编辑状态,则取消编辑
|
|
5356
5360
|
if (actived.row) {
|
|
5357
5361
|
var params_2 = actived.args;
|
|
5358
|
-
$xetable.
|
|
5362
|
+
$xetable.clearEdit(evnt); // 如果配置了选中功能,则为选中状态
|
|
5359
5363
|
|
|
5360
5364
|
if (mouseOpts.selected) {
|
|
5361
5365
|
(0, _vue.nextTick)(function () {
|
|
@@ -5394,7 +5398,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
5394
5398
|
// 如果是激活编辑状态,则取消编辑
|
|
5395
5399
|
if (actived.row) {
|
|
5396
5400
|
params = actived.args;
|
|
5397
|
-
$xetable.
|
|
5401
|
+
$xetable.clearEdit(evnt); // 如果配置了选中功能,则为选中状态
|
|
5398
5402
|
|
|
5399
5403
|
if (mouseOpts.selected) {
|
|
5400
5404
|
(0, _vue.nextTick)(function () {
|
|
@@ -5689,7 +5693,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
5689
5693
|
}
|
|
5690
5694
|
|
|
5691
5695
|
if (_xeUtils.default.isFunction(slotFunc)) {
|
|
5692
|
-
return slotFunc(params);
|
|
5696
|
+
return (0, _vn.getSlotVNs)(slotFunc(params));
|
|
5693
5697
|
}
|
|
5694
5698
|
}
|
|
5695
5699
|
|
|
@@ -5750,7 +5754,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
5750
5754
|
var field = column.field,
|
|
5751
5755
|
editRender = column.editRender;
|
|
5752
5756
|
|
|
5753
|
-
if (field && !_xeUtils.default.has(record, field)) {
|
|
5757
|
+
if (field && !_xeUtils.default.has(record, field) && !record[field]) {
|
|
5754
5758
|
var cellValue = null;
|
|
5755
5759
|
|
|
5756
5760
|
if (editRender) {
|
|
@@ -6155,7 +6159,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
6155
6159
|
_xeUtils.default.set(item, checkField, value);
|
|
6156
6160
|
|
|
6157
6161
|
_xeUtils.default.remove(treeIndeterminates, function (half) {
|
|
6158
|
-
return half
|
|
6162
|
+
return $xetable.eqRow(half, item);
|
|
6159
6163
|
});
|
|
6160
6164
|
|
|
6161
6165
|
handleCheckboxReserveRow(row, value);
|
|
@@ -6224,12 +6228,12 @@ var _default = (0, _vue.defineComponent)({
|
|
|
6224
6228
|
selection.push(item);
|
|
6225
6229
|
} else {
|
|
6226
6230
|
_xeUtils.default.remove(selection, function (select) {
|
|
6227
|
-
return select
|
|
6231
|
+
return $xetable.eqRow(select, item);
|
|
6228
6232
|
});
|
|
6229
6233
|
}
|
|
6230
6234
|
|
|
6231
6235
|
_xeUtils.default.remove(treeIndeterminates, function (half) {
|
|
6232
|
-
return half
|
|
6236
|
+
return $xetable.eqRow(half, item);
|
|
6233
6237
|
});
|
|
6234
6238
|
|
|
6235
6239
|
handleCheckboxReserveRow(row, value);
|
|
@@ -6806,7 +6810,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
6806
6810
|
var marginLeft = '';
|
|
6807
6811
|
|
|
6808
6812
|
if (scrollXLoad) {
|
|
6809
|
-
marginLeft = leftSpaceWidth
|
|
6813
|
+
marginLeft = "".concat(leftSpaceWidth, "px");
|
|
6810
6814
|
}
|
|
6811
6815
|
|
|
6812
6816
|
if (headerElem) {
|
|
@@ -6823,11 +6827,11 @@ var _default = (0, _vue.defineComponent)({
|
|
|
6823
6827
|
containerList.forEach(function (name) {
|
|
6824
6828
|
var layoutList = ['header', 'body', 'footer'];
|
|
6825
6829
|
layoutList.forEach(function (layout) {
|
|
6826
|
-
var xSpaceRef = elemStore[name
|
|
6830
|
+
var xSpaceRef = elemStore["".concat(name, "-").concat(layout, "-xSpace")];
|
|
6827
6831
|
var xSpaceElem = xSpaceRef ? xSpaceRef.value : null;
|
|
6828
6832
|
|
|
6829
6833
|
if (xSpaceElem) {
|
|
6830
|
-
xSpaceElem.style.width = scrollXLoad ? tableWidth + (layout === 'header' ? scrollbarWidth : 0)
|
|
6834
|
+
xSpaceElem.style.width = scrollXLoad ? "".concat(tableWidth + (layout === 'header' ? scrollbarWidth : 0), "px") : '';
|
|
6831
6835
|
}
|
|
6832
6836
|
});
|
|
6833
6837
|
});
|
|
@@ -6849,13 +6853,13 @@ var _default = (0, _vue.defineComponent)({
|
|
|
6849
6853
|
var ySpaceHeight = '';
|
|
6850
6854
|
|
|
6851
6855
|
if (scrollYLoad) {
|
|
6852
|
-
marginTop = topSpaceHeight
|
|
6853
|
-
ySpaceHeight = bodyHeight
|
|
6856
|
+
marginTop = "".concat(topSpaceHeight, "px");
|
|
6857
|
+
ySpaceHeight = "".concat(bodyHeight, "px");
|
|
6854
6858
|
}
|
|
6855
6859
|
|
|
6856
6860
|
containerList.forEach(function (name) {
|
|
6857
6861
|
var layoutList = ['header', 'body', 'footer'];
|
|
6858
|
-
var tableRef = elemStore[name
|
|
6862
|
+
var tableRef = elemStore["".concat(name, "-body-table")];
|
|
6859
6863
|
var tableElem = tableRef ? tableRef.value : null;
|
|
6860
6864
|
|
|
6861
6865
|
if (tableElem) {
|
|
@@ -6863,7 +6867,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
6863
6867
|
}
|
|
6864
6868
|
|
|
6865
6869
|
layoutList.forEach(function (layout) {
|
|
6866
|
-
var ySpaceRef = elemStore[name
|
|
6870
|
+
var ySpaceRef = elemStore["".concat(name, "-").concat(layout, "-ySpace")];
|
|
6867
6871
|
var ySpaceElem = ySpaceRef ? ySpaceRef.value : null;
|
|
6868
6872
|
|
|
6869
6873
|
if (ySpaceElem) {
|
|
@@ -6944,7 +6948,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
6944
6948
|
tablePrivateMethods.clearHoverRow();
|
|
6945
6949
|
|
|
6946
6950
|
if (el) {
|
|
6947
|
-
_xeUtils.default.arrayEach(el.querySelectorAll("[rowid=\""
|
|
6951
|
+
_xeUtils.default.arrayEach(el.querySelectorAll("[rowid=\"".concat(rowid, "\"]")), function (elem) {
|
|
6948
6952
|
return (0, _dom.addClass)(elem, 'row--hover');
|
|
6949
6953
|
});
|
|
6950
6954
|
}
|
|
@@ -6986,7 +6990,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
6986
6990
|
}
|
|
6987
6991
|
|
|
6988
6992
|
if (bodyElem) {
|
|
6989
|
-
return bodyElem.querySelector(".vxe-body--row[rowid=\""
|
|
6993
|
+
return bodyElem.querySelector(".vxe-body--row[rowid=\"".concat(rowid, "\"] .").concat(column.id));
|
|
6990
6994
|
}
|
|
6991
6995
|
|
|
6992
6996
|
return null;
|
|
@@ -7032,7 +7036,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
7032
7036
|
} else if (_xeUtils.default.isArray(formatter)) {
|
|
7033
7037
|
var globalFunc = _vXETable.VXETable.formats.get(formatter[0]);
|
|
7034
7038
|
|
|
7035
|
-
cellLabel = globalFunc ? globalFunc.apply(void 0, __spreadArray([formatParams], formatter.slice(1))) : '';
|
|
7039
|
+
cellLabel = globalFunc ? globalFunc.apply(void 0, __spreadArray([formatParams], formatter.slice(1), false)) : '';
|
|
7036
7040
|
} else {
|
|
7037
7041
|
cellLabel = formatter(formatParams);
|
|
7038
7042
|
}
|
|
@@ -7098,7 +7102,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
7098
7102
|
var fixedColumn = isFixedLeft ? columnStore.leftList : columnStore.rightList;
|
|
7099
7103
|
return (0, _vue.h)('div', {
|
|
7100
7104
|
ref: isFixedLeft ? refLeftContainer : refRightContainer,
|
|
7101
|
-
class: "vxe-table--fixed-"
|
|
7105
|
+
class: "vxe-table--fixed-".concat(fixedType, "-wrapper")
|
|
7102
7106
|
}, [showHeader ? (0, _vue.h)(_header.default, {
|
|
7103
7107
|
ref: isFixedLeft ? refTableLeftHeader : refTableRightHeader,
|
|
7104
7108
|
fixedType: fixedType,
|
|
@@ -7348,13 +7352,13 @@ var _default = (0, _vue.defineComponent)({
|
|
|
7348
7352
|
var importOpts = computeImportOpts.value;
|
|
7349
7353
|
|
|
7350
7354
|
if (importConfig && importOpts.types && !importOpts.importMethod && !_xeUtils.default.includeArrays(_vXETable.VXETable.config.importTypes, importOpts.types)) {
|
|
7351
|
-
(0, _log.warnLog)('vxe.error.errProp', ["export-config.types="
|
|
7355
|
+
(0, _log.warnLog)('vxe.error.errProp', ["export-config.types=".concat(importOpts.types.join(',')), importOpts.types.filter(function (type) {
|
|
7352
7356
|
return _xeUtils.default.includes(_vXETable.VXETable.config.importTypes, type);
|
|
7353
7357
|
}).join(',') || _vXETable.VXETable.config.importTypes.join(',')]);
|
|
7354
7358
|
}
|
|
7355
7359
|
|
|
7356
7360
|
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !_xeUtils.default.includeArrays(_vXETable.VXETable.config.exportTypes, exportOpts.types)) {
|
|
7357
|
-
(0, _log.warnLog)('vxe.error.errProp', ["export-config.types="
|
|
7361
|
+
(0, _log.warnLog)('vxe.error.errProp', ["export-config.types=".concat(exportOpts.types.join(',')), exportOpts.types.filter(function (type) {
|
|
7358
7362
|
return _xeUtils.default.includes(_vXETable.VXETable.config.exportTypes, type);
|
|
7359
7363
|
}).join(',') || _vXETable.VXETable.config.exportTypes.join(',')]);
|
|
7360
7364
|
}
|
|
@@ -7572,7 +7576,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
7572
7576
|
var isMenu = computeIsMenu.value;
|
|
7573
7577
|
return (0, _vue.h)('div', {
|
|
7574
7578
|
ref: refElem,
|
|
7575
|
-
class: ['vxe-table', 'vxe-table--render-default', "tid_"
|
|
7579
|
+
class: ['vxe-table', 'vxe-table--render-default', "tid_".concat(xID), "border--".concat(tableBorder), (_a = {}, _a["size--".concat(vSize)] = vSize, _a['vxe-editable'] = !!editConfig, _a['cell--highlight'] = highlightCell, _a['cell--selected'] = mouseConfig && mouseOpts.selected, _a['cell--area'] = mouseConfig && mouseOpts.area, _a['row--highlight'] = rowOpts.isHover || highlightHoverRow, _a['column--highlight'] = columnOpts.isHover || highlightHoverColumn, _a['is--header'] = showHeader, _a['is--footer'] = showFooter, _a['is--group'] = isGroup, _a['is--tree-line'] = treeConfig && treeOpts.line, _a['is--fixed-left'] = leftList.length, _a['is--fixed-right'] = rightList.length, _a['is--animat'] = !!props.animat, _a['is--round'] = props.round, _a['is--stripe'] = !treeConfig && stripe, _a['is--loading'] = loading, _a['is--empty'] = !loading && !tableData.length, _a['is--scroll-y'] = overflowY, _a['is--scroll-x'] = overflowX, _a['is--virtual-x'] = scrollXLoad, _a['is--virtual-y'] = scrollYLoad, _a)],
|
|
7576
7580
|
onKeydown: keydownEvent
|
|
7577
7581
|
}, [
|
|
7578
7582
|
/**
|
|
@@ -7642,7 +7646,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
7642
7646
|
ref: refCellResizeBar,
|
|
7643
7647
|
class: 'vxe-table--resizable-bar',
|
|
7644
7648
|
style: overflowX ? {
|
|
7645
|
-
'padding-bottom': scrollbarHeight
|
|
7649
|
+
'padding-bottom': "".concat(scrollbarHeight, "px")
|
|
7646
7650
|
} : null
|
|
7647
7651
|
}),
|
|
7648
7652
|
/**
|