@antv/s2-vue 1.1.0 → 1.2.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 +103 -57
- package/esm/index.js +185 -152
- package/esm/index.js.map +1 -1
- package/esm/style.css +6 -0
- package/lib/index.js +184 -151
- package/lib/index.js.map +1 -1
- package/lib/style.css +6 -0
- package/package.json +1 -1
package/esm/style.css
CHANGED
|
@@ -131,6 +131,12 @@
|
|
|
131
131
|
overflow-wrap: break-word;
|
|
132
132
|
color: rgba(0, 0, 0, 0.85);
|
|
133
133
|
}
|
|
134
|
+
.antv-s2-tooltip-description {
|
|
135
|
+
padding: 0 12px 12px;
|
|
136
|
+
line-height: 16px;
|
|
137
|
+
overflow-wrap: break-word;
|
|
138
|
+
color: rgba(0, 0, 0, 0.65);
|
|
139
|
+
}
|
|
134
140
|
.antv-s2-tooltip-tips {
|
|
135
141
|
padding: 4px 12px;
|
|
136
142
|
color: rgba(0, 0, 0, 0.45);
|
package/lib/index.js
CHANGED
|
@@ -22,6 +22,86 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
22
22
|
var s2 = require("@antv/s2");
|
|
23
23
|
var vue = require("vue");
|
|
24
24
|
var antDesignVue = require("ant-design-vue");
|
|
25
|
+
const EN_US = {
|
|
26
|
+
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "Select Analysis Information",
|
|
27
|
+
\u5207\u6362\u6307\u6807: "Switch indicator",
|
|
28
|
+
\u786E\u5B9A: "Ok",
|
|
29
|
+
\u53D6\u6D88: "Cancel",
|
|
30
|
+
\u91CD\u7F6E: "Reset",
|
|
31
|
+
\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "Please enter a keyword search",
|
|
32
|
+
\u641C\u7D22: "Search",
|
|
33
|
+
\u6062\u590D: "Recover",
|
|
34
|
+
"\u5DF2\u9009 {} \u9879": "selected {} item",
|
|
35
|
+
\u6240\u9009\u9879: "selected items",
|
|
36
|
+
\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "Select drill down dimension",
|
|
37
|
+
\u6062\u590D\u9ED8\u8BA4: "Restore default",
|
|
38
|
+
\u641C\u7D22\u5B57\u6BB5: "Search field",
|
|
39
|
+
\u884C\u5217\u5207\u6362: "Switch Dimensions",
|
|
40
|
+
\u884C\u5934: "Rows",
|
|
41
|
+
\u5217\u5934: "Cols",
|
|
42
|
+
\u503C: "Values",
|
|
43
|
+
\u5C55\u5F00\u5B50\u9879: "Expand Children",
|
|
44
|
+
\u9996\u5B57\u6BCD: "Alphabetical order",
|
|
45
|
+
\u624B\u52A8\u6392\u5E8F: "Custom order",
|
|
46
|
+
\u5176\u4ED6\u5B57\u6BB5: "Other field",
|
|
47
|
+
\u9AD8\u7EA7\u6392\u5E8F: "Advanced order",
|
|
48
|
+
\u8BBE\u7F6E\u987A\u5E8F: "SetManual",
|
|
49
|
+
\u53EF\u9009\u5B57\u6BB5: "Fields",
|
|
50
|
+
"\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)",
|
|
51
|
+
\u6309: "By",
|
|
52
|
+
\u8BF4\u660E: "Description",
|
|
53
|
+
\u590D\u5236\u539F\u59CB\u6570\u636E: "Copy raw data",
|
|
54
|
+
\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "Copy formatted data",
|
|
55
|
+
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "Download raw data",
|
|
56
|
+
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "Download formatted data",
|
|
57
|
+
\u64CD\u4F5C\u6210\u529F: "Operation successful",
|
|
58
|
+
\u64CD\u4F5C\u5931\u8D25: "Operation failed",
|
|
59
|
+
\u65F6\u95F4: "Date",
|
|
60
|
+
\u6307\u6807: "Measure",
|
|
61
|
+
\u76EE\u6807\u503C: "Target Value"
|
|
62
|
+
};
|
|
63
|
+
const ZH_CN = {
|
|
64
|
+
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "\u9009\u62E9\u5206\u6790\u4FE1\u606F",
|
|
65
|
+
\u5207\u6362\u6307\u6807: "\u5207\u6362\u6307\u6807",
|
|
66
|
+
\u786E\u5B9A: "\u786E\u5B9A",
|
|
67
|
+
\u53D6\u6D88: "\u53D6\u6D88",
|
|
68
|
+
\u91CD\u7F6E: "\u91CD\u7F6E",
|
|
69
|
+
\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",
|
|
70
|
+
\u641C\u7D22: "\u641C\u7D22",
|
|
71
|
+
\u6062\u590D: "\u6062\u590D",
|
|
72
|
+
"\u5DF2\u9009 {} \u9879": "\u5DF2\u9009 {} \u9879",
|
|
73
|
+
\u6240\u9009\u9879: "\u6240\u9009\u9879",
|
|
74
|
+
\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6",
|
|
75
|
+
\u6062\u590D\u9ED8\u8BA4: "\u6062\u590D\u9ED8\u8BA4",
|
|
76
|
+
\u641C\u7D22\u5B57\u6BB5: "\u641C\u7D22\u5B57\u6BB5",
|
|
77
|
+
\u884C\u5217\u5207\u6362: "\u884C\u5217\u5207\u6362",
|
|
78
|
+
\u884C\u5934: "\u884C\u5934",
|
|
79
|
+
\u5217\u5934: "\u5217\u5934",
|
|
80
|
+
\u503C: "\u503C",
|
|
81
|
+
\u5C55\u5F00\u5B50\u9879: "\u5C55\u5F00\u5B50\u9879",
|
|
82
|
+
\u9996\u5B57\u6BCD: "\u9996\u5B57\u6BCD",
|
|
83
|
+
\u624B\u52A8\u6392\u5E8F: "\u624B\u52A8\u6392\u5E8F",
|
|
84
|
+
\u5176\u4ED6\u5B57\u6BB5: "\u5176\u4ED6\u5B57\u6BB5",
|
|
85
|
+
\u9AD8\u7EA7\u6392\u5E8F: "\u9AD8\u7EA7\u6392\u5E8F",
|
|
86
|
+
\u8BBE\u7F6E\u987A\u5E8F: "\u8BBE\u7F6E\u987A\u5E8F",
|
|
87
|
+
\u53EF\u9009\u5B57\u6BB5: "\u53EF\u9009\u5B57\u6BB5",
|
|
88
|
+
"\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",
|
|
89
|
+
\u6309: "\u6309",
|
|
90
|
+
\u8BF4\u660E: "\u8BF4\u660E",
|
|
91
|
+
\u590D\u5236\u539F\u59CB\u6570\u636E: "\u590D\u5236\u539F\u59CB\u6570\u636E",
|
|
92
|
+
\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E",
|
|
93
|
+
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "\u4E0B\u8F7D\u539F\u59CB\u6570\u636E",
|
|
94
|
+
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E",
|
|
95
|
+
\u64CD\u4F5C\u6210\u529F: "\u64CD\u4F5C\u6210\u529F",
|
|
96
|
+
\u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25",
|
|
97
|
+
\u65F6\u95F4: "\u65F6\u95F4",
|
|
98
|
+
\u6307\u6807: "\u6307\u6807",
|
|
99
|
+
\u76EE\u6807\u503C: "\u76EE\u6807\u503C"
|
|
100
|
+
};
|
|
101
|
+
const Locale = {
|
|
102
|
+
zh_CN: ZH_CN,
|
|
103
|
+
en_US: EN_US
|
|
104
|
+
};
|
|
25
105
|
const SHEET_COMPONENT_DEFAULT_OPTIONS = {
|
|
26
106
|
tooltip: {
|
|
27
107
|
showTooltip: true,
|
|
@@ -34,6 +114,8 @@ const SHEET_COMPONENT_DEFAULT_OPTIONS = {
|
|
|
34
114
|
},
|
|
35
115
|
showDefaultHeaderActionIcon: true
|
|
36
116
|
};
|
|
117
|
+
const RESIZE_RENDER_DELAY = 200;
|
|
118
|
+
const DRILL_DOWN_PRE_CLASS = "s2-drill-down";
|
|
37
119
|
const getBaseSheetComponentOptions = (...options) => s2.customMerge(s2.DEFAULT_OPTIONS, SHEET_COMPONENT_DEFAULT_OPTIONS, ...options);
|
|
38
120
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
39
121
|
var freeGlobal$1 = freeGlobal;
|
|
@@ -1539,18 +1621,20 @@ function size(collection) {
|
|
|
1539
1621
|
}
|
|
1540
1622
|
return baseKeys(collection).length;
|
|
1541
1623
|
}
|
|
1542
|
-
const
|
|
1543
|
-
const analyzeAdaptive = (paramsContainer, adaptive) => {
|
|
1624
|
+
const analyzeAdaptive = (defaultContainer, adaptive) => {
|
|
1544
1625
|
var _a, _b, _c;
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1626
|
+
if (isBoolean(adaptive)) {
|
|
1627
|
+
return {
|
|
1628
|
+
container: defaultContainer,
|
|
1629
|
+
adaptiveWidth: true,
|
|
1630
|
+
adaptiveHeight: false
|
|
1631
|
+
};
|
|
1632
|
+
}
|
|
1633
|
+
return {
|
|
1634
|
+
container: ((_a = adaptive == null ? void 0 : adaptive.getContainer) == null ? void 0 : _a.call(adaptive)) || defaultContainer,
|
|
1635
|
+
adaptiveWidth: (_b = adaptive == null ? void 0 : adaptive.width) != null ? _b : true,
|
|
1636
|
+
adaptiveHeight: (_c = adaptive == null ? void 0 : adaptive.height) != null ? _c : true
|
|
1637
|
+
};
|
|
1554
1638
|
};
|
|
1555
1639
|
const createResizeObserver = (params) => {
|
|
1556
1640
|
let isFirstRender = true;
|
|
@@ -1624,9 +1708,13 @@ const handleActionIconClick = (params) => {
|
|
|
1624
1708
|
event
|
|
1625
1709
|
});
|
|
1626
1710
|
};
|
|
1627
|
-
const
|
|
1628
|
-
|
|
1629
|
-
|
|
1711
|
+
const defaultPartDrillDownDisplayCondition = (meta) => {
|
|
1712
|
+
var _a;
|
|
1713
|
+
const s22 = meta.spreadsheet;
|
|
1714
|
+
const { fields } = s22.dataCfg;
|
|
1715
|
+
const iconLevel = ((_a = fields.rows) == null ? void 0 : _a.length) - 1;
|
|
1716
|
+
const isValueInCols = !isEmpty(fields.values) ? s22.isValueInCols() : true;
|
|
1717
|
+
return iconLevel <= meta.level && s22.isHierarchyTreeType() && isValueInCols && !meta.isGrandTotals;
|
|
1630
1718
|
};
|
|
1631
1719
|
const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
1632
1720
|
var _a;
|
|
@@ -1636,7 +1724,7 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
|
1636
1724
|
belongsCell: "rowCell",
|
|
1637
1725
|
iconNames: ["DrillDownIcon"],
|
|
1638
1726
|
defaultHide: true,
|
|
1639
|
-
displayCondition: partDrillDown.displayCondition ||
|
|
1727
|
+
displayCondition: partDrillDown.displayCondition || defaultPartDrillDownDisplayCondition,
|
|
1640
1728
|
action: (actionIconProps) => {
|
|
1641
1729
|
const { iconName, meta, event } = actionIconProps;
|
|
1642
1730
|
if (iconName === "DrillDownIcon") {
|
|
@@ -1656,10 +1744,8 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
|
1656
1744
|
});
|
|
1657
1745
|
};
|
|
1658
1746
|
const handleDrillDown = (params) => {
|
|
1659
|
-
const { fetchData, spreadsheet, drillFields, drillItemsNum } = params;
|
|
1660
|
-
|
|
1661
|
-
spreadsheet.store.set("drillItemsNum", drillItemsNum);
|
|
1662
|
-
}
|
|
1747
|
+
const { fetchData, spreadsheet, drillFields, drillItemsNum = -1 } = params;
|
|
1748
|
+
spreadsheet.store.set("drillItemsNum", drillItemsNum);
|
|
1663
1749
|
const meta = spreadsheet.store.get("drillDownNode");
|
|
1664
1750
|
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
|
|
1665
1751
|
let newDrillDownDataCache = clone(drillDownDataCache);
|
|
@@ -1687,87 +1773,6 @@ const handleDrillDown = (params) => {
|
|
|
1687
1773
|
spreadsheet.render(false);
|
|
1688
1774
|
});
|
|
1689
1775
|
};
|
|
1690
|
-
const EN_US = {
|
|
1691
|
-
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "Select Analysis Information",
|
|
1692
|
-
\u5207\u6362\u6307\u6807: "Switch indicator",
|
|
1693
|
-
\u786E\u5B9A: "Ok",
|
|
1694
|
-
\u53D6\u6D88: "Cancel",
|
|
1695
|
-
\u91CD\u7F6E: "Reset",
|
|
1696
|
-
\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "Please enter a keyword search",
|
|
1697
|
-
\u641C\u7D22: "Search",
|
|
1698
|
-
\u6062\u590D: "Recover",
|
|
1699
|
-
"\u5DF2\u9009 {} \u9879": "selected {} item",
|
|
1700
|
-
\u6240\u9009\u9879: "selected items",
|
|
1701
|
-
\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "Select drill down dimension",
|
|
1702
|
-
\u6062\u590D\u9ED8\u8BA4: "Restore default",
|
|
1703
|
-
\u641C\u7D22\u5B57\u6BB5: "Search field",
|
|
1704
|
-
\u884C\u5217\u5207\u6362: "Switch Dimensions",
|
|
1705
|
-
\u884C\u5934: "Rows",
|
|
1706
|
-
\u5217\u5934: "Cols",
|
|
1707
|
-
\u503C: "Values",
|
|
1708
|
-
\u5C55\u5F00\u5B50\u9879: "Expand Children",
|
|
1709
|
-
\u9996\u5B57\u6BCD: "Alphabetical order",
|
|
1710
|
-
\u624B\u52A8\u6392\u5E8F: "Custom order",
|
|
1711
|
-
\u5176\u4ED6\u5B57\u6BB5: "Other field",
|
|
1712
|
-
\u9AD8\u7EA7\u6392\u5E8F: "Advanced order",
|
|
1713
|
-
\u8BBE\u7F6E\u987A\u5E8F: "SetManual",
|
|
1714
|
-
\u53EF\u9009\u5B57\u6BB5: "Fields",
|
|
1715
|
-
"\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)",
|
|
1716
|
-
\u6309: "By",
|
|
1717
|
-
\u8BF4\u660E: "Description",
|
|
1718
|
-
\u590D\u5236\u539F\u59CB\u6570\u636E: "Copy raw data",
|
|
1719
|
-
\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "Copy formatted data",
|
|
1720
|
-
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "Download raw data",
|
|
1721
|
-
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "Download formatted data",
|
|
1722
|
-
\u64CD\u4F5C\u6210\u529F: "Operation successful",
|
|
1723
|
-
\u64CD\u4F5C\u5931\u8D25: "Operation failed",
|
|
1724
|
-
\u65F6\u95F4: "Date",
|
|
1725
|
-
\u6307\u6807: "Measure",
|
|
1726
|
-
\u76EE\u6807\u503C: "Target Value"
|
|
1727
|
-
};
|
|
1728
|
-
const ZH_CN = {
|
|
1729
|
-
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "\u9009\u62E9\u5206\u6790\u4FE1\u606F",
|
|
1730
|
-
\u5207\u6362\u6307\u6807: "\u5207\u6362\u6307\u6807",
|
|
1731
|
-
\u786E\u5B9A: "\u786E\u5B9A",
|
|
1732
|
-
\u53D6\u6D88: "\u53D6\u6D88",
|
|
1733
|
-
\u91CD\u7F6E: "\u91CD\u7F6E",
|
|
1734
|
-
\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",
|
|
1735
|
-
\u641C\u7D22: "\u641C\u7D22",
|
|
1736
|
-
\u6062\u590D: "\u6062\u590D",
|
|
1737
|
-
"\u5DF2\u9009 {} \u9879": "\u5DF2\u9009 {} \u9879",
|
|
1738
|
-
\u6240\u9009\u9879: "\u6240\u9009\u9879",
|
|
1739
|
-
\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6",
|
|
1740
|
-
\u6062\u590D\u9ED8\u8BA4: "\u6062\u590D\u9ED8\u8BA4",
|
|
1741
|
-
\u641C\u7D22\u5B57\u6BB5: "\u641C\u7D22\u5B57\u6BB5",
|
|
1742
|
-
\u884C\u5217\u5207\u6362: "\u884C\u5217\u5207\u6362",
|
|
1743
|
-
\u884C\u5934: "\u884C\u5934",
|
|
1744
|
-
\u5217\u5934: "\u5217\u5934",
|
|
1745
|
-
\u503C: "\u503C",
|
|
1746
|
-
\u5C55\u5F00\u5B50\u9879: "\u5C55\u5F00\u5B50\u9879",
|
|
1747
|
-
\u9996\u5B57\u6BCD: "\u9996\u5B57\u6BCD",
|
|
1748
|
-
\u624B\u52A8\u6392\u5E8F: "\u624B\u52A8\u6392\u5E8F",
|
|
1749
|
-
\u5176\u4ED6\u5B57\u6BB5: "\u5176\u4ED6\u5B57\u6BB5",
|
|
1750
|
-
\u9AD8\u7EA7\u6392\u5E8F: "\u9AD8\u7EA7\u6392\u5E8F",
|
|
1751
|
-
\u8BBE\u7F6E\u987A\u5E8F: "\u8BBE\u7F6E\u987A\u5E8F",
|
|
1752
|
-
\u53EF\u9009\u5B57\u6BB5: "\u53EF\u9009\u5B57\u6BB5",
|
|
1753
|
-
"\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",
|
|
1754
|
-
\u6309: "\u6309",
|
|
1755
|
-
\u8BF4\u660E: "\u8BF4\u660E",
|
|
1756
|
-
\u590D\u5236\u539F\u59CB\u6570\u636E: "\u590D\u5236\u539F\u59CB\u6570\u636E",
|
|
1757
|
-
\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E",
|
|
1758
|
-
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "\u4E0B\u8F7D\u539F\u59CB\u6570\u636E",
|
|
1759
|
-
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E",
|
|
1760
|
-
\u64CD\u4F5C\u6210\u529F: "\u64CD\u4F5C\u6210\u529F",
|
|
1761
|
-
\u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25",
|
|
1762
|
-
\u65F6\u95F4: "\u65F6\u95F4",
|
|
1763
|
-
\u6307\u6807: "\u6307\u6807",
|
|
1764
|
-
\u76EE\u6807\u503C: "\u76EE\u6807\u503C"
|
|
1765
|
-
};
|
|
1766
|
-
const Locale = {
|
|
1767
|
-
zh_CN: ZH_CN,
|
|
1768
|
-
en_US: EN_US
|
|
1769
|
-
};
|
|
1770
|
-
const DRILL_DOWN_PRE_CLASS = "s2-drill-down";
|
|
1771
1776
|
s2.extendLocale(Locale);
|
|
1772
1777
|
const useExpose = (expose) => {
|
|
1773
1778
|
const s2Ref = vue.shallowRef();
|
|
@@ -2009,9 +2014,15 @@ const _sfc_main$9 = vue.defineComponent({
|
|
|
2009
2014
|
name: "TooltipSummary",
|
|
2010
2015
|
props: ["summaries"],
|
|
2011
2016
|
setup(props) {
|
|
2012
|
-
const
|
|
2017
|
+
const summaryInfo = vue.computed(() => reduce(props.summaries, (pre, next) => {
|
|
2018
|
+
pre.count += size(next == null ? void 0 : next.selectedData);
|
|
2019
|
+
if (next.value || next.name) {
|
|
2020
|
+
pre.summaries.push(next);
|
|
2021
|
+
}
|
|
2022
|
+
return pre;
|
|
2023
|
+
}, { count: 0, summaries: [] }));
|
|
2013
2024
|
return {
|
|
2014
|
-
|
|
2025
|
+
summaryInfo,
|
|
2015
2026
|
i18n: s2.i18n,
|
|
2016
2027
|
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
2017
2028
|
};
|
|
@@ -2027,10 +2038,10 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2027
2038
|
}, [
|
|
2028
2039
|
vue.createElementVNode("span", {
|
|
2029
2040
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-selected`)
|
|
2030
|
-
}, vue.toDisplayString(_ctx.count) + " " + vue.toDisplayString(_ctx.i18n("\u9879")), 3),
|
|
2041
|
+
}, vue.toDisplayString(_ctx.summaryInfo.count) + " " + vue.toDisplayString(_ctx.i18n("\u9879")), 3),
|
|
2031
2042
|
vue.createTextVNode(" " + vue.toDisplayString(_ctx.i18n("\u5DF2\u9009\u62E9")), 1)
|
|
2032
2043
|
], 2),
|
|
2033
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.summaries, (summary) => {
|
|
2044
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.summaryInfo.summaries, (summary) => {
|
|
2034
2045
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2035
2046
|
key: `${summary.name}-${summary.value}`,
|
|
2036
2047
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-item`)
|
|
@@ -2081,6 +2092,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
2081
2092
|
};
|
|
2082
2093
|
return {
|
|
2083
2094
|
onMenuTitleClick,
|
|
2095
|
+
isEmpty,
|
|
2084
2096
|
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
2085
2097
|
};
|
|
2086
2098
|
},
|
|
@@ -2095,44 +2107,58 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2095
2107
|
const _component_TooltipOperatorMenu = vue.resolveComponent("TooltipOperatorMenu");
|
|
2096
2108
|
const _component_MenuItem = vue.resolveComponent("MenuItem");
|
|
2097
2109
|
const _component_SubMenu = vue.resolveComponent("SubMenu");
|
|
2098
|
-
return vue.openBlock(), vue.
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
vue.
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
}, [
|
|
2115
|
-
((_a = subMenu == null ? void 0 : subMenu.children) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createBlock(_component_TooltipOperatorMenu, {
|
|
2116
|
-
key: 0,
|
|
2117
|
-
menu: subMenu,
|
|
2118
|
-
cell: _ctx.cell
|
|
2119
|
-
}, null, 8, ["menu", "cell"])) : (vue.openBlock(), vue.createBlock(_component_MenuItem, {
|
|
2120
|
-
title: subMenu.text,
|
|
2110
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
2111
|
+
!_ctx.isEmpty(_ctx.menu.children) ? (vue.openBlock(), vue.createBlock(_component_SubMenu, {
|
|
2112
|
+
key: _ctx.menu.key,
|
|
2113
|
+
popupClassName: `${_ctx.TOOLTIP_PREFIX_CLS}-operator-submenu-popup`,
|
|
2114
|
+
onTitleClick: _ctx.onMenuTitleClick
|
|
2115
|
+
}, {
|
|
2116
|
+
title: vue.withCtx(() => [
|
|
2117
|
+
vue.createVNode(_component_TooltipOperatorTitle, {
|
|
2118
|
+
menu: _ctx.menu,
|
|
2119
|
+
onClick: _ctx.onMenuTitleClick
|
|
2120
|
+
}, null, 8, ["menu", "onClick"])
|
|
2121
|
+
]),
|
|
2122
|
+
default: vue.withCtx(() => [
|
|
2123
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menu.children, (subMenu) => {
|
|
2124
|
+
var _a;
|
|
2125
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2121
2126
|
key: subMenu.key
|
|
2122
|
-
},
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2127
|
+
}, [
|
|
2128
|
+
((_a = subMenu == null ? void 0 : subMenu.children) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createBlock(_component_TooltipOperatorMenu, {
|
|
2129
|
+
key: 0,
|
|
2130
|
+
menu: subMenu,
|
|
2131
|
+
cell: _ctx.cell
|
|
2132
|
+
}, null, 8, ["menu", "cell"])) : (vue.openBlock(), vue.createBlock(_component_MenuItem, {
|
|
2133
|
+
title: subMenu.text,
|
|
2134
|
+
key: subMenu.key
|
|
2135
|
+
}, {
|
|
2136
|
+
default: vue.withCtx(() => [
|
|
2137
|
+
vue.createVNode(_component_TooltipOperatorTitle, {
|
|
2138
|
+
menu: subMenu,
|
|
2139
|
+
onClick: _ctx.onMenuTitleClick
|
|
2140
|
+
}, null, 8, ["menu", "onClick"])
|
|
2141
|
+
]),
|
|
2142
|
+
_: 2
|
|
2143
|
+
}, 1032, ["title"]))
|
|
2144
|
+
], 64);
|
|
2145
|
+
}), 128))
|
|
2146
|
+
]),
|
|
2147
|
+
_: 1
|
|
2148
|
+
}, 8, ["popupClassName", "onTitleClick"])) : vue.createCommentVNode("", true),
|
|
2149
|
+
_ctx.isEmpty(_ctx.menu.children) ? (vue.openBlock(), vue.createBlock(_component_MenuItem, {
|
|
2150
|
+
title: _ctx.menu.text,
|
|
2151
|
+
key: _ctx.menu.key
|
|
2152
|
+
}, {
|
|
2153
|
+
default: vue.withCtx(() => [
|
|
2154
|
+
vue.createVNode(_component_TooltipOperatorTitle, {
|
|
2155
|
+
menu: _ctx.menu,
|
|
2156
|
+
onClick: _ctx.onMenuTitleClick
|
|
2157
|
+
}, null, 8, ["menu", "onClick"])
|
|
2158
|
+
]),
|
|
2159
|
+
_: 1
|
|
2160
|
+
}, 8, ["title"])) : vue.createCommentVNode("", true)
|
|
2161
|
+
], 64);
|
|
2136
2162
|
}
|
|
2137
2163
|
var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
|
|
2138
2164
|
var index_vue_vue_type_style_index_0_lang$1 = "";
|
|
@@ -2144,9 +2170,13 @@ const _sfc_main$6 = vue.defineComponent({
|
|
|
2144
2170
|
"onClick",
|
|
2145
2171
|
"cell"
|
|
2146
2172
|
],
|
|
2147
|
-
setup() {
|
|
2173
|
+
setup(props, { emit }) {
|
|
2174
|
+
const onMenuClick = (...args) => {
|
|
2175
|
+
emit("click", ...args);
|
|
2176
|
+
};
|
|
2148
2177
|
return {
|
|
2149
|
-
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
2178
|
+
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS,
|
|
2179
|
+
onMenuClick
|
|
2150
2180
|
};
|
|
2151
2181
|
},
|
|
2152
2182
|
components: {
|
|
@@ -2167,7 +2197,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2167
2197
|
_ctx.onlyMenu ? (vue.openBlock(), vue.createBlock(_component_Menu, {
|
|
2168
2198
|
key: 0,
|
|
2169
2199
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
|
|
2170
|
-
onClick:
|
|
2200
|
+
onClick: _ctx.onMenuClick
|
|
2171
2201
|
}, {
|
|
2172
2202
|
default: vue.withCtx(() => [
|
|
2173
2203
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menus, (menu) => {
|
|
@@ -2179,7 +2209,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2179
2209
|
}), 128))
|
|
2180
2210
|
]),
|
|
2181
2211
|
_: 1
|
|
2182
|
-
}, 8, ["class"])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.menus, (menu) => {
|
|
2212
|
+
}, 8, ["class", "onClick"])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.menus, (menu) => {
|
|
2183
2213
|
return vue.openBlock(), vue.createBlock(_component_Dropdown, {
|
|
2184
2214
|
key: menu.key,
|
|
2185
2215
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-dropdown`)
|
|
@@ -2190,7 +2220,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2190
2220
|
((_a = menu == null ? void 0 : menu.children) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createBlock(_component_Menu, {
|
|
2191
2221
|
key: 0,
|
|
2192
2222
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
|
|
2193
|
-
onClick:
|
|
2223
|
+
onClick: _ctx.onMenuClick
|
|
2194
2224
|
}, {
|
|
2195
2225
|
default: vue.withCtx(() => [
|
|
2196
2226
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menus, (menu2) => {
|
|
@@ -2202,7 +2232,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2202
2232
|
}), 128))
|
|
2203
2233
|
]),
|
|
2204
2234
|
_: 2
|
|
2205
|
-
}, 1032, ["class"])) : vue.createCommentVNode("", true)
|
|
2235
|
+
}, 1032, ["class", "onClick"])) : vue.createCommentVNode("", true)
|
|
2206
2236
|
];
|
|
2207
2237
|
}),
|
|
2208
2238
|
default: vue.withCtx(() => [
|
|
@@ -2560,7 +2590,7 @@ const initBaseSheetProps = () => ({
|
|
|
2560
2590
|
dataCfg: Object,
|
|
2561
2591
|
themeCfg: Object,
|
|
2562
2592
|
showPagination: {
|
|
2563
|
-
type: Object,
|
|
2593
|
+
type: [Object, Boolean],
|
|
2564
2594
|
default: false
|
|
2565
2595
|
},
|
|
2566
2596
|
loading: Boolean,
|
|
@@ -2571,7 +2601,7 @@ const initBaseSheetProps = () => ({
|
|
|
2571
2601
|
default: {}
|
|
2572
2602
|
},
|
|
2573
2603
|
adaptive: {
|
|
2574
|
-
type: Object,
|
|
2604
|
+
type: [Object, Boolean],
|
|
2575
2605
|
default: false
|
|
2576
2606
|
},
|
|
2577
2607
|
onSpreadsheet: Function,
|
|
@@ -2677,7 +2707,10 @@ const initBaseSheetEmits = () => {
|
|
|
2677
2707
|
"mouseUp",
|
|
2678
2708
|
"selected",
|
|
2679
2709
|
"reset",
|
|
2680
|
-
"linkFieldJump"
|
|
2710
|
+
"linkFieldJump",
|
|
2711
|
+
"click",
|
|
2712
|
+
"doubleClick",
|
|
2713
|
+
"scroll"
|
|
2681
2714
|
];
|
|
2682
2715
|
return keys2;
|
|
2683
2716
|
};
|
|
@@ -2949,7 +2982,7 @@ var DrillDown = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render
|
|
|
2949
2982
|
const _sfc_main$2 = vue.defineComponent({
|
|
2950
2983
|
name: "PivotSheet",
|
|
2951
2984
|
props: initBaseSheetProps(),
|
|
2952
|
-
emits:
|
|
2985
|
+
emits: [],
|
|
2953
2986
|
setup(props, ctx) {
|
|
2954
2987
|
const s2Ref = useExpose(ctx.expose);
|
|
2955
2988
|
const { options: pivotOptions } = vue.toRefs(props);
|