@antv/s2-vue 2.0.0-next.6 → 2.0.0-next.7
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 +1 -0
- 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 +898 -230
- package/esm/index.js +14 -12
- package/esm/index.js.map +1 -1
- package/esm/style.css +27 -20
- package/lib/index.js +14 -12
- package/lib/index.js.map +1 -1
- package/lib/style.css +27 -20
- package/package.json +1 -1
package/esm/index.js
CHANGED
|
@@ -91,7 +91,7 @@ const Locale = {
|
|
|
91
91
|
};
|
|
92
92
|
const SHEET_COMPONENT_DEFAULT_OPTIONS = {
|
|
93
93
|
tooltip: {
|
|
94
|
-
|
|
94
|
+
enable: true,
|
|
95
95
|
autoAdjustBoundary: "body",
|
|
96
96
|
operation: {
|
|
97
97
|
hiddenColumns: true,
|
|
@@ -1723,10 +1723,10 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
|
1723
1723
|
if (!isEmpty(partDrillDown)) {
|
|
1724
1724
|
const drillDownActionIcon = {
|
|
1725
1725
|
belongsCell: "rowCell",
|
|
1726
|
-
|
|
1726
|
+
icons: ["DrillDownIcon"],
|
|
1727
1727
|
defaultHide: true,
|
|
1728
1728
|
displayCondition: partDrillDown.displayCondition || defaultPartDrillDownDisplayCondition,
|
|
1729
|
-
|
|
1729
|
+
onClick: (actionIconProps) => {
|
|
1730
1730
|
const { iconName, meta, event } = actionIconProps;
|
|
1731
1731
|
if (iconName === "DrillDownIcon") {
|
|
1732
1732
|
meta.spreadsheet.store.set("drillDownNode", meta);
|
|
@@ -2063,7 +2063,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
2063
2063
|
name: "TooltipOperator",
|
|
2064
2064
|
props: [
|
|
2065
2065
|
"menus",
|
|
2066
|
-
"
|
|
2066
|
+
"onlyShowOperator",
|
|
2067
2067
|
"onClick",
|
|
2068
2068
|
"cell"
|
|
2069
2069
|
],
|
|
@@ -2092,7 +2092,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2092
2092
|
return openBlock(), createElementBlock("div", {
|
|
2093
2093
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator`)
|
|
2094
2094
|
}, [
|
|
2095
|
-
_ctx.
|
|
2095
|
+
_ctx.onlyShowOperator ? (openBlock(), createBlock(_component_Menu, {
|
|
2096
2096
|
key: 0,
|
|
2097
2097
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
|
|
2098
2098
|
onClick: _ctx.onMenuClick
|
|
@@ -2159,10 +2159,12 @@ const _sfc_main$6 = defineComponent({
|
|
|
2159
2159
|
"content"
|
|
2160
2160
|
],
|
|
2161
2161
|
setup(props) {
|
|
2162
|
-
const { operator,
|
|
2162
|
+
const { operator, onlyShowOperator } = getTooltipDefaultOptions(
|
|
2163
|
+
props.options
|
|
2164
|
+
);
|
|
2163
2165
|
return {
|
|
2164
2166
|
operator,
|
|
2165
|
-
|
|
2167
|
+
onlyShowOperator
|
|
2166
2168
|
};
|
|
2167
2169
|
},
|
|
2168
2170
|
components: {
|
|
@@ -2183,16 +2185,16 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2183
2185
|
const _component_TooltipHeadInfo = resolveComponent("TooltipHeadInfo");
|
|
2184
2186
|
const _component_TooltipDetail = resolveComponent("TooltipDetail");
|
|
2185
2187
|
const _component_TooltipInfos = resolveComponent("TooltipInfos");
|
|
2186
|
-
return _ctx.
|
|
2188
|
+
return _ctx.onlyShowOperator ? (openBlock(), createBlock(_component_TooltipOperator, {
|
|
2187
2189
|
key: 0,
|
|
2188
2190
|
menus: ((_a = _ctx.operator) == null ? void 0 : _a.menus) || [],
|
|
2189
|
-
|
|
2191
|
+
onlyShowOperator: true,
|
|
2190
2192
|
cell: _ctx.cell,
|
|
2191
2193
|
onClick: (_b = _ctx.operator) == null ? void 0 : _b.onClick
|
|
2192
2194
|
}, null, 8, ["menus", "cell", "onClick"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2193
2195
|
createVNode(_component_TooltipOperator, {
|
|
2194
2196
|
menus: ((_c = _ctx.operator) == null ? void 0 : _c.menus) || [],
|
|
2195
|
-
|
|
2197
|
+
onlyShowOperator: false,
|
|
2196
2198
|
cell: _ctx.cell,
|
|
2197
2199
|
onClick: (_d = _ctx.operator) == null ? void 0 : _d.onClick
|
|
2198
2200
|
}, null, 8, ["menus", "cell", "onClick"]),
|
|
@@ -2384,7 +2386,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2384
2386
|
const S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
|
|
2385
2387
|
const RENDER_TOOLTIP_OPTION = {
|
|
2386
2388
|
tooltip: {
|
|
2387
|
-
|
|
2389
|
+
render: (spreadsheet) => new CustomTooltip(spreadsheet)
|
|
2388
2390
|
}
|
|
2389
2391
|
};
|
|
2390
2392
|
const getSheetComponentOptions = (...options) => getBaseSheetComponentOptions(RENDER_TOOLTIP_OPTION, ...options);
|
|
@@ -2708,7 +2710,7 @@ const useSheetUpdate = (s2Ref, props) => {
|
|
|
2708
2710
|
(dataCfg, prevDataCfg) => {
|
|
2709
2711
|
var _a, _b, _c, _d, _e, _f;
|
|
2710
2712
|
if (((_b = (_a = prevDataCfg == null ? void 0 : prevDataCfg.fields) == null ? void 0 : _a.columns) == null ? void 0 : _b.length) !== ((_d = (_c = dataCfg == null ? void 0 : dataCfg.fields) == null ? void 0 : _c.columns) == null ? void 0 : _d.length)) {
|
|
2711
|
-
(_e = s2Ref.value) == null ? void 0 : _e.
|
|
2713
|
+
(_e = s2Ref.value) == null ? void 0 : _e.facet.clearInitColLeafNodes();
|
|
2712
2714
|
}
|
|
2713
2715
|
updateFlag.rerender = true;
|
|
2714
2716
|
updateFlag.reloadData = true;
|