chbim-time-axis-v2 0.0.15 → 0.0.17
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.
|
@@ -12785,8 +12785,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12785
12785
|
clock: {},
|
|
12786
12786
|
tasks: {}
|
|
12787
12787
|
},
|
|
12788
|
-
emits: ["taskUpdate", "update:tasks", "add", "delete", "task-enter", "task-leave"],
|
|
12788
|
+
emits: ["taskUpdate", "update:tasks", "add", "delete", "task-enter", "task-leave", "blockUpdate"],
|
|
12789
12789
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12790
|
+
const slots = useSlots();
|
|
12790
12791
|
const props = __props;
|
|
12791
12792
|
const emit = __emit;
|
|
12792
12793
|
const contextMenuVisible = ref(false);
|
|
@@ -12830,7 +12831,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12830
12831
|
const builtinMenuTime = ref(null);
|
|
12831
12832
|
const openRowContextMenu = (payload) => {
|
|
12832
12833
|
const { event, task, time } = payload;
|
|
12833
|
-
|
|
12834
|
+
const canAddInstant = task.type !== "group" && (task.type === "instant" || task.allowInstant);
|
|
12835
|
+
const hasCustomSlot = !!slots.rowContextMenu;
|
|
12836
|
+
if (hasCustomSlot || canAddInstant) {
|
|
12834
12837
|
event.preventDefault();
|
|
12835
12838
|
event.stopPropagation();
|
|
12836
12839
|
closeContextMenu();
|
|
@@ -13252,6 +13255,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13252
13255
|
if (t.blocks && t.blocks[payload.blockIndex]) {
|
|
13253
13256
|
t.blocks[payload.blockIndex].startTime = payload.startTime;
|
|
13254
13257
|
t.blocks[payload.blockIndex].endTime = payload.endTime;
|
|
13258
|
+
emit("blockUpdate", {
|
|
13259
|
+
task: JSON.parse(JSON.stringify(t)),
|
|
13260
|
+
block: JSON.parse(JSON.stringify(t.blocks[payload.blockIndex])),
|
|
13261
|
+
index: payload.blockIndex
|
|
13262
|
+
});
|
|
13255
13263
|
emit("taskUpdate", JSON.parse(JSON.stringify(t)));
|
|
13256
13264
|
return true;
|
|
13257
13265
|
}
|
|
@@ -13608,18 +13616,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13608
13616
|
onClick: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
13609
13617
|
}, ["stop"]))
|
|
13610
13618
|
}, [
|
|
13611
|
-
|
|
13612
|
-
|
|
13613
|
-
|
|
13614
|
-
|
|
13615
|
-
},
|
|
13619
|
+
renderSlot(_ctx.$slots, "rowContextMenu", {
|
|
13620
|
+
task: builtinMenuTask.value,
|
|
13621
|
+
time: builtinMenuTime.value,
|
|
13622
|
+
close: closeBuiltinMenu
|
|
13623
|
+
}, () => [
|
|
13624
|
+
createElementVNode("div", _hoisted_17, toDisplayString(unref(dayjs)(builtinMenuTime.value).format("YYYY-MM-DD")), 1),
|
|
13625
|
+
builtinMenuTask.value && builtinMenuTask.value.type !== "group" && (builtinMenuTask.value.type === "instant" || builtinMenuTask.value.allowInstant) ? (openBlock(), createElementBlock("div", {
|
|
13626
|
+
key: 0,
|
|
13627
|
+
class: "builtin-menu-item",
|
|
13628
|
+
onClick: executeAddInstant
|
|
13629
|
+
}, " 添加瞬时任务 ")) : createCommentVNode("", true)
|
|
13630
|
+
], true)
|
|
13616
13631
|
], 4)) : createCommentVNode("", true)
|
|
13617
13632
|
], 2);
|
|
13618
13633
|
};
|
|
13619
13634
|
}
|
|
13620
13635
|
});
|
|
13621
|
-
const
|
|
13622
|
-
const CesiumGantt = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
13636
|
+
const CesiumGantt_vue_vue_type_style_index_0_scoped_bc47a9ac_lang = "";
|
|
13637
|
+
const CesiumGantt = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bc47a9ac"]]);
|
|
13623
13638
|
CesiumGantt.install = (app) => {
|
|
13624
13639
|
app.component("CesiumGantt", CesiumGantt);
|
|
13625
13640
|
};
|