@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,147 @@
1
+ import { defineComponent as T, ref as _, watch as p, onMounted as A, nextTick as w, openBlock as c, createElementBlock as u, createElementVNode as a, withDirectives as D, vModelText as S, Fragment as g, renderList as C, normalizeClass as V, createVNode as v, withCtx as j, toDisplayString as $ } from "vue";
2
+ import { g as N, a as z, b as B, c as K, s as E, _ as M } from "./info.vue_vue_type_script_setup_true_lang-77b86598.js";
3
+ import { _ as O } from "./_plugin-vue_export-helper-dad06003.js";
4
+ import { _ as F } from "./index.vue_vue_type_script_setup_true_lang-7cc10ffe.js";
5
+ import { useRoute as H } from "vue-router";
6
+ import "./index-b39ee475.js";
7
+ import "./index.vue_vue_type_script_setup_true_lang-3d34c6b1.js";
8
+ import "./index.vue_vue_type_script_setup_true_lang-9378e472.js";
9
+ const L = { class: "aside-search" }, R = { class: "aside-list" }, U = ["onClick"], G = { class: "aside-li-name" }, I = { class: "aside-li-name-name" }, J = { class: "aside-li-name-aliass" }, P = /* @__PURE__ */ T({
10
+ __name: "index",
11
+ props: {
12
+ value: Object
13
+ },
14
+ emits: ["change"],
15
+ setup(m, { emit: l }) {
16
+ const n = m, d = _(), o = _([]);
17
+ o.value = N();
18
+ const s = _(
19
+ n.value
20
+ );
21
+ if (!s.value || !s.value.key) {
22
+ let e = z();
23
+ e ? s.value = B(e) : s.value = o.value[0];
24
+ }
25
+ const r = _("");
26
+ p(
27
+ () => n.value,
28
+ () => {
29
+ s.value = n.value, f();
30
+ }
31
+ ), p(
32
+ () => r.value,
33
+ () => {
34
+ q();
35
+ }
36
+ );
37
+ function h(e) {
38
+ return e ? e.replace(/[\.|\/|\s]/g, "-") : "a";
39
+ }
40
+ function b(e) {
41
+ s.value = e, f(), l("change", e);
42
+ }
43
+ let y;
44
+ function q() {
45
+ clearTimeout(y), y = setTimeout(() => {
46
+ let e = r.value;
47
+ e ? o.value = K(e, !0) : o.value = N();
48
+ }, 400);
49
+ }
50
+ function f() {
51
+ var i;
52
+ let e = ((i = s.value) == null ? void 0 : i.key) || "";
53
+ E(e);
54
+ }
55
+ return f(), l("change", s.value), A(() => {
56
+ w(() => {
57
+ var i;
58
+ const e = d.value.querySelector(
59
+ ".aside-li." + h((i = s.value) == null ? void 0 : i.key)
60
+ );
61
+ if (e) {
62
+ const t = e.offsetTop, x = d.value.parentNode;
63
+ x.scrollTop = t;
64
+ }
65
+ });
66
+ }), (e, i) => (c(), u("div", {
67
+ class: "aside",
68
+ ref_key: "refAside",
69
+ ref: d
70
+ }, [
71
+ a("div", L, [
72
+ D(a("input", {
73
+ "onUpdate:modelValue": i[0] || (i[0] = (t) => r.value = t)
74
+ }, null, 512), [
75
+ [S, r.value]
76
+ ])
77
+ ]),
78
+ a("div", R, [
79
+ (c(!0), u(g, null, C(o.value, (t, x) => (c(), u("div", {
80
+ class: V([
81
+ "aside-li",
82
+ h(t.key) + " " + (t.key == s.value.key ? "on" : "")
83
+ ]),
84
+ onClick: (k) => b(t)
85
+ }, [
86
+ v(M, { value: t }, {
87
+ default: j(() => [
88
+ a("div", G, [
89
+ a("div", I, $(t.name), 1),
90
+ a("span", J, [
91
+ (c(!0), u(g, null, C(t.aliasNames, (k) => (c(), u("span", null, $(k), 1))), 256))
92
+ ])
93
+ ])
94
+ ]),
95
+ _: 2
96
+ }, 1032, ["value"])
97
+ ], 10, U))), 256))
98
+ ])
99
+ ], 512));
100
+ }
101
+ }), Q = {};
102
+ function W(m, l) {
103
+ return c(), u("div");
104
+ }
105
+ const X = /* @__PURE__ */ O(Q, [["render", W]]), Y = { class: "__document-index" }, Z = { class: "index-aside" }, ee = { class: "index-aside-div" }, se = { class: "index-body" }, ae = { class: "index-div" }, te = { class: "index-header" }, ne = { class: "index-main" }, oe = { class: "index-main-div" }, me = /* @__PURE__ */ T({
106
+ __name: "index",
107
+ setup(m) {
108
+ const l = H(), n = _({});
109
+ function d(s) {
110
+ n.value = s;
111
+ }
112
+ p(
113
+ () => l.query.id,
114
+ () => {
115
+ o();
116
+ }
117
+ );
118
+ function o() {
119
+ l.query.id && (n.value = K(l.query.id + ""));
120
+ }
121
+ return o(), (s, r) => (c(), u("div", Y, [
122
+ a("div", Z, [
123
+ a("div", ee, [
124
+ v(P, {
125
+ value: n.value,
126
+ onChange: d
127
+ }, null, 8, ["value"])
128
+ ])
129
+ ]),
130
+ a("div", se, [
131
+ a("div", ae, [
132
+ a("div", te, [
133
+ v(X)
134
+ ]),
135
+ a("div", ne, [
136
+ a("div", oe, [
137
+ v(F, { value: n.value }, null, 8, ["value"])
138
+ ])
139
+ ])
140
+ ])
141
+ ])
142
+ ]));
143
+ }
144
+ });
145
+ export {
146
+ me as default
147
+ };
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import { i as t, u as o } from "./index-b39ee475.js";
2
+ function f(n) {
3
+ return o(n);
4
+ }
5
+ const a = {
6
+ install: function(n, i) {
7
+ t(i);
8
+ }
9
+ };
10
+ export {
11
+ a as default,
12
+ f as defineConfig
13
+ };