@morghulis/core 1.0.24 → 1.0.25
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.
|
@@ -15627,28 +15627,29 @@ const _v = /* @__PURE__ */ R({
|
|
|
15627
15627
|
setup(e, { emit: t }) {
|
|
15628
15628
|
const n = t, o = e, l = O({
|
|
15629
15629
|
get: () => o.modelValue,
|
|
15630
|
-
set: (
|
|
15631
|
-
})
|
|
15632
|
-
|
|
15633
|
-
|
|
15634
|
-
o.rest.switch_nodes(c, u);
|
|
15635
|
-
}
|
|
15636
|
-
function s() {
|
|
15630
|
+
set: (i) => n("update:modelValue", i)
|
|
15631
|
+
});
|
|
15632
|
+
O(() => o.view.allow_insert);
|
|
15633
|
+
function r(i) {
|
|
15637
15634
|
const u = o.selection.map((c) => c.id);
|
|
15638
|
-
o.rest.
|
|
15635
|
+
o.rest.switch_nodes(u, i);
|
|
15636
|
+
}
|
|
15637
|
+
function a() {
|
|
15638
|
+
const i = o.selection.map((u) => u.id);
|
|
15639
|
+
o.rest.delete_many(i);
|
|
15639
15640
|
}
|
|
15640
|
-
const
|
|
15641
|
-
const
|
|
15642
|
-
if (
|
|
15641
|
+
const s = O(() => {
|
|
15642
|
+
const i = [...new Set(o.selection.map((u) => u.isLeaf))];
|
|
15643
|
+
if (i.length === 0)
|
|
15643
15644
|
return {
|
|
15644
15645
|
leaf: !0,
|
|
15645
15646
|
folder: !0
|
|
15646
15647
|
};
|
|
15647
|
-
if (
|
|
15648
|
-
const
|
|
15648
|
+
if (i.length === 1) {
|
|
15649
|
+
const u = i[0];
|
|
15649
15650
|
return {
|
|
15650
|
-
leaf:
|
|
15651
|
-
folder: !
|
|
15651
|
+
leaf: u,
|
|
15652
|
+
folder: !u
|
|
15652
15653
|
};
|
|
15653
15654
|
} else
|
|
15654
15655
|
return {
|
|
@@ -15656,11 +15657,11 @@ const _v = /* @__PURE__ */ R({
|
|
|
15656
15657
|
folder: !1
|
|
15657
15658
|
};
|
|
15658
15659
|
});
|
|
15659
|
-
return (
|
|
15660
|
-
const
|
|
15661
|
-
return y(), k(
|
|
15660
|
+
return (i, u) => {
|
|
15661
|
+
const c = w("el-input"), d = w("el-popover"), v = w("el-space");
|
|
15662
|
+
return y(), k(v, null, {
|
|
15662
15663
|
default: f(() => [
|
|
15663
|
-
m(
|
|
15664
|
+
m(d, null, {
|
|
15664
15665
|
reference: f(() => [
|
|
15665
15666
|
m(_(q), {
|
|
15666
15667
|
class: "pointer",
|
|
@@ -15669,9 +15670,9 @@ const _v = /* @__PURE__ */ R({
|
|
|
15669
15670
|
}, null, 8, ["type"])
|
|
15670
15671
|
]),
|
|
15671
15672
|
default: f(() => [
|
|
15672
|
-
m(
|
|
15673
|
+
m(c, {
|
|
15673
15674
|
modelValue: l.value,
|
|
15674
|
-
"onUpdate:modelValue":
|
|
15675
|
+
"onUpdate:modelValue": u[0] || (u[0] = (g) => l.value = g),
|
|
15675
15676
|
clearable: ""
|
|
15676
15677
|
}, null, 8, ["modelValue"])
|
|
15677
15678
|
]),
|
|
@@ -15679,36 +15680,35 @@ const _v = /* @__PURE__ */ R({
|
|
|
15679
15680
|
}),
|
|
15680
15681
|
e.view.allow_insert ? (y(), k(_(W), {
|
|
15681
15682
|
key: 0,
|
|
15682
|
-
disabled: !r.value,
|
|
15683
15683
|
title: "添加",
|
|
15684
15684
|
icon: "plus-square",
|
|
15685
|
-
onClick:
|
|
15686
|
-
}
|
|
15685
|
+
onClick: u[1] || (u[1] = (g) => n("batch"))
|
|
15686
|
+
})) : K("", !0),
|
|
15687
15687
|
e.view.allow_remove ? (y(), k(_(W), {
|
|
15688
15688
|
key: 1,
|
|
15689
15689
|
disabled: !e.selection.length,
|
|
15690
15690
|
title: "删除",
|
|
15691
15691
|
icon: "trash",
|
|
15692
|
-
onClick:
|
|
15692
|
+
onClick: a
|
|
15693
15693
|
}, null, 8, ["disabled"])) : K("", !0),
|
|
15694
15694
|
e.view.allow_edit ? (y(), k(_(W), {
|
|
15695
15695
|
key: 2,
|
|
15696
|
-
disabled:
|
|
15696
|
+
disabled: s.value.leaf,
|
|
15697
15697
|
title: "切换为叶子",
|
|
15698
15698
|
icon: "leaf",
|
|
15699
|
-
onClick:
|
|
15699
|
+
onClick: u[2] || (u[2] = (g) => r(!0))
|
|
15700
15700
|
}, null, 8, ["disabled"])) : K("", !0),
|
|
15701
15701
|
e.view.allow_edit ? (y(), k(_(W), {
|
|
15702
15702
|
key: 3,
|
|
15703
|
-
disabled:
|
|
15703
|
+
disabled: s.value.folder,
|
|
15704
15704
|
title: "切换为分支",
|
|
15705
15705
|
icon: "folder",
|
|
15706
|
-
onClick:
|
|
15706
|
+
onClick: u[3] || (u[3] = (g) => r(!1))
|
|
15707
15707
|
}, null, 8, ["disabled"])) : K("", !0),
|
|
15708
15708
|
m(_(W), {
|
|
15709
15709
|
title: "表格查看",
|
|
15710
15710
|
icon: "table",
|
|
15711
|
-
onClick:
|
|
15711
|
+
onClick: u[4] || (u[4] = (g) => n("table"))
|
|
15712
15712
|
})
|
|
15713
15713
|
]),
|
|
15714
15714
|
_: 1
|