@fangzhongya/vue-archive 0.0.1

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.
@@ -0,0 +1,117 @@
1
+ import { defineComponent as C, openBlock as a, createElementBlock as n, Fragment as g, renderList as f, normalizeClass as $, createVNode as N, withCtx as x, createElementVNode as l, toDisplayString as v, ref as m, watch as b, createBlock as q, createCommentVNode as k, renderSlot as B, unref as F } from "vue";
2
+ import { _ as K, c as V, s as w } from "./info.vue_vue_type_script_setup_true_lang-77b86598.js";
3
+ import { useRoute as A } from "vue-router";
4
+ import { e as D } from "./index-b39ee475.js";
5
+ const E = { class: "choice aside" }, P = ["onClick"], S = { class: "aside-li-name" }, j = { class: "aside-li-name-name" }, z = { class: "aside-li-name-aliass" }, L = { class: "aside-li-name-aliass" }, O = /* @__PURE__ */ C({
6
+ __name: "choice",
7
+ props: {
8
+ value: {
9
+ type: Array
10
+ },
11
+ choice: {
12
+ type: Object
13
+ }
14
+ },
15
+ emits: ["change"],
16
+ setup(s, { emit: u }) {
17
+ const r = s;
18
+ function i(_) {
19
+ u("change", _);
20
+ }
21
+ return (_, t) => (a(), n("div", E, [
22
+ (a(!0), n(g, null, f(r.value, (e, c) => {
23
+ var d;
24
+ return a(), n("div", {
25
+ class: $(["aside-li", {
26
+ on: e.key == ((d = r.choice) == null ? void 0 : d.key)
27
+ }]),
28
+ onClick: (h) => i(e)
29
+ }, [
30
+ N(K, { value: e }, {
31
+ default: x(() => [
32
+ l("div", S, [
33
+ l("div", j, v(e.name), 1),
34
+ l("div", z, [
35
+ (a(!0), n(g, null, f(e.aliasNames, (h) => (a(), n("span", null, v(h), 1))), 256))
36
+ ]),
37
+ l("div", L, [
38
+ l("span", null, v(e.key), 1)
39
+ ])
40
+ ])
41
+ ]),
42
+ _: 2
43
+ }, 1032, ["value"])
44
+ ], 10, P);
45
+ }), 256))
46
+ ]));
47
+ }
48
+ }), R = { class: "__document-compon" }, G = {
49
+ key: 0,
50
+ class: "__document-compon-choice"
51
+ }, H = { key: 0 }, I = { key: 1 }, J = { key: 2 }, X = /* @__PURE__ */ C({
52
+ __name: "index",
53
+ props: {
54
+ getName: {
55
+ type: Function,
56
+ default(s) {
57
+ return s.id;
58
+ }
59
+ },
60
+ getKey: {
61
+ type: Function,
62
+ default(s) {
63
+ return s.key;
64
+ }
65
+ }
66
+ },
67
+ emits: ["change"],
68
+ setup(s, { emit: u }) {
69
+ const r = s, i = A(), _ = D(i), t = m(), e = m([]), c = m(!1);
70
+ b(
71
+ () => i.query.id,
72
+ () => {
73
+ d();
74
+ }
75
+ );
76
+ function d() {
77
+ let o = V(
78
+ r.getName(i.query),
79
+ !0,
80
+ r.getKey(_)
81
+ ) || [];
82
+ e.value = [], o.length == 1 ? (t.value = o[0], u("change", t.value)) : o.length == 0 ? (t.value = void 0, u("change", t.value)) : (c.value = !0, e.value = o);
83
+ }
84
+ function h(o) {
85
+ c.value = !1, t.value = o, u("change", t.value), w(o.key);
86
+ }
87
+ return d(), (o, p) => {
88
+ var y;
89
+ return a(), n("div", R, [
90
+ e.value.length ? (a(), n("div", G, [
91
+ c.value ? (a(), q(O, {
92
+ key: 0,
93
+ onChange: h,
94
+ value: e.value,
95
+ choice: t.value
96
+ }, null, 8, ["value", "choice"])) : k("", !0),
97
+ l("div", {
98
+ onClick: p[0] || (p[0] = (M) => c.value = !c.value),
99
+ class: "__document-compon-choice-but"
100
+ }, v(c.value ? "展开" : "隐藏"), 1)
101
+ ])) : k("", !0),
102
+ l("div", {
103
+ class: $(["__document-compon-body", {
104
+ choice: e.value.length
105
+ }])
106
+ }, [
107
+ (y = t.value) != null && y.key ? (a(), n("div", H, [
108
+ B(o.$slots, "default", { value: t.value })
109
+ ])) : e.value.length ? (a(), n("div", I, " 请先选择要查看的组件 ")) : (a(), n("div", J, " 没有查询到" + v(F(i).query.id) + "组件 ", 1))
110
+ ], 2)
111
+ ]);
112
+ };
113
+ }
114
+ });
115
+ export {
116
+ X as _
117
+ };