@antv/s2-vue 1.1.0-alpha.1 → 1.2.0
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 +181 -69
- package/esm/index.js +173 -143
- package/esm/index.js.map +1 -1
- package/esm/style.css +6 -0
- package/lib/index.js +172 -142
- package/lib/index.js.map +1 -1
- package/lib/style.css +6 -0
- package/package.json +2 -2
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,7 +1621,6 @@ function size(collection) {
|
|
|
1539
1621
|
}
|
|
1540
1622
|
return baseKeys(collection).length;
|
|
1541
1623
|
}
|
|
1542
|
-
const RESIZE_RENDER_DELAY = 200;
|
|
1543
1624
|
const analyzeAdaptive = (paramsContainer, adaptive) => {
|
|
1544
1625
|
var _a, _b, _c;
|
|
1545
1626
|
let container = paramsContainer;
|
|
@@ -1624,9 +1705,13 @@ const handleActionIconClick = (params) => {
|
|
|
1624
1705
|
event
|
|
1625
1706
|
});
|
|
1626
1707
|
};
|
|
1627
|
-
const
|
|
1628
|
-
|
|
1629
|
-
|
|
1708
|
+
const defaultPartDrillDownDisplayCondition = (meta) => {
|
|
1709
|
+
var _a;
|
|
1710
|
+
const s22 = meta.spreadsheet;
|
|
1711
|
+
const { fields } = s22.dataCfg;
|
|
1712
|
+
const iconLevel = ((_a = fields.rows) == null ? void 0 : _a.length) - 1;
|
|
1713
|
+
const isValueInCols = !isEmpty(fields.values) ? s22.isValueInCols() : true;
|
|
1714
|
+
return iconLevel <= meta.level && s22.isHierarchyTreeType() && isValueInCols && !meta.isGrandTotals;
|
|
1630
1715
|
};
|
|
1631
1716
|
const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
1632
1717
|
var _a;
|
|
@@ -1636,7 +1721,7 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
|
1636
1721
|
belongsCell: "rowCell",
|
|
1637
1722
|
iconNames: ["DrillDownIcon"],
|
|
1638
1723
|
defaultHide: true,
|
|
1639
|
-
displayCondition: partDrillDown.displayCondition ||
|
|
1724
|
+
displayCondition: partDrillDown.displayCondition || defaultPartDrillDownDisplayCondition,
|
|
1640
1725
|
action: (actionIconProps) => {
|
|
1641
1726
|
const { iconName, meta, event } = actionIconProps;
|
|
1642
1727
|
if (iconName === "DrillDownIcon") {
|
|
@@ -1656,10 +1741,8 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
|
1656
1741
|
});
|
|
1657
1742
|
};
|
|
1658
1743
|
const handleDrillDown = (params) => {
|
|
1659
|
-
const { fetchData, spreadsheet, drillFields, drillItemsNum } = params;
|
|
1660
|
-
|
|
1661
|
-
spreadsheet.store.set("drillItemsNum", drillItemsNum);
|
|
1662
|
-
}
|
|
1744
|
+
const { fetchData, spreadsheet, drillFields, drillItemsNum = -1 } = params;
|
|
1745
|
+
spreadsheet.store.set("drillItemsNum", drillItemsNum);
|
|
1663
1746
|
const meta = spreadsheet.store.get("drillDownNode");
|
|
1664
1747
|
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
|
|
1665
1748
|
let newDrillDownDataCache = clone(drillDownDataCache);
|
|
@@ -1687,87 +1770,6 @@ const handleDrillDown = (params) => {
|
|
|
1687
1770
|
spreadsheet.render(false);
|
|
1688
1771
|
});
|
|
1689
1772
|
};
|
|
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
1773
|
s2.extendLocale(Locale);
|
|
1772
1774
|
const useExpose = (expose) => {
|
|
1773
1775
|
const s2Ref = vue.shallowRef();
|
|
@@ -2009,9 +2011,15 @@ const _sfc_main$9 = vue.defineComponent({
|
|
|
2009
2011
|
name: "TooltipSummary",
|
|
2010
2012
|
props: ["summaries"],
|
|
2011
2013
|
setup(props) {
|
|
2012
|
-
const
|
|
2014
|
+
const summaryInfo = vue.computed(() => reduce(props.summaries, (pre, next) => {
|
|
2015
|
+
pre.count += size(next == null ? void 0 : next.selectedData);
|
|
2016
|
+
if (next.value || next.name) {
|
|
2017
|
+
pre.summaries.push(next);
|
|
2018
|
+
}
|
|
2019
|
+
return pre;
|
|
2020
|
+
}, { count: 0, summaries: [] }));
|
|
2013
2021
|
return {
|
|
2014
|
-
|
|
2022
|
+
summaryInfo,
|
|
2015
2023
|
i18n: s2.i18n,
|
|
2016
2024
|
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
2017
2025
|
};
|
|
@@ -2027,10 +2035,10 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2027
2035
|
}, [
|
|
2028
2036
|
vue.createElementVNode("span", {
|
|
2029
2037
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-selected`)
|
|
2030
|
-
}, vue.toDisplayString(_ctx.count) + " " + vue.toDisplayString(_ctx.i18n("\u9879")), 3),
|
|
2038
|
+
}, vue.toDisplayString(_ctx.summaryInfo.count) + " " + vue.toDisplayString(_ctx.i18n("\u9879")), 3),
|
|
2031
2039
|
vue.createTextVNode(" " + vue.toDisplayString(_ctx.i18n("\u5DF2\u9009\u62E9")), 1)
|
|
2032
2040
|
], 2),
|
|
2033
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.summaries, (summary) => {
|
|
2041
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.summaryInfo.summaries, (summary) => {
|
|
2034
2042
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2035
2043
|
key: `${summary.name}-${summary.value}`,
|
|
2036
2044
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-item`)
|
|
@@ -2081,6 +2089,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
2081
2089
|
};
|
|
2082
2090
|
return {
|
|
2083
2091
|
onMenuTitleClick,
|
|
2092
|
+
isEmpty,
|
|
2084
2093
|
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
2085
2094
|
};
|
|
2086
2095
|
},
|
|
@@ -2095,44 +2104,58 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2095
2104
|
const _component_TooltipOperatorMenu = vue.resolveComponent("TooltipOperatorMenu");
|
|
2096
2105
|
const _component_MenuItem = vue.resolveComponent("MenuItem");
|
|
2097
2106
|
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,
|
|
2107
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
2108
|
+
!_ctx.isEmpty(_ctx.menu.children) ? (vue.openBlock(), vue.createBlock(_component_SubMenu, {
|
|
2109
|
+
key: _ctx.menu.key,
|
|
2110
|
+
popupClassName: `${_ctx.TOOLTIP_PREFIX_CLS}-operator-submenu-popup`,
|
|
2111
|
+
onTitleClick: _ctx.onMenuTitleClick
|
|
2112
|
+
}, {
|
|
2113
|
+
title: vue.withCtx(() => [
|
|
2114
|
+
vue.createVNode(_component_TooltipOperatorTitle, {
|
|
2115
|
+
menu: _ctx.menu,
|
|
2116
|
+
onClick: _ctx.onMenuTitleClick
|
|
2117
|
+
}, null, 8, ["menu", "onClick"])
|
|
2118
|
+
]),
|
|
2119
|
+
default: vue.withCtx(() => [
|
|
2120
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menu.children, (subMenu) => {
|
|
2121
|
+
var _a;
|
|
2122
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2121
2123
|
key: subMenu.key
|
|
2122
|
-
},
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2124
|
+
}, [
|
|
2125
|
+
((_a = subMenu == null ? void 0 : subMenu.children) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createBlock(_component_TooltipOperatorMenu, {
|
|
2126
|
+
key: 0,
|
|
2127
|
+
menu: subMenu,
|
|
2128
|
+
cell: _ctx.cell
|
|
2129
|
+
}, null, 8, ["menu", "cell"])) : (vue.openBlock(), vue.createBlock(_component_MenuItem, {
|
|
2130
|
+
title: subMenu.text,
|
|
2131
|
+
key: subMenu.key
|
|
2132
|
+
}, {
|
|
2133
|
+
default: vue.withCtx(() => [
|
|
2134
|
+
vue.createVNode(_component_TooltipOperatorTitle, {
|
|
2135
|
+
menu: subMenu,
|
|
2136
|
+
onClick: _ctx.onMenuTitleClick
|
|
2137
|
+
}, null, 8, ["menu", "onClick"])
|
|
2138
|
+
]),
|
|
2139
|
+
_: 2
|
|
2140
|
+
}, 1032, ["title"]))
|
|
2141
|
+
], 64);
|
|
2142
|
+
}), 128))
|
|
2143
|
+
]),
|
|
2144
|
+
_: 1
|
|
2145
|
+
}, 8, ["popupClassName", "onTitleClick"])) : vue.createCommentVNode("", true),
|
|
2146
|
+
_ctx.isEmpty(_ctx.menu.children) ? (vue.openBlock(), vue.createBlock(_component_MenuItem, {
|
|
2147
|
+
title: _ctx.menu.text,
|
|
2148
|
+
key: _ctx.menu.key
|
|
2149
|
+
}, {
|
|
2150
|
+
default: vue.withCtx(() => [
|
|
2151
|
+
vue.createVNode(_component_TooltipOperatorTitle, {
|
|
2152
|
+
menu: _ctx.menu,
|
|
2153
|
+
onClick: _ctx.onMenuTitleClick
|
|
2154
|
+
}, null, 8, ["menu", "onClick"])
|
|
2155
|
+
]),
|
|
2156
|
+
_: 1
|
|
2157
|
+
}, 8, ["title"])) : vue.createCommentVNode("", true)
|
|
2158
|
+
], 64);
|
|
2136
2159
|
}
|
|
2137
2160
|
var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
|
|
2138
2161
|
var index_vue_vue_type_style_index_0_lang$1 = "";
|
|
@@ -2144,9 +2167,13 @@ const _sfc_main$6 = vue.defineComponent({
|
|
|
2144
2167
|
"onClick",
|
|
2145
2168
|
"cell"
|
|
2146
2169
|
],
|
|
2147
|
-
setup() {
|
|
2170
|
+
setup(props, { emit }) {
|
|
2171
|
+
const onMenuClick = (...args) => {
|
|
2172
|
+
emit("click", ...args);
|
|
2173
|
+
};
|
|
2148
2174
|
return {
|
|
2149
|
-
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
2175
|
+
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS,
|
|
2176
|
+
onMenuClick
|
|
2150
2177
|
};
|
|
2151
2178
|
},
|
|
2152
2179
|
components: {
|
|
@@ -2167,7 +2194,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2167
2194
|
_ctx.onlyMenu ? (vue.openBlock(), vue.createBlock(_component_Menu, {
|
|
2168
2195
|
key: 0,
|
|
2169
2196
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
|
|
2170
|
-
onClick:
|
|
2197
|
+
onClick: _ctx.onMenuClick
|
|
2171
2198
|
}, {
|
|
2172
2199
|
default: vue.withCtx(() => [
|
|
2173
2200
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menus, (menu) => {
|
|
@@ -2179,7 +2206,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2179
2206
|
}), 128))
|
|
2180
2207
|
]),
|
|
2181
2208
|
_: 1
|
|
2182
|
-
}, 8, ["class"])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.menus, (menu) => {
|
|
2209
|
+
}, 8, ["class", "onClick"])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.menus, (menu) => {
|
|
2183
2210
|
return vue.openBlock(), vue.createBlock(_component_Dropdown, {
|
|
2184
2211
|
key: menu.key,
|
|
2185
2212
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-dropdown`)
|
|
@@ -2190,7 +2217,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2190
2217
|
((_a = menu == null ? void 0 : menu.children) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createBlock(_component_Menu, {
|
|
2191
2218
|
key: 0,
|
|
2192
2219
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
|
|
2193
|
-
onClick:
|
|
2220
|
+
onClick: _ctx.onMenuClick
|
|
2194
2221
|
}, {
|
|
2195
2222
|
default: vue.withCtx(() => [
|
|
2196
2223
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menus, (menu2) => {
|
|
@@ -2202,7 +2229,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2202
2229
|
}), 128))
|
|
2203
2230
|
]),
|
|
2204
2231
|
_: 2
|
|
2205
|
-
}, 1032, ["class"])) : vue.createCommentVNode("", true)
|
|
2232
|
+
}, 1032, ["class", "onClick"])) : vue.createCommentVNode("", true)
|
|
2206
2233
|
];
|
|
2207
2234
|
}),
|
|
2208
2235
|
default: vue.withCtx(() => [
|
|
@@ -2353,6 +2380,7 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2353
2380
|
useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_MOUSE_UP, "rowCellMouseUp");
|
|
2354
2381
|
useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_MOUSE_MOVE, "rowCellMouseMove");
|
|
2355
2382
|
useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_COLLAPSE_TREE_ROWS, "rowCellCollapseTreeRows");
|
|
2383
|
+
useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_SCROLL, "rowCellScroll");
|
|
2356
2384
|
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_HOVER, "colCellHover");
|
|
2357
2385
|
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_CLICK, "colCellClick");
|
|
2358
2386
|
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_DOUBLE_CLICK, "colCellDoubleClick");
|
|
@@ -2368,8 +2396,8 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2368
2396
|
useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_MOUSE_UP, "dataCellMouseUp");
|
|
2369
2397
|
useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_MOUSE_MOVE, "dataCellMouseMove");
|
|
2370
2398
|
useS2Event(s2Ref, emit, s2.S2Event.DATA_CELL_TREND_ICON_CLICK, "dataCellTrendIconClick");
|
|
2371
|
-
useS2Event(s2Ref, emit, s2.S2Event.
|
|
2372
|
-
useS2Event(s2Ref, emit, s2.S2Event.
|
|
2399
|
+
useS2Event(s2Ref, emit, s2.S2Event.DATA_CELL_BRUSH_SELECTION, "dataCellBrushSelection");
|
|
2400
|
+
useS2Event(s2Ref, emit, s2.S2Event.DATA_CELL_SELECT_MOVE, "dataCellSelectMove");
|
|
2373
2401
|
useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_HOVER, "cornerCellHover");
|
|
2374
2402
|
useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_CLICK, "cornerCellClick");
|
|
2375
2403
|
useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_DOUBLE_CLICK, "cornerCellDoubleClick");
|
|
@@ -2421,6 +2449,7 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2421
2449
|
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_MOUSE_UP, "mouseUp");
|
|
2422
2450
|
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_RESET, "reset");
|
|
2423
2451
|
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_LINK_FIELD_JUMP, "linkFieldJump");
|
|
2452
|
+
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_SCROLL, "scroll");
|
|
2424
2453
|
});
|
|
2425
2454
|
};
|
|
2426
2455
|
const useLoading = (s2Ref, loadingProp = false) => {
|
|
@@ -2558,7 +2587,7 @@ const initBaseSheetProps = () => ({
|
|
|
2558
2587
|
dataCfg: Object,
|
|
2559
2588
|
themeCfg: Object,
|
|
2560
2589
|
showPagination: {
|
|
2561
|
-
type: Object,
|
|
2590
|
+
type: [Object, Boolean],
|
|
2562
2591
|
default: false
|
|
2563
2592
|
},
|
|
2564
2593
|
loading: Boolean,
|
|
@@ -2569,7 +2598,7 @@ const initBaseSheetProps = () => ({
|
|
|
2569
2598
|
default: {}
|
|
2570
2599
|
},
|
|
2571
2600
|
adaptive: {
|
|
2572
|
-
type: Object,
|
|
2601
|
+
type: [Object, Boolean],
|
|
2573
2602
|
default: false
|
|
2574
2603
|
},
|
|
2575
2604
|
onSpreadsheet: Function,
|
|
@@ -2675,7 +2704,8 @@ const initBaseSheetEmits = () => {
|
|
|
2675
2704
|
"mouseUp",
|
|
2676
2705
|
"selected",
|
|
2677
2706
|
"reset",
|
|
2678
|
-
"linkFieldJump"
|
|
2707
|
+
"linkFieldJump",
|
|
2708
|
+
"scroll"
|
|
2679
2709
|
];
|
|
2680
2710
|
return keys2;
|
|
2681
2711
|
};
|