@antv/s2-vue 1.1.0 → 1.2.0-alpha.1
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/README.md +2 -2
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/style.min.css +1 -1
- package/esm/index.d.ts +63 -39
- package/esm/index.js +169 -141
- package/esm/index.js.map +1 -1
- package/esm/style.css +6 -0
- package/lib/index.js +168 -140
- package/lib/index.js.map +1 -1
- package/lib/style.css +6 -0
- package/package.json +2 -2
package/esm/index.js
CHANGED
|
@@ -17,9 +17,89 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { customMerge, DEFAULT_OPTIONS, S2Event,
|
|
20
|
+
import { customMerge, DEFAULT_OPTIONS, S2Event, extendLocale, i18n, S2_PREFIX_CLS, TOOLTIP_PREFIX_CLS, getIcon, getTooltipDefaultOptions, BaseTooltip, getBaseCellData, TableSheet as TableSheet$1, PivotSheet as PivotSheet$1 } from "@antv/s2";
|
|
21
21
|
import { shallowRef, ref, computed, watch, defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode, createTextVNode, createBlock, withCtx, renderSlot, render as render$3, onMounted, reactive, isProxy, onBeforeUnmount, toRaw, toRefs, mergeProps, resolveDynamicComponent } from "vue";
|
|
22
22
|
import { Pagination, Menu, Dropdown, Spin, Button, Input, Empty, MenuItem } from "ant-design-vue";
|
|
23
|
+
const EN_US = {
|
|
24
|
+
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "Select Analysis Information",
|
|
25
|
+
\u5207\u6362\u6307\u6807: "Switch indicator",
|
|
26
|
+
\u786E\u5B9A: "Ok",
|
|
27
|
+
\u53D6\u6D88: "Cancel",
|
|
28
|
+
\u91CD\u7F6E: "Reset",
|
|
29
|
+
\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "Please enter a keyword search",
|
|
30
|
+
\u641C\u7D22: "Search",
|
|
31
|
+
\u6062\u590D: "Recover",
|
|
32
|
+
"\u5DF2\u9009 {} \u9879": "selected {} item",
|
|
33
|
+
\u6240\u9009\u9879: "selected items",
|
|
34
|
+
\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "Select drill down dimension",
|
|
35
|
+
\u6062\u590D\u9ED8\u8BA4: "Restore default",
|
|
36
|
+
\u641C\u7D22\u5B57\u6BB5: "Search field",
|
|
37
|
+
\u884C\u5217\u5207\u6362: "Switch Dimensions",
|
|
38
|
+
\u884C\u5934: "Rows",
|
|
39
|
+
\u5217\u5934: "Cols",
|
|
40
|
+
\u503C: "Values",
|
|
41
|
+
\u5C55\u5F00\u5B50\u9879: "Expand Children",
|
|
42
|
+
\u9996\u5B57\u6BCD: "Alphabetical order",
|
|
43
|
+
\u624B\u52A8\u6392\u5E8F: "Custom order",
|
|
44
|
+
\u5176\u4ED6\u5B57\u6BB5: "Other field",
|
|
45
|
+
\u9AD8\u7EA7\u6392\u5E8F: "Advanced order",
|
|
46
|
+
\u8BBE\u7F6E\u987A\u5E8F: "SetManual",
|
|
47
|
+
\u53EF\u9009\u5B57\u6BB5: "Fields",
|
|
48
|
+
"\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "Order according to the following rules (from low to high priority)",
|
|
49
|
+
\u6309: "By",
|
|
50
|
+
\u8BF4\u660E: "Description",
|
|
51
|
+
\u590D\u5236\u539F\u59CB\u6570\u636E: "Copy raw data",
|
|
52
|
+
\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "Copy formatted data",
|
|
53
|
+
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "Download raw data",
|
|
54
|
+
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "Download formatted data",
|
|
55
|
+
\u64CD\u4F5C\u6210\u529F: "Operation successful",
|
|
56
|
+
\u64CD\u4F5C\u5931\u8D25: "Operation failed",
|
|
57
|
+
\u65F6\u95F4: "Date",
|
|
58
|
+
\u6307\u6807: "Measure",
|
|
59
|
+
\u76EE\u6807\u503C: "Target Value"
|
|
60
|
+
};
|
|
61
|
+
const ZH_CN = {
|
|
62
|
+
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "\u9009\u62E9\u5206\u6790\u4FE1\u606F",
|
|
63
|
+
\u5207\u6362\u6307\u6807: "\u5207\u6362\u6307\u6807",
|
|
64
|
+
\u786E\u5B9A: "\u786E\u5B9A",
|
|
65
|
+
\u53D6\u6D88: "\u53D6\u6D88",
|
|
66
|
+
\u91CD\u7F6E: "\u91CD\u7F6E",
|
|
67
|
+
\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",
|
|
68
|
+
\u641C\u7D22: "\u641C\u7D22",
|
|
69
|
+
\u6062\u590D: "\u6062\u590D",
|
|
70
|
+
"\u5DF2\u9009 {} \u9879": "\u5DF2\u9009 {} \u9879",
|
|
71
|
+
\u6240\u9009\u9879: "\u6240\u9009\u9879",
|
|
72
|
+
\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6",
|
|
73
|
+
\u6062\u590D\u9ED8\u8BA4: "\u6062\u590D\u9ED8\u8BA4",
|
|
74
|
+
\u641C\u7D22\u5B57\u6BB5: "\u641C\u7D22\u5B57\u6BB5",
|
|
75
|
+
\u884C\u5217\u5207\u6362: "\u884C\u5217\u5207\u6362",
|
|
76
|
+
\u884C\u5934: "\u884C\u5934",
|
|
77
|
+
\u5217\u5934: "\u5217\u5934",
|
|
78
|
+
\u503C: "\u503C",
|
|
79
|
+
\u5C55\u5F00\u5B50\u9879: "\u5C55\u5F00\u5B50\u9879",
|
|
80
|
+
\u9996\u5B57\u6BCD: "\u9996\u5B57\u6BCD",
|
|
81
|
+
\u624B\u52A8\u6392\u5E8F: "\u624B\u52A8\u6392\u5E8F",
|
|
82
|
+
\u5176\u4ED6\u5B57\u6BB5: "\u5176\u4ED6\u5B57\u6BB5",
|
|
83
|
+
\u9AD8\u7EA7\u6392\u5E8F: "\u9AD8\u7EA7\u6392\u5E8F",
|
|
84
|
+
\u8BBE\u7F6E\u987A\u5E8F: "\u8BBE\u7F6E\u987A\u5E8F",
|
|
85
|
+
\u53EF\u9009\u5B57\u6BB5: "\u53EF\u9009\u5B57\u6BB5",
|
|
86
|
+
"\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09",
|
|
87
|
+
\u6309: "\u6309",
|
|
88
|
+
\u8BF4\u660E: "\u8BF4\u660E",
|
|
89
|
+
\u590D\u5236\u539F\u59CB\u6570\u636E: "\u590D\u5236\u539F\u59CB\u6570\u636E",
|
|
90
|
+
\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E",
|
|
91
|
+
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "\u4E0B\u8F7D\u539F\u59CB\u6570\u636E",
|
|
92
|
+
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E",
|
|
93
|
+
\u64CD\u4F5C\u6210\u529F: "\u64CD\u4F5C\u6210\u529F",
|
|
94
|
+
\u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25",
|
|
95
|
+
\u65F6\u95F4: "\u65F6\u95F4",
|
|
96
|
+
\u6307\u6807: "\u6307\u6807",
|
|
97
|
+
\u76EE\u6807\u503C: "\u76EE\u6807\u503C"
|
|
98
|
+
};
|
|
99
|
+
const Locale = {
|
|
100
|
+
zh_CN: ZH_CN,
|
|
101
|
+
en_US: EN_US
|
|
102
|
+
};
|
|
23
103
|
const SHEET_COMPONENT_DEFAULT_OPTIONS = {
|
|
24
104
|
tooltip: {
|
|
25
105
|
showTooltip: true,
|
|
@@ -32,6 +112,8 @@ const SHEET_COMPONENT_DEFAULT_OPTIONS = {
|
|
|
32
112
|
},
|
|
33
113
|
showDefaultHeaderActionIcon: true
|
|
34
114
|
};
|
|
115
|
+
const RESIZE_RENDER_DELAY = 200;
|
|
116
|
+
const DRILL_DOWN_PRE_CLASS = "s2-drill-down";
|
|
35
117
|
const getBaseSheetComponentOptions = (...options) => customMerge(DEFAULT_OPTIONS, SHEET_COMPONENT_DEFAULT_OPTIONS, ...options);
|
|
36
118
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
37
119
|
var freeGlobal$1 = freeGlobal;
|
|
@@ -1537,7 +1619,6 @@ function size(collection) {
|
|
|
1537
1619
|
}
|
|
1538
1620
|
return baseKeys(collection).length;
|
|
1539
1621
|
}
|
|
1540
|
-
const RESIZE_RENDER_DELAY = 200;
|
|
1541
1622
|
const analyzeAdaptive = (paramsContainer, adaptive) => {
|
|
1542
1623
|
var _a, _b, _c;
|
|
1543
1624
|
let container = paramsContainer;
|
|
@@ -1622,9 +1703,13 @@ const handleActionIconClick = (params) => {
|
|
|
1622
1703
|
event
|
|
1623
1704
|
});
|
|
1624
1705
|
};
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1627
|
-
|
|
1706
|
+
const defaultPartDrillDownDisplayCondition = (meta) => {
|
|
1707
|
+
var _a;
|
|
1708
|
+
const s2 = meta.spreadsheet;
|
|
1709
|
+
const { fields } = s2.dataCfg;
|
|
1710
|
+
const iconLevel = ((_a = fields.rows) == null ? void 0 : _a.length) - 1;
|
|
1711
|
+
const isValueInCols = !isEmpty(fields.values) ? s2.isValueInCols() : true;
|
|
1712
|
+
return iconLevel <= meta.level && s2.isHierarchyTreeType() && isValueInCols && !meta.isGrandTotals;
|
|
1628
1713
|
};
|
|
1629
1714
|
const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
1630
1715
|
var _a;
|
|
@@ -1634,7 +1719,7 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
|
1634
1719
|
belongsCell: "rowCell",
|
|
1635
1720
|
iconNames: ["DrillDownIcon"],
|
|
1636
1721
|
defaultHide: true,
|
|
1637
|
-
displayCondition: partDrillDown.displayCondition ||
|
|
1722
|
+
displayCondition: partDrillDown.displayCondition || defaultPartDrillDownDisplayCondition,
|
|
1638
1723
|
action: (actionIconProps) => {
|
|
1639
1724
|
const { iconName, meta, event } = actionIconProps;
|
|
1640
1725
|
if (iconName === "DrillDownIcon") {
|
|
@@ -1654,10 +1739,8 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
|
1654
1739
|
});
|
|
1655
1740
|
};
|
|
1656
1741
|
const handleDrillDown = (params) => {
|
|
1657
|
-
const { fetchData, spreadsheet, drillFields, drillItemsNum } = params;
|
|
1658
|
-
|
|
1659
|
-
spreadsheet.store.set("drillItemsNum", drillItemsNum);
|
|
1660
|
-
}
|
|
1742
|
+
const { fetchData, spreadsheet, drillFields, drillItemsNum = -1 } = params;
|
|
1743
|
+
spreadsheet.store.set("drillItemsNum", drillItemsNum);
|
|
1661
1744
|
const meta = spreadsheet.store.get("drillDownNode");
|
|
1662
1745
|
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
|
|
1663
1746
|
let newDrillDownDataCache = clone(drillDownDataCache);
|
|
@@ -1685,87 +1768,6 @@ const handleDrillDown = (params) => {
|
|
|
1685
1768
|
spreadsheet.render(false);
|
|
1686
1769
|
});
|
|
1687
1770
|
};
|
|
1688
|
-
const EN_US = {
|
|
1689
|
-
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "Select Analysis Information",
|
|
1690
|
-
\u5207\u6362\u6307\u6807: "Switch indicator",
|
|
1691
|
-
\u786E\u5B9A: "Ok",
|
|
1692
|
-
\u53D6\u6D88: "Cancel",
|
|
1693
|
-
\u91CD\u7F6E: "Reset",
|
|
1694
|
-
\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "Please enter a keyword search",
|
|
1695
|
-
\u641C\u7D22: "Search",
|
|
1696
|
-
\u6062\u590D: "Recover",
|
|
1697
|
-
"\u5DF2\u9009 {} \u9879": "selected {} item",
|
|
1698
|
-
\u6240\u9009\u9879: "selected items",
|
|
1699
|
-
\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "Select drill down dimension",
|
|
1700
|
-
\u6062\u590D\u9ED8\u8BA4: "Restore default",
|
|
1701
|
-
\u641C\u7D22\u5B57\u6BB5: "Search field",
|
|
1702
|
-
\u884C\u5217\u5207\u6362: "Switch Dimensions",
|
|
1703
|
-
\u884C\u5934: "Rows",
|
|
1704
|
-
\u5217\u5934: "Cols",
|
|
1705
|
-
\u503C: "Values",
|
|
1706
|
-
\u5C55\u5F00\u5B50\u9879: "Expand Children",
|
|
1707
|
-
\u9996\u5B57\u6BCD: "Alphabetical order",
|
|
1708
|
-
\u624B\u52A8\u6392\u5E8F: "Custom order",
|
|
1709
|
-
\u5176\u4ED6\u5B57\u6BB5: "Other field",
|
|
1710
|
-
\u9AD8\u7EA7\u6392\u5E8F: "Advanced order",
|
|
1711
|
-
\u8BBE\u7F6E\u987A\u5E8F: "SetManual",
|
|
1712
|
-
\u53EF\u9009\u5B57\u6BB5: "Fields",
|
|
1713
|
-
"\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "Order according to the following rules (from low to high priority)",
|
|
1714
|
-
\u6309: "By",
|
|
1715
|
-
\u8BF4\u660E: "Description",
|
|
1716
|
-
\u590D\u5236\u539F\u59CB\u6570\u636E: "Copy raw data",
|
|
1717
|
-
\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "Copy formatted data",
|
|
1718
|
-
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "Download raw data",
|
|
1719
|
-
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "Download formatted data",
|
|
1720
|
-
\u64CD\u4F5C\u6210\u529F: "Operation successful",
|
|
1721
|
-
\u64CD\u4F5C\u5931\u8D25: "Operation failed",
|
|
1722
|
-
\u65F6\u95F4: "Date",
|
|
1723
|
-
\u6307\u6807: "Measure",
|
|
1724
|
-
\u76EE\u6807\u503C: "Target Value"
|
|
1725
|
-
};
|
|
1726
|
-
const ZH_CN = {
|
|
1727
|
-
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "\u9009\u62E9\u5206\u6790\u4FE1\u606F",
|
|
1728
|
-
\u5207\u6362\u6307\u6807: "\u5207\u6362\u6307\u6807",
|
|
1729
|
-
\u786E\u5B9A: "\u786E\u5B9A",
|
|
1730
|
-
\u53D6\u6D88: "\u53D6\u6D88",
|
|
1731
|
-
\u91CD\u7F6E: "\u91CD\u7F6E",
|
|
1732
|
-
\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",
|
|
1733
|
-
\u641C\u7D22: "\u641C\u7D22",
|
|
1734
|
-
\u6062\u590D: "\u6062\u590D",
|
|
1735
|
-
"\u5DF2\u9009 {} \u9879": "\u5DF2\u9009 {} \u9879",
|
|
1736
|
-
\u6240\u9009\u9879: "\u6240\u9009\u9879",
|
|
1737
|
-
\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6",
|
|
1738
|
-
\u6062\u590D\u9ED8\u8BA4: "\u6062\u590D\u9ED8\u8BA4",
|
|
1739
|
-
\u641C\u7D22\u5B57\u6BB5: "\u641C\u7D22\u5B57\u6BB5",
|
|
1740
|
-
\u884C\u5217\u5207\u6362: "\u884C\u5217\u5207\u6362",
|
|
1741
|
-
\u884C\u5934: "\u884C\u5934",
|
|
1742
|
-
\u5217\u5934: "\u5217\u5934",
|
|
1743
|
-
\u503C: "\u503C",
|
|
1744
|
-
\u5C55\u5F00\u5B50\u9879: "\u5C55\u5F00\u5B50\u9879",
|
|
1745
|
-
\u9996\u5B57\u6BCD: "\u9996\u5B57\u6BCD",
|
|
1746
|
-
\u624B\u52A8\u6392\u5E8F: "\u624B\u52A8\u6392\u5E8F",
|
|
1747
|
-
\u5176\u4ED6\u5B57\u6BB5: "\u5176\u4ED6\u5B57\u6BB5",
|
|
1748
|
-
\u9AD8\u7EA7\u6392\u5E8F: "\u9AD8\u7EA7\u6392\u5E8F",
|
|
1749
|
-
\u8BBE\u7F6E\u987A\u5E8F: "\u8BBE\u7F6E\u987A\u5E8F",
|
|
1750
|
-
\u53EF\u9009\u5B57\u6BB5: "\u53EF\u9009\u5B57\u6BB5",
|
|
1751
|
-
"\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09",
|
|
1752
|
-
\u6309: "\u6309",
|
|
1753
|
-
\u8BF4\u660E: "\u8BF4\u660E",
|
|
1754
|
-
\u590D\u5236\u539F\u59CB\u6570\u636E: "\u590D\u5236\u539F\u59CB\u6570\u636E",
|
|
1755
|
-
\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E",
|
|
1756
|
-
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "\u4E0B\u8F7D\u539F\u59CB\u6570\u636E",
|
|
1757
|
-
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E",
|
|
1758
|
-
\u64CD\u4F5C\u6210\u529F: "\u64CD\u4F5C\u6210\u529F",
|
|
1759
|
-
\u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25",
|
|
1760
|
-
\u65F6\u95F4: "\u65F6\u95F4",
|
|
1761
|
-
\u6307\u6807: "\u6307\u6807",
|
|
1762
|
-
\u76EE\u6807\u503C: "\u76EE\u6807\u503C"
|
|
1763
|
-
};
|
|
1764
|
-
const Locale = {
|
|
1765
|
-
zh_CN: ZH_CN,
|
|
1766
|
-
en_US: EN_US
|
|
1767
|
-
};
|
|
1768
|
-
const DRILL_DOWN_PRE_CLASS = "s2-drill-down";
|
|
1769
1771
|
extendLocale(Locale);
|
|
1770
1772
|
const useExpose = (expose) => {
|
|
1771
1773
|
const s2Ref = shallowRef();
|
|
@@ -2007,9 +2009,15 @@ const _sfc_main$9 = defineComponent({
|
|
|
2007
2009
|
name: "TooltipSummary",
|
|
2008
2010
|
props: ["summaries"],
|
|
2009
2011
|
setup(props) {
|
|
2010
|
-
const
|
|
2012
|
+
const summaryInfo = computed(() => reduce(props.summaries, (pre, next) => {
|
|
2013
|
+
pre.count += size(next == null ? void 0 : next.selectedData);
|
|
2014
|
+
if (next.value || next.name) {
|
|
2015
|
+
pre.summaries.push(next);
|
|
2016
|
+
}
|
|
2017
|
+
return pre;
|
|
2018
|
+
}, { count: 0, summaries: [] }));
|
|
2011
2019
|
return {
|
|
2012
|
-
|
|
2020
|
+
summaryInfo,
|
|
2013
2021
|
i18n,
|
|
2014
2022
|
TOOLTIP_PREFIX_CLS
|
|
2015
2023
|
};
|
|
@@ -2025,10 +2033,10 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2025
2033
|
}, [
|
|
2026
2034
|
createElementVNode("span", {
|
|
2027
2035
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-selected`)
|
|
2028
|
-
}, toDisplayString(_ctx.count) + " " + toDisplayString(_ctx.i18n("\u9879")), 3),
|
|
2036
|
+
}, toDisplayString(_ctx.summaryInfo.count) + " " + toDisplayString(_ctx.i18n("\u9879")), 3),
|
|
2029
2037
|
createTextVNode(" " + toDisplayString(_ctx.i18n("\u5DF2\u9009\u62E9")), 1)
|
|
2030
2038
|
], 2),
|
|
2031
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.summaries, (summary) => {
|
|
2039
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.summaryInfo.summaries, (summary) => {
|
|
2032
2040
|
return openBlock(), createElementBlock("div", {
|
|
2033
2041
|
key: `${summary.name}-${summary.value}`,
|
|
2034
2042
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-item`)
|
|
@@ -2079,6 +2087,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
2079
2087
|
};
|
|
2080
2088
|
return {
|
|
2081
2089
|
onMenuTitleClick,
|
|
2090
|
+
isEmpty,
|
|
2082
2091
|
TOOLTIP_PREFIX_CLS
|
|
2083
2092
|
};
|
|
2084
2093
|
},
|
|
@@ -2093,44 +2102,58 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2093
2102
|
const _component_TooltipOperatorMenu = resolveComponent("TooltipOperatorMenu");
|
|
2094
2103
|
const _component_MenuItem = resolveComponent("MenuItem");
|
|
2095
2104
|
const _component_SubMenu = resolveComponent("SubMenu");
|
|
2096
|
-
return openBlock(),
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
}, [
|
|
2113
|
-
((_a = subMenu == null ? void 0 : subMenu.children) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_TooltipOperatorMenu, {
|
|
2114
|
-
key: 0,
|
|
2115
|
-
menu: subMenu,
|
|
2116
|
-
cell: _ctx.cell
|
|
2117
|
-
}, null, 8, ["menu", "cell"])) : (openBlock(), createBlock(_component_MenuItem, {
|
|
2118
|
-
title: subMenu.text,
|
|
2105
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
2106
|
+
!_ctx.isEmpty(_ctx.menu.children) ? (openBlock(), createBlock(_component_SubMenu, {
|
|
2107
|
+
key: _ctx.menu.key,
|
|
2108
|
+
popupClassName: `${_ctx.TOOLTIP_PREFIX_CLS}-operator-submenu-popup`,
|
|
2109
|
+
onTitleClick: _ctx.onMenuTitleClick
|
|
2110
|
+
}, {
|
|
2111
|
+
title: withCtx(() => [
|
|
2112
|
+
createVNode(_component_TooltipOperatorTitle, {
|
|
2113
|
+
menu: _ctx.menu,
|
|
2114
|
+
onClick: _ctx.onMenuTitleClick
|
|
2115
|
+
}, null, 8, ["menu", "onClick"])
|
|
2116
|
+
]),
|
|
2117
|
+
default: withCtx(() => [
|
|
2118
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menu.children, (subMenu) => {
|
|
2119
|
+
var _a;
|
|
2120
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
2119
2121
|
key: subMenu.key
|
|
2120
|
-
},
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2122
|
+
}, [
|
|
2123
|
+
((_a = subMenu == null ? void 0 : subMenu.children) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_TooltipOperatorMenu, {
|
|
2124
|
+
key: 0,
|
|
2125
|
+
menu: subMenu,
|
|
2126
|
+
cell: _ctx.cell
|
|
2127
|
+
}, null, 8, ["menu", "cell"])) : (openBlock(), createBlock(_component_MenuItem, {
|
|
2128
|
+
title: subMenu.text,
|
|
2129
|
+
key: subMenu.key
|
|
2130
|
+
}, {
|
|
2131
|
+
default: withCtx(() => [
|
|
2132
|
+
createVNode(_component_TooltipOperatorTitle, {
|
|
2133
|
+
menu: subMenu,
|
|
2134
|
+
onClick: _ctx.onMenuTitleClick
|
|
2135
|
+
}, null, 8, ["menu", "onClick"])
|
|
2136
|
+
]),
|
|
2137
|
+
_: 2
|
|
2138
|
+
}, 1032, ["title"]))
|
|
2139
|
+
], 64);
|
|
2140
|
+
}), 128))
|
|
2141
|
+
]),
|
|
2142
|
+
_: 1
|
|
2143
|
+
}, 8, ["popupClassName", "onTitleClick"])) : createCommentVNode("", true),
|
|
2144
|
+
_ctx.isEmpty(_ctx.menu.children) ? (openBlock(), createBlock(_component_MenuItem, {
|
|
2145
|
+
title: _ctx.menu.text,
|
|
2146
|
+
key: _ctx.menu.key
|
|
2147
|
+
}, {
|
|
2148
|
+
default: withCtx(() => [
|
|
2149
|
+
createVNode(_component_TooltipOperatorTitle, {
|
|
2150
|
+
menu: _ctx.menu,
|
|
2151
|
+
onClick: _ctx.onMenuTitleClick
|
|
2152
|
+
}, null, 8, ["menu", "onClick"])
|
|
2153
|
+
]),
|
|
2154
|
+
_: 1
|
|
2155
|
+
}, 8, ["title"])) : createCommentVNode("", true)
|
|
2156
|
+
], 64);
|
|
2134
2157
|
}
|
|
2135
2158
|
var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
|
|
2136
2159
|
var index_vue_vue_type_style_index_0_lang$1 = "";
|
|
@@ -2142,9 +2165,13 @@ const _sfc_main$6 = defineComponent({
|
|
|
2142
2165
|
"onClick",
|
|
2143
2166
|
"cell"
|
|
2144
2167
|
],
|
|
2145
|
-
setup() {
|
|
2168
|
+
setup(props, { emit }) {
|
|
2169
|
+
const onMenuClick = (...args) => {
|
|
2170
|
+
emit("click", ...args);
|
|
2171
|
+
};
|
|
2146
2172
|
return {
|
|
2147
|
-
TOOLTIP_PREFIX_CLS
|
|
2173
|
+
TOOLTIP_PREFIX_CLS,
|
|
2174
|
+
onMenuClick
|
|
2148
2175
|
};
|
|
2149
2176
|
},
|
|
2150
2177
|
components: {
|
|
@@ -2165,7 +2192,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2165
2192
|
_ctx.onlyMenu ? (openBlock(), createBlock(_component_Menu, {
|
|
2166
2193
|
key: 0,
|
|
2167
2194
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
|
|
2168
|
-
onClick:
|
|
2195
|
+
onClick: _ctx.onMenuClick
|
|
2169
2196
|
}, {
|
|
2170
2197
|
default: withCtx(() => [
|
|
2171
2198
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menus, (menu) => {
|
|
@@ -2177,7 +2204,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2177
2204
|
}), 128))
|
|
2178
2205
|
]),
|
|
2179
2206
|
_: 1
|
|
2180
|
-
}, 8, ["class"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.menus, (menu) => {
|
|
2207
|
+
}, 8, ["class", "onClick"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.menus, (menu) => {
|
|
2181
2208
|
return openBlock(), createBlock(_component_Dropdown, {
|
|
2182
2209
|
key: menu.key,
|
|
2183
2210
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-dropdown`)
|
|
@@ -2188,7 +2215,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2188
2215
|
((_a = menu == null ? void 0 : menu.children) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_Menu, {
|
|
2189
2216
|
key: 0,
|
|
2190
2217
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
|
|
2191
|
-
onClick:
|
|
2218
|
+
onClick: _ctx.onMenuClick
|
|
2192
2219
|
}, {
|
|
2193
2220
|
default: withCtx(() => [
|
|
2194
2221
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menus, (menu2) => {
|
|
@@ -2200,7 +2227,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2200
2227
|
}), 128))
|
|
2201
2228
|
]),
|
|
2202
2229
|
_: 2
|
|
2203
|
-
}, 1032, ["class"])) : createCommentVNode("", true)
|
|
2230
|
+
}, 1032, ["class", "onClick"])) : createCommentVNode("", true)
|
|
2204
2231
|
];
|
|
2205
2232
|
}),
|
|
2206
2233
|
default: withCtx(() => [
|
|
@@ -2558,7 +2585,7 @@ const initBaseSheetProps = () => ({
|
|
|
2558
2585
|
dataCfg: Object,
|
|
2559
2586
|
themeCfg: Object,
|
|
2560
2587
|
showPagination: {
|
|
2561
|
-
type: Object,
|
|
2588
|
+
type: [Object, Boolean],
|
|
2562
2589
|
default: false
|
|
2563
2590
|
},
|
|
2564
2591
|
loading: Boolean,
|
|
@@ -2569,7 +2596,7 @@ const initBaseSheetProps = () => ({
|
|
|
2569
2596
|
default: {}
|
|
2570
2597
|
},
|
|
2571
2598
|
adaptive: {
|
|
2572
|
-
type: Object,
|
|
2599
|
+
type: [Object, Boolean],
|
|
2573
2600
|
default: false
|
|
2574
2601
|
},
|
|
2575
2602
|
onSpreadsheet: Function,
|
|
@@ -2675,7 +2702,8 @@ const initBaseSheetEmits = () => {
|
|
|
2675
2702
|
"mouseUp",
|
|
2676
2703
|
"selected",
|
|
2677
2704
|
"reset",
|
|
2678
|
-
"linkFieldJump"
|
|
2705
|
+
"linkFieldJump",
|
|
2706
|
+
"scroll"
|
|
2679
2707
|
];
|
|
2680
2708
|
return keys2;
|
|
2681
2709
|
};
|