chbim-time-axis-v2 0.0.14 → 0.0.16
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
CHANGED
|
@@ -12345,27 +12345,25 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12345
12345
|
return !(i.left < scrollLeft.value - 100 || i.left > scrollLeft.value + containerWidth.value + 100);
|
|
12346
12346
|
});
|
|
12347
12347
|
}
|
|
12348
|
-
|
|
12349
|
-
|
|
12350
|
-
|
|
12351
|
-
|
|
12352
|
-
|
|
12353
|
-
|
|
12354
|
-
|
|
12355
|
-
|
|
12356
|
-
|
|
12357
|
-
|
|
12358
|
-
|
|
12359
|
-
|
|
12360
|
-
|
|
12361
|
-
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
barData.limitWidth = limitWidth;
|
|
12366
|
-
}
|
|
12367
|
-
bars.push(barData);
|
|
12348
|
+
const shouldRender = isVisible || task.type === "instant" || task.type === "block" && task.allowInstant;
|
|
12349
|
+
if (shouldRender) {
|
|
12350
|
+
const barData = {
|
|
12351
|
+
id: task.id,
|
|
12352
|
+
top: index * 30,
|
|
12353
|
+
left: hasMainBar ? startX : 0,
|
|
12354
|
+
width: hasMainBar ? width : 0,
|
|
12355
|
+
hasMainBar,
|
|
12356
|
+
name: task.name,
|
|
12357
|
+
color: task.type === "group" ? "#4a90e2" : "#50e3c2",
|
|
12358
|
+
originalTask: task,
|
|
12359
|
+
blocks: blocks.length > 0 ? blocks : void 0,
|
|
12360
|
+
instants: instants.length > 0 ? instants : void 0
|
|
12361
|
+
};
|
|
12362
|
+
if (hasLimit) {
|
|
12363
|
+
barData.limitLeft = limitLeft;
|
|
12364
|
+
barData.limitWidth = limitWidth;
|
|
12368
12365
|
}
|
|
12366
|
+
bars.push(barData);
|
|
12369
12367
|
}
|
|
12370
12368
|
});
|
|
12371
12369
|
return bars;
|
|
@@ -12737,8 +12735,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12737
12735
|
};
|
|
12738
12736
|
}
|
|
12739
12737
|
});
|
|
12740
|
-
const
|
|
12741
|
-
const TimelineChart = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
12738
|
+
const TimelineChart_vue_vue_type_style_index_0_scoped_761ad497_lang = "";
|
|
12739
|
+
const TimelineChart = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-761ad497"]]);
|
|
12742
12740
|
const _hoisted_1 = { class: "toolbar" };
|
|
12743
12741
|
const _hoisted_2 = { style: { "flex": "1", "display": "flex", "align-items": "center", "height": "100%" } };
|
|
12744
12742
|
const _hoisted_3 = { class: "left-controls" };
|
|
@@ -12789,6 +12787,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12789
12787
|
},
|
|
12790
12788
|
emits: ["taskUpdate", "update:tasks", "add", "delete", "task-enter", "task-leave"],
|
|
12791
12789
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12790
|
+
const slots = useSlots();
|
|
12792
12791
|
const props = __props;
|
|
12793
12792
|
const emit = __emit;
|
|
12794
12793
|
const contextMenuVisible = ref(false);
|
|
@@ -12832,7 +12831,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12832
12831
|
const builtinMenuTime = ref(null);
|
|
12833
12832
|
const openRowContextMenu = (payload) => {
|
|
12834
12833
|
const { event, task, time } = payload;
|
|
12835
|
-
|
|
12834
|
+
const canAddInstant = task.type !== "group" && (task.type === "instant" || task.allowInstant);
|
|
12835
|
+
const hasCustomSlot = !!slots.rowContextMenu;
|
|
12836
|
+
if (hasCustomSlot || canAddInstant) {
|
|
12836
12837
|
event.preventDefault();
|
|
12837
12838
|
event.stopPropagation();
|
|
12838
12839
|
closeContextMenu();
|
|
@@ -13610,18 +13611,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13610
13611
|
onClick: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
13611
13612
|
}, ["stop"]))
|
|
13612
13613
|
}, [
|
|
13613
|
-
|
|
13614
|
-
|
|
13615
|
-
|
|
13616
|
-
|
|
13617
|
-
},
|
|
13614
|
+
renderSlot(_ctx.$slots, "rowContextMenu", {
|
|
13615
|
+
task: builtinMenuTask.value,
|
|
13616
|
+
time: builtinMenuTime.value,
|
|
13617
|
+
close: closeBuiltinMenu
|
|
13618
|
+
}, () => [
|
|
13619
|
+
createElementVNode("div", _hoisted_17, toDisplayString(unref(dayjs)(builtinMenuTime.value).format("YYYY-MM-DD")), 1),
|
|
13620
|
+
builtinMenuTask.value && builtinMenuTask.value.type !== "group" && (builtinMenuTask.value.type === "instant" || builtinMenuTask.value.allowInstant) ? (openBlock(), createElementBlock("div", {
|
|
13621
|
+
key: 0,
|
|
13622
|
+
class: "builtin-menu-item",
|
|
13623
|
+
onClick: executeAddInstant
|
|
13624
|
+
}, " 添加瞬时任务 ")) : createCommentVNode("", true)
|
|
13625
|
+
], true)
|
|
13618
13626
|
], 4)) : createCommentVNode("", true)
|
|
13619
13627
|
], 2);
|
|
13620
13628
|
};
|
|
13621
13629
|
}
|
|
13622
13630
|
});
|
|
13623
|
-
const
|
|
13624
|
-
const CesiumGantt = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
13631
|
+
const CesiumGantt_vue_vue_type_style_index_0_scoped_6b42d8c6_lang = "";
|
|
13632
|
+
const CesiumGantt = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6b42d8c6"]]);
|
|
13625
13633
|
CesiumGantt.install = (app) => {
|
|
13626
13634
|
app.component("CesiumGantt", CesiumGantt);
|
|
13627
13635
|
};
|