smart-web-ui 1.0.8 → 1.0.9
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/smart-web-ui.css +1 -1
- package/dist/smart-web-ui.es.js +67 -54
- package/dist/smart-web-ui.umd.js +29 -29
- package/package.json +1 -1
package/dist/smart-web-ui.es.js
CHANGED
|
@@ -59479,6 +59479,11 @@ const iae = { class: "building-list" }, oae = {
|
|
|
59479
59479
|
type: Object,
|
|
59480
59480
|
default: null
|
|
59481
59481
|
},
|
|
59482
|
+
// 当前处于透明状态的楼层 guid
|
|
59483
|
+
activeTransparent: {
|
|
59484
|
+
type: [Object, String],
|
|
59485
|
+
default: void 0
|
|
59486
|
+
},
|
|
59482
59487
|
// 加载状态
|
|
59483
59488
|
loading: {
|
|
59484
59489
|
type: Boolean,
|
|
@@ -59490,6 +59495,8 @@ const iae = { class: "building-list" }, oae = {
|
|
|
59490
59495
|
// 更新高亮建筑
|
|
59491
59496
|
"update:activeChild",
|
|
59492
59497
|
// 更新高亮楼层
|
|
59498
|
+
"update:activeTransparent",
|
|
59499
|
+
// 更新透明楼层
|
|
59493
59500
|
"select-build",
|
|
59494
59501
|
// 点击建筑标题
|
|
59495
59502
|
"reset-build",
|
|
@@ -59503,95 +59510,101 @@ const iae = { class: "building-list" }, oae = {
|
|
|
59503
59510
|
"toggle-show",
|
|
59504
59511
|
// 点击显示/隐藏图标
|
|
59505
59512
|
"toggle-expand"
|
|
59506
|
-
// 点击列表展开/折叠(可选,用于父组件监听UI状态)
|
|
59513
|
+
// 点击列表展开/折叠(可选,用于父组件监听 UI 状态)
|
|
59507
59514
|
],
|
|
59508
59515
|
setup(r, { emit: e }) {
|
|
59509
|
-
const t = r, n = e, a = Ae(/* @__PURE__ */ new Set()), i = Ae(/* @__PURE__ */ new Set()), o = (
|
|
59510
|
-
|
|
59511
|
-
|
|
59512
|
-
|
|
59513
|
-
|
|
59514
|
-
w
|
|
59515
|
-
|
|
59516
|
-
|
|
59517
|
-
|
|
59518
|
-
|
|
59519
|
-
|
|
59520
|
-
|
|
59521
|
-
|
|
59522
|
-
|
|
59523
|
-
|
|
59524
|
-
|
|
59525
|
-
|
|
59526
|
-
|
|
59527
|
-
|
|
59528
|
-
},
|
|
59529
|
-
|
|
59530
|
-
|
|
59531
|
-
|
|
59532
|
-
|
|
59533
|
-
|
|
59516
|
+
const t = r, n = e, a = Ae(/* @__PURE__ */ new Set()), i = Ae(/* @__PURE__ */ new Set()), o = Ae(/* @__PURE__ */ new Set()), s = (m, w) => m.guid ?? m.id ?? m.name ?? w, l = (m, w) => a.value.has(s(m, w)), u = (m, w) => i.value.has(s(m, w)), f = (m) => m == null ? null : typeof m == "object" ? m.guid ?? m.id ?? null : m, c = () => t.activeTransparent !== void 0;
|
|
59517
|
+
de(
|
|
59518
|
+
() => t.activeTransparent,
|
|
59519
|
+
(m) => {
|
|
59520
|
+
if (!c()) return;
|
|
59521
|
+
const w = f(m);
|
|
59522
|
+
o.value = w ? /* @__PURE__ */ new Set([w]) : /* @__PURE__ */ new Set();
|
|
59523
|
+
},
|
|
59524
|
+
{ immediate: !0 }
|
|
59525
|
+
);
|
|
59526
|
+
const h = (m, w) => {
|
|
59527
|
+
const C = s(m, w), S = !l(m, w);
|
|
59528
|
+
let b = /* @__PURE__ */ new Set();
|
|
59529
|
+
if (S ? b.add(C) : (b = new Set(a.value), b.delete(C)), a.value = b, n("toggle-expand", { buildItem: m, index: w, expanded: S }), !S && u(m, w)) {
|
|
59530
|
+
const x = new Set(i.value);
|
|
59531
|
+
x.delete(C), i.value = x, n("toggle-layer", { buildItem: m, index: w, willExpand: !1 });
|
|
59532
|
+
}
|
|
59533
|
+
}, v = (m, w) => {
|
|
59534
|
+
n("update:activeBuild", m.guid), n("update:activeChild", null), n("select-build", { item: m, index: w });
|
|
59535
|
+
}, p = (m) => m ? c() ? m.guid === f(t.activeTransparent) : typeof m.transparent == "boolean" ? m.transparent : typeof m.opacity == "number" ? m.opacity < 1 : o.value.has(m.guid) : !1, d = (m, w) => {
|
|
59536
|
+
if (n("update:activeBuild", m.guid), n("update:activeChild", null), n("reset-build", { item: m, index: w }), u(m, w)) {
|
|
59537
|
+
const C = s(m, w);
|
|
59538
|
+
n("toggle-layer", { item: m, index: w, willExpand: !1 });
|
|
59539
|
+
const S = new Set(i.value);
|
|
59540
|
+
S.delete(C), i.value = S;
|
|
59541
|
+
}
|
|
59542
|
+
}, g = (m, w) => {
|
|
59543
|
+
const C = s(m, w), S = !u(m, w), b = new Set(i.value);
|
|
59544
|
+
S ? b.add(C) : b.delete(C), i.value = b, n("toggle-layer", { buildItem: m, index: w, willExpand: S });
|
|
59545
|
+
}, A = (m, w, C) => {
|
|
59546
|
+
var S;
|
|
59547
|
+
m.guid !== ((S = t.activeChild) == null ? void 0 : S.guid) && (n("update:activeBuild", C.guid), n("update:activeChild", m), n("toggle-show", { child: m, childArray: w, parentItem: C }));
|
|
59548
|
+
}, y = (m, w, C) => {
|
|
59549
|
+
p(m) || (n("update:activeTransparent", m), o.value = /* @__PURE__ */ new Set([m.guid]), n("toggle-transparent", { child: m, childArray: w, parentItem: C, transparent: !0 }));
|
|
59534
59550
|
};
|
|
59535
|
-
return (
|
|
59536
|
-
r.loading ? (Z(), K("div", oae, "加载中...")) : (Z(!0), K(Ut, { key: 1 }, _t(r.buildingList, (
|
|
59537
|
-
key:
|
|
59551
|
+
return (m, w) => (Z(), K("div", iae, [
|
|
59552
|
+
r.loading ? (Z(), K("div", oae, "加载中...")) : (Z(!0), K(Ut, { key: 1 }, _t(r.buildingList, (C, S) => (Z(), K("div", {
|
|
59553
|
+
key: s(C, S),
|
|
59538
59554
|
class: "building-group"
|
|
59539
59555
|
}, [
|
|
59540
59556
|
X("div", {
|
|
59541
59557
|
class: "building-group-title",
|
|
59542
|
-
onClick: ys((
|
|
59558
|
+
onClick: ys((b) => v(C, S), ["stop"])
|
|
59543
59559
|
}, [
|
|
59544
59560
|
X("div", {
|
|
59545
|
-
class: st(["title-text", { active:
|
|
59546
|
-
}, ze(
|
|
59561
|
+
class: st(["title-text", { active: C.guid === r.activeBuild }])
|
|
59562
|
+
}, ze(C.name), 3),
|
|
59547
59563
|
X("div", lae, [
|
|
59548
59564
|
X("i", {
|
|
59549
59565
|
class: "smart-ui-icons smart-ui-icon-building",
|
|
59550
59566
|
title: "重置",
|
|
59551
|
-
onClick: ys((
|
|
59567
|
+
onClick: ys((b) => d(C, S), ["stop"])
|
|
59552
59568
|
}, null, 8, uae),
|
|
59553
59569
|
X("i", {
|
|
59554
59570
|
class: "layer-icon smart-ui-icons smart-ui-icon-layer",
|
|
59555
|
-
title:
|
|
59556
|
-
onClick: ys((
|
|
59571
|
+
title: u(C, S) ? "折叠" : "展开",
|
|
59572
|
+
onClick: ys((b) => g(C, S), ["stop"])
|
|
59557
59573
|
}, null, 8, fae),
|
|
59558
|
-
(
|
|
59574
|
+
(C.childArray || []).length > 0 ? (Z(), K("i", {
|
|
59559
59575
|
key: 0,
|
|
59560
|
-
class: st(["toggle-icon smart-ui-icons smart-ui-icon-jiantou-you", { "is-expanded":
|
|
59561
|
-
onClick: ys((
|
|
59576
|
+
class: st(["toggle-icon smart-ui-icons smart-ui-icon-jiantou-you", { "is-expanded": l(C, S) }]),
|
|
59577
|
+
onClick: ys((b) => h(C, S), ["stop"])
|
|
59562
59578
|
}, null, 10, cae)) : Ve("", !0)
|
|
59563
59579
|
])
|
|
59564
59580
|
], 8, sae),
|
|
59565
|
-
(Z(!0), K(Ut, null, _t(((
|
|
59566
|
-
var
|
|
59581
|
+
(Z(!0), K(Ut, null, _t(((C == null ? void 0 : C.childArray) || []).slice(1), (b) => {
|
|
59582
|
+
var x, D, P;
|
|
59567
59583
|
return dI((Z(), K("div", {
|
|
59568
|
-
key:
|
|
59569
|
-
class: st([
|
|
59570
|
-
"building-item",
|
|
59571
|
-
{ active: m.guid === ((w = r.activeChild) == null ? void 0 : w.guid) }
|
|
59572
|
-
])
|
|
59584
|
+
key: b.guid,
|
|
59585
|
+
class: st(["building-item", { active: b.guid === ((x = r.activeChild) == null ? void 0 : x.guid) }])
|
|
59573
59586
|
}, [
|
|
59574
|
-
X("span", null, ze(
|
|
59587
|
+
X("span", null, ze(b.name), 1),
|
|
59575
59588
|
X("span", hae, [
|
|
59576
59589
|
X("i", {
|
|
59577
|
-
class: st(["smart-ui-icons",
|
|
59578
|
-
title:
|
|
59579
|
-
onClick: ys((
|
|
59590
|
+
class: st(["smart-ui-icons", p(b) ? "smart-ui-icon-transparent" : "smart-ui-icon-no-transparent"]),
|
|
59591
|
+
title: p(b) ? "" : "透明",
|
|
59592
|
+
onClick: ys((T) => y(b, (C == null ? void 0 : C.childArray) || [], C), ["stop"])
|
|
59580
59593
|
}, null, 10, vae),
|
|
59581
59594
|
X("i", {
|
|
59582
|
-
class: st(["smart-ui-icons",
|
|
59583
|
-
title:
|
|
59584
|
-
onClick: ys((
|
|
59595
|
+
class: st(["smart-ui-icons", b.guid === ((D = r.activeChild) == null ? void 0 : D.guid) ? "smart-ui-icon-yanjing-kai" : "smart-ui-icon-yanjing-bi"]),
|
|
59596
|
+
title: b.guid === ((P = r.activeChild) == null ? void 0 : P.guid) ? "" : "显示",
|
|
59597
|
+
onClick: ys((T) => A(b, (C == null ? void 0 : C.childArray) || [], C), ["stop"])
|
|
59585
59598
|
}, null, 10, pae)
|
|
59586
59599
|
])
|
|
59587
59600
|
], 2)), [
|
|
59588
|
-
[gI,
|
|
59601
|
+
[gI, l(C, S)]
|
|
59589
59602
|
]);
|
|
59590
59603
|
}), 128))
|
|
59591
59604
|
]))), 128))
|
|
59592
59605
|
]));
|
|
59593
59606
|
}
|
|
59594
|
-
}, O0 = /* @__PURE__ */ De(dae, [["__scopeId", "data-v-
|
|
59607
|
+
}, O0 = /* @__PURE__ */ De(dae, [["__scopeId", "data-v-f1f9b1f7"]]);
|
|
59595
59608
|
O0.install = (r) => {
|
|
59596
59609
|
r.component("BuildList", O0);
|
|
59597
59610
|
};
|