kd-lane-chart-v3 0.0.3 → 0.0.4
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/dist/esm/index.js +38 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/kd-lane-chart-v3.css +71 -58
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -364,8 +364,10 @@ const _sfc_main$c = {
|
|
|
364
364
|
if (relY + this.menuHeight > containerH) {
|
|
365
365
|
relY = clientY - rect.top - this.menuHeight - top + 2;
|
|
366
366
|
}
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
const percentX = Math.max(0, relX) / containerW * 100;
|
|
368
|
+
const percentY = Math.max(0, relY) / containerH * 100;
|
|
369
|
+
menu.style.left = percentX + "%";
|
|
370
|
+
menu.style.top = percentY + "%";
|
|
369
371
|
menu.classList.add("vue-simple-context-menu--active");
|
|
370
372
|
},
|
|
371
373
|
// 以 .kd-lane-chart-container 作为定位父元素(其 position 为 relative)
|
|
@@ -438,7 +440,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
438
440
|
])
|
|
439
441
|
]);
|
|
440
442
|
}
|
|
441
|
-
const VueSimpleContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-
|
|
443
|
+
const VueSimpleContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-38ac9b6e"]]);
|
|
442
444
|
class CustomStrategy {
|
|
443
445
|
constructor(strategy) {
|
|
444
446
|
this.strategy = strategy;
|
|
@@ -2235,7 +2237,8 @@ const _sfc_main$8 = {
|
|
|
2235
2237
|
expandedKeys: [],
|
|
2236
2238
|
currentNodeKey: "",
|
|
2237
2239
|
targetData: void 0,
|
|
2238
|
-
treeKey: ""
|
|
2240
|
+
treeKey: "",
|
|
2241
|
+
tooltipVisible: {}
|
|
2239
2242
|
};
|
|
2240
2243
|
},
|
|
2241
2244
|
methods: {
|
|
@@ -2249,9 +2252,16 @@ const _sfc_main$8 = {
|
|
|
2249
2252
|
}
|
|
2250
2253
|
return nameConfig.paramName;
|
|
2251
2254
|
},
|
|
2255
|
+
handleMouseEnter(event, nodeId) {
|
|
2256
|
+
const target = event.currentTarget;
|
|
2257
|
+
const isOverflow = target.scrollWidth > target.offsetWidth;
|
|
2258
|
+
this.tooltipVisible[nodeId] = isOverflow;
|
|
2259
|
+
},
|
|
2260
|
+
handleMouseLeave(_, nodeId) {
|
|
2261
|
+
this.tooltipVisible[nodeId] = false;
|
|
2262
|
+
},
|
|
2252
2263
|
setTargetData(targetData) {
|
|
2253
2264
|
this.targetData = targetData;
|
|
2254
|
-
console.log(targetData, "333333333");
|
|
2255
2265
|
this.setExpanded();
|
|
2256
2266
|
const dataType = judgeRawDataType(targetData);
|
|
2257
2267
|
switch (dataType) {
|
|
@@ -2512,9 +2522,11 @@ const _sfc_main$8 = {
|
|
|
2512
2522
|
}
|
|
2513
2523
|
};
|
|
2514
2524
|
const _hoisted_1$8 = ["onContextmenu"];
|
|
2515
|
-
const _hoisted_2$7 =
|
|
2516
|
-
const _hoisted_3$5 = {
|
|
2525
|
+
const _hoisted_2$7 = ["onMouseover", "onMouseleave"];
|
|
2526
|
+
const _hoisted_3$5 = { style: { "padding-left": "5px" } };
|
|
2527
|
+
const _hoisted_4$5 = { class: "rtd-config-side-option" };
|
|
2517
2528
|
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2529
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
2518
2530
|
const _component_Star = resolveComponent("Star");
|
|
2519
2531
|
const _component_el_icon = resolveComponent("el-icon");
|
|
2520
2532
|
const _component_el_tree = resolveComponent("el-tree");
|
|
@@ -2556,8 +2568,22 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2556
2568
|
class: "custom-tree-node",
|
|
2557
2569
|
onContextmenu: withModifiers(($event) => $options.showRightWindows($event, data, node), ["prevent"])
|
|
2558
2570
|
}, [
|
|
2559
|
-
|
|
2560
|
-
|
|
2571
|
+
createVNode(_component_el_tooltip, {
|
|
2572
|
+
content: node.label,
|
|
2573
|
+
placement: "right",
|
|
2574
|
+
manual: true,
|
|
2575
|
+
visible: $data.tooltipVisible[node.id]
|
|
2576
|
+
}, {
|
|
2577
|
+
default: withCtx(() => [
|
|
2578
|
+
createElementVNode("span", {
|
|
2579
|
+
class: "tree-node-label",
|
|
2580
|
+
onMouseover: ($event) => $options.handleMouseEnter($event, node.id),
|
|
2581
|
+
onMouseleave: ($event) => $options.handleMouseLeave($event, node.id)
|
|
2582
|
+
}, toDisplayString(node.label), 41, _hoisted_2$7)
|
|
2583
|
+
]),
|
|
2584
|
+
_: 2
|
|
2585
|
+
}, 1032, ["content", "visible"]),
|
|
2586
|
+
withDirectives(createElementVNode("span", _hoisted_3$5, [
|
|
2561
2587
|
createVNode(_component_el_icon, null, {
|
|
2562
2588
|
default: withCtx(() => [
|
|
2563
2589
|
createVNode(_component_Star)
|
|
@@ -2571,7 +2597,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2571
2597
|
]),
|
|
2572
2598
|
_: 1
|
|
2573
2599
|
}, 8, ["data", "current-node-key", "default-expanded-keys", "onNodeClick", "onNodeExpand", "onNodeCollapse"])),
|
|
2574
|
-
createElementVNode("div",
|
|
2600
|
+
createElementVNode("div", _hoisted_4$5, [
|
|
2575
2601
|
createVNode(_component_el_button, { onClick: $options.addTemplate }, {
|
|
2576
2602
|
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
2577
2603
|
createTextVNode("新增模板", -1)
|
|
@@ -2623,7 +2649,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2623
2649
|
[_directive_loading, $data.curveConfigLoading]
|
|
2624
2650
|
]);
|
|
2625
2651
|
}
|
|
2626
|
-
const RealTimeCurveConfig = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-
|
|
2652
|
+
const RealTimeCurveConfig = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-1fb6ec88"]]);
|
|
2627
2653
|
const ACTION_TYPE = {
|
|
2628
2654
|
UPSERT_LINE: "upsertLine",
|
|
2629
2655
|
DELETE_LINE: "delLine"
|
|
@@ -3984,7 +4010,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3984
4010
|
], 2)) : createCommentVNode("", true)
|
|
3985
4011
|
], 544);
|
|
3986
4012
|
}
|
|
3987
|
-
const KdLaneContainerComponent = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-
|
|
4013
|
+
const KdLaneContainerComponent = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-192e257e"]]);
|
|
3988
4014
|
const SLIDER_GROUP_ID = "depthSliderGroup";
|
|
3989
4015
|
function pad2(n) {
|
|
3990
4016
|
return n < 10 ? "0" + n : "" + n;
|