@fangzhongya/vue-archive 0.0.7 → 0.0.8
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/README.md +3 -2
- package/dist/node/index.cjs +135 -71
- package/dist/node/index.d.cts +8 -0
- package/dist/node/index.d.ts +8 -0
- package/dist/node/index.js +118 -54
- package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.cjs +1 -0
- package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js +9 -0
- package/dist/packages/components/aside/index.vue.cjs +1 -1
- package/dist/packages/components/aside/index.vue.js +43 -45
- package/dist/packages/components/boxurl/index.vue.cjs +1 -1
- package/dist/packages/components/boxurl/index.vue.js +34 -37
- package/dist/packages/components/choice/choice.vue.cjs +1 -1
- package/dist/packages/components/choice/choice.vue.js +29 -32
- package/dist/packages/components/choice/index.vue.cjs +1 -1
- package/dist/packages/components/choice/index.vue.js +39 -42
- package/dist/packages/components/code/highlight.vue2.cjs +1 -1
- package/dist/packages/components/code/highlight.vue2.js +1 -1
- package/dist/packages/components/code/index.vue.cjs +1 -1
- package/dist/packages/components/code/index.vue.js +79 -87
- package/dist/packages/components/compo/ftable.vue.cjs +1 -1
- package/dist/packages/components/compo/ftable.vue.js +15 -15
- package/dist/packages/components/compo/index.cjs +1 -1
- package/dist/packages/components/compo/index.js +86 -97
- package/dist/packages/components/compo/index.vue.cjs +1 -1
- package/dist/packages/components/compo/index.vue.js +33 -34
- package/dist/packages/components/compo/info.vue.cjs +1 -1
- package/dist/packages/components/compo/info.vue.js +22 -25
- package/dist/packages/components/compo/top.cjs +1 -1
- package/dist/packages/components/compo/top.js +21 -21
- package/dist/packages/components/main/index.vue.cjs +1 -1
- package/dist/packages/components/main/index.vue.js +16 -17
- package/dist/packages/components/md/index.vue.cjs +1 -1
- package/dist/packages/components/md/index.vue.js +28 -32
- package/dist/packages/components/test/index.cjs +1 -1
- package/dist/packages/components/test/index.js +39 -42
- package/dist/packages/components/test/index.vue.cjs +1 -1
- package/dist/packages/components/test/index.vue.js +44 -49
- package/dist/packages/components/use/code.cjs +1 -1
- package/dist/packages/components/use/code.js +3 -3
- package/dist/packages/components/use/index.cjs +1 -1
- package/dist/packages/components/use/index.js +1 -1
- package/dist/packages/components/use/retrie/choice/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/choice/index.vue.js +32 -34
- package/dist/packages/components/use/retrie/expose/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/expose/index.vue.js +18 -19
- package/dist/packages/components/use/retrie/form/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/form/index.vue.js +110 -114
- package/dist/packages/components/use/retrie/function/index.vue.cjs +2 -2
- package/dist/packages/components/use/retrie/function/index.vue.js +1 -4
- package/dist/packages/components/use/retrie/input/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/input/index.vue.js +20 -21
- package/dist/packages/components/use/retrie/number/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/number/index.vue.js +12 -13
- package/dist/packages/components/use/retrie/select/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/select/index.vue.js +21 -23
- package/dist/packages/components/use/retrie/slot/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/slot/index.vue.js +15 -16
- package/dist/packages/components/use/retrie/string/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/string/index.vue.js +14 -15
- package/dist/packages/components/use/set-emit.vue.cjs +1 -1
- package/dist/packages/components/use/set-emit.vue.js +20 -24
- package/dist/packages/components/use/set-expose.vue.cjs +1 -1
- package/dist/packages/components/use/set-expose.vue.js +15 -18
- package/dist/packages/components/use/set-props.vue.cjs +1 -1
- package/dist/packages/components/use/set-props.vue.js +48 -49
- package/dist/packages/config.cjs +1 -1
- package/dist/packages/config.d.ts +8 -1
- package/dist/packages/config.js +1 -1
- package/dist/packages/directives/adjust/index copy.d.ts +6 -0
- package/dist/packages/directives/adjust/index.cjs +1 -1
- package/dist/packages/directives/adjust/index.js +96 -97
- package/dist/packages/page/comprops/index.vue2.cjs +1 -1
- package/dist/packages/page/comprops/index.vue2.js +65 -71
- package/dist/packages/page/index/index.vue2.cjs +1 -1
- package/dist/packages/page/index/index.vue2.js +19 -23
- package/dist/packages/page/single/index.vue2.cjs +1 -1
- package/dist/packages/page/single/index.vue2.js +46 -49
- package/dist/packages/router/index.cjs +1 -1
- package/dist/packages/router/index.js +44 -46
- package/dist/packages/utils/common.cjs +1 -1
- package/dist/packages/utils/common.d.ts +4 -0
- package/dist/packages/utils/common.js +57 -54
- package/dist/packages/utils/glob.cjs +3 -3
- package/dist/packages/utils/glob.d.ts +1 -1
- package/dist/packages/utils/glob.js +269 -227
- package/dist/packages/utils/props.cjs +1 -1
- package/dist/packages/utils/props.js +34 -28
- package/dist/src/components/common/cs3.d.ts +4 -0
- package/dist/src/components/common/index.d.ts +4 -0
- package/dist/src/components/cs/expose/index.d.ts +4 -1
- package/dist/src/components/cs/expose/src/index.vue.d.ts +4 -1
- package/dist/vue-archive.css +1 -1
- package/package.json +18 -19
- package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.cjs +0 -1
- package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -9
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-5RZYHE3X.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-5RZYHE3X.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-AM67P3W7.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-AM67P3W7.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-APKFW4LU.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-APKFW4LU.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VBS6YE6H.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VBS6YE6H.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VKE5JARB.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VKE5JARB.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XUL6LPTN.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XUL6LPTN.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
- /package/dist/node_modules/.pnpm/{@highlightjs_vue-plugin@2.1_0b670f4f8863792fd47bf820772b9cbf → @highlightjs_vue-plugin@2.1_b586068ec461434c266304f56a34d01a}/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@highlightjs_vue-plugin@2.1_0b670f4f8863792fd47bf820772b9cbf → @highlightjs_vue-plugin@2.1_b586068ec461434c266304f56a34d01a}/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as f, h as m } from "vue";
|
|
2
|
-
function v(
|
|
2
|
+
function v(r, e, d) {
|
|
3
3
|
let s = [], u = [], i = [];
|
|
4
|
-
const
|
|
4
|
+
const p = (t) => t, n = () => {
|
|
5
5
|
i.length > 0 && (s.push(
|
|
6
6
|
e(
|
|
7
7
|
"div",
|
|
@@ -11,7 +11,7 @@ function v(p, e, r) {
|
|
|
11
11
|
i
|
|
12
12
|
)
|
|
13
13
|
), i = []);
|
|
14
|
-
},
|
|
14
|
+
}, a = () => {
|
|
15
15
|
s.length > 0 && (u.push(
|
|
16
16
|
e(
|
|
17
17
|
"div",
|
|
@@ -22,10 +22,10 @@ function v(p, e, r) {
|
|
|
22
22
|
)
|
|
23
23
|
), s = []);
|
|
24
24
|
};
|
|
25
|
-
return
|
|
26
|
-
const
|
|
25
|
+
return r?.forEach((t) => {
|
|
26
|
+
const l = [];
|
|
27
27
|
let o = !1;
|
|
28
|
-
if (t.date && (o = !0,
|
|
28
|
+
if (t.date && (o = !0, l.push(
|
|
29
29
|
e(
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
@@ -34,13 +34,13 @@ function v(p, e, r) {
|
|
|
34
34
|
[
|
|
35
35
|
e("span", {}, "更新时间:"),
|
|
36
36
|
e("span", {}, [
|
|
37
|
-
|
|
37
|
+
p(
|
|
38
38
|
t.date.name + " " + t.date.description
|
|
39
39
|
)
|
|
40
40
|
])
|
|
41
41
|
]
|
|
42
42
|
)
|
|
43
|
-
)), t.author && (o = !0,
|
|
43
|
+
)), t.author && (o = !0, l.push(
|
|
44
44
|
e(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
@@ -49,24 +49,24 @@ function v(p, e, r) {
|
|
|
49
49
|
[
|
|
50
50
|
e("span", {}, "作者:"),
|
|
51
51
|
e("span", {}, [
|
|
52
|
-
|
|
52
|
+
p(
|
|
53
53
|
t.author.name + " " + t.author.description
|
|
54
54
|
)
|
|
55
55
|
])
|
|
56
56
|
]
|
|
57
57
|
)
|
|
58
58
|
)), t.title && (t.title.type || t.title.name || t.title.description)) {
|
|
59
|
-
|
|
60
|
-
let
|
|
59
|
+
n(), o && a();
|
|
60
|
+
let c = t.title.type || "div";
|
|
61
61
|
s.push(
|
|
62
62
|
e(
|
|
63
|
-
|
|
63
|
+
c,
|
|
64
64
|
{
|
|
65
65
|
class: "compo-top-title"
|
|
66
66
|
},
|
|
67
67
|
[
|
|
68
68
|
e("span", {}, [
|
|
69
|
-
|
|
69
|
+
p(
|
|
70
70
|
t.title.name + " " + t.title.description
|
|
71
71
|
)
|
|
72
72
|
])
|
|
@@ -74,25 +74,25 @@ function v(p, e, r) {
|
|
|
74
74
|
)
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
|
-
if (o && (i.length > 0 && (
|
|
77
|
+
if (o && (i.length > 0 && (n(), a()), s.push(
|
|
78
78
|
e(
|
|
79
79
|
"div",
|
|
80
80
|
{
|
|
81
81
|
class: "compo-top-info"
|
|
82
82
|
},
|
|
83
|
-
|
|
83
|
+
l
|
|
84
84
|
)
|
|
85
85
|
)), t.text) {
|
|
86
|
-
let
|
|
86
|
+
let c = t.text.type || "div";
|
|
87
87
|
i.push(
|
|
88
88
|
e(
|
|
89
|
-
|
|
89
|
+
c,
|
|
90
90
|
{
|
|
91
91
|
class: "compo-top-text"
|
|
92
92
|
},
|
|
93
93
|
[
|
|
94
94
|
e("span", {}, [
|
|
95
|
-
|
|
95
|
+
p(
|
|
96
96
|
t.text.name + " " + t.text.description
|
|
97
97
|
)
|
|
98
98
|
])
|
|
@@ -100,7 +100,7 @@ function v(p, e, r) {
|
|
|
100
100
|
)
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
|
-
}),
|
|
103
|
+
}), n(), a(), u;
|
|
104
104
|
}
|
|
105
105
|
const x = f({
|
|
106
106
|
/**
|
|
@@ -109,8 +109,8 @@ const x = f({
|
|
|
109
109
|
props: {
|
|
110
110
|
value: Array
|
|
111
111
|
},
|
|
112
|
-
render(
|
|
113
|
-
const s = v(
|
|
112
|
+
render(r, e, d) {
|
|
113
|
+
const s = v(d.value, m);
|
|
114
114
|
return m(
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),v=require("vue-router"),r=require("../../router/index.cjs"),d=require("../compo/index.vue.cjs"),_=require("../test/index.vue.cjs"),p=require("../../utils/glob.cjs"),m={class:"main"},k={class:"main-top"},f={class:"main-but"},E={class:"main-test"},N=e.defineComponent({__name:"index",props:{value:Object},setup(a){const l=v.useRouter(),
|
|
1
|
+
"use strict";const e=require("vue"),v=require("vue-router"),r=require("../../router/index.cjs"),d=require("../compo/index.vue.cjs"),_=require("../test/index.vue.cjs"),p=require("../../utils/glob.cjs"),m={class:"main"},k={class:"main-top"},f={class:"main-but"},E={class:"main-test"},N=e.defineComponent({__name:"index",props:{value:Object},setup(a){const l=v.useRouter(),t=a,i=e.ref([]);e.watch(()=>t.value,()=>{c()});function c(){i.value=p.getTestName(t.value?.key)}c();function u(o){o==1?r.toCompon(l,t.value):o==2?r.toTests(l,t.value):o==3&&r.toDevelop(l,t.value)}return(o,n)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("div",k,[e.createVNode(d,{value:t.value},null,8,["value"])]),e.createElementVNode("div",f,[e.createElementVNode("div",{class:"but-div",onClick:n[0]||(n[0]=s=>u(1))}," 当前 "),e.createElementVNode("div",{class:"but-div",onClick:n[1]||(n[1]=s=>u(2))}," 更多 "),e.createElementVNode("div",{class:"but-div",onClick:n[2]||(n[2]=s=>u(3))}," 开发 ")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,s=>(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(_,{value:s},null,8,["value"])]))),256))]))}});module.exports=N;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as d, ref as f, watch as p, createElementBlock as r, openBlock as a, createElementVNode as
|
|
1
|
+
import { defineComponent as d, ref as f, watch as p, createElementBlock as r, openBlock as a, createElementVNode as o, createVNode as m, Fragment as _, renderList as C } from "vue";
|
|
2
2
|
import { useRouter as b } from "vue-router";
|
|
3
3
|
import { toCompon as k, toTests as $, toDevelop as g } from "../../router/index.js";
|
|
4
4
|
import x from "../compo/index.vue.js";
|
|
@@ -10,39 +10,38 @@ const E = { class: "main" }, T = { class: "main-top" }, V = { class: "main-but"
|
|
|
10
10
|
value: Object
|
|
11
11
|
},
|
|
12
12
|
setup(c) {
|
|
13
|
-
const i = b(),
|
|
13
|
+
const i = b(), e = c, u = f([]);
|
|
14
14
|
p(
|
|
15
|
-
() =>
|
|
15
|
+
() => e.value,
|
|
16
16
|
() => {
|
|
17
17
|
v();
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
function v() {
|
|
21
|
-
|
|
22
|
-
u.value = B((e = t.value) == null ? void 0 : e.key);
|
|
21
|
+
u.value = B(e.value?.key);
|
|
23
22
|
}
|
|
24
23
|
v();
|
|
25
|
-
function l(
|
|
26
|
-
|
|
24
|
+
function l(s) {
|
|
25
|
+
s == 1 ? k(i, e.value) : s == 2 ? $(i, e.value) : s == 3 && g(i, e.value);
|
|
27
26
|
}
|
|
28
|
-
return (
|
|
29
|
-
|
|
27
|
+
return (s, t) => (a(), r("div", E, [
|
|
28
|
+
o("div", T, [
|
|
30
29
|
m(x, {
|
|
31
|
-
value:
|
|
30
|
+
value: e.value
|
|
32
31
|
}, null, 8, ["value"])
|
|
33
32
|
]),
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
o("div", V, [
|
|
34
|
+
o("div", {
|
|
36
35
|
class: "but-div",
|
|
37
|
-
onClick:
|
|
36
|
+
onClick: t[0] || (t[0] = (n) => l(1))
|
|
38
37
|
}, " 当前 "),
|
|
39
|
-
|
|
38
|
+
o("div", {
|
|
40
39
|
class: "but-div",
|
|
41
|
-
onClick:
|
|
40
|
+
onClick: t[1] || (t[1] = (n) => l(2))
|
|
42
41
|
}, " 更多 "),
|
|
43
|
-
|
|
42
|
+
o("div", {
|
|
44
43
|
class: "but-div",
|
|
45
|
-
onClick:
|
|
44
|
+
onClick: t[2] || (t[2] = (n) => l(3))
|
|
46
45
|
}, " 开发 ")
|
|
47
46
|
]),
|
|
48
47
|
(a(!0), r(_, null, C(u.value, (n) => (a(), r("div", j, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),s=require("../boxurl/index.vue.cjs"),u=require("../../../_virtual/common.cjs"),i=require("markdown-it"),_=require("../../utils/glob.cjs"),d={class:"md"},v={class:"md-top-name"},m=["innerHTML"],h=e.defineComponent({__name:"index",props:{value:Object},setup(a){const t=a,n=e.ref(""),l=new i({html:!0,xhtmlOut:!0,highlight:function(r,o){if(o&&u.getLanguage(o))try{return u.highlight(r,{language:o}).value}catch{}return""}});e.watch(()=>t.value,()=>{c()});function c(){t.value?.key&&_.getLocalTextTests(t.value).then(r=>{n.value=l.render(r)}).catch(()=>{n.value=""})}return c(),(r,o)=>(e.openBlock(),e.createElementBlock("div",d,[n.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",v,e.toDisplayString(t.value?.value)+" 说明文档 ",1)]),_:1},8,["value"]),e.createElementVNode("div",{innerHTML:n.value},null,8,m)],64)):e.createCommentVNode("",!0)]))}});module.exports=h;
|
|
@@ -1,57 +1,53 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { getLocalTextTests as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as s, ref as d, watch as h, createElementBlock as r, openBlock as i, createCommentVNode as v, Fragment as _, createVNode as f, createElementVNode as l, withCtx as p, toDisplayString as g } from "vue";
|
|
2
|
+
import x from "../boxurl/index.vue.js";
|
|
3
|
+
import u from "../../../_virtual/common.js";
|
|
4
|
+
import k from "markdown-it";
|
|
5
|
+
import { getLocalTextTests as w } from "../../utils/glob.js";
|
|
6
|
+
const y = { class: "md" }, L = { class: "md-top-name" }, T = ["innerHTML"], D = /* @__PURE__ */ s({
|
|
7
7
|
__name: "index",
|
|
8
8
|
props: {
|
|
9
9
|
value: Object
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
11
|
+
setup(c) {
|
|
12
|
+
const e = c, t = d(""), m = new k({
|
|
13
13
|
html: !0,
|
|
14
14
|
xhtmlOut: !0,
|
|
15
|
-
highlight: function(a,
|
|
16
|
-
if (
|
|
15
|
+
highlight: function(a, o) {
|
|
16
|
+
if (o && u.getLanguage(o))
|
|
17
17
|
try {
|
|
18
|
-
return
|
|
19
|
-
language:
|
|
18
|
+
return u.highlight(a, {
|
|
19
|
+
language: o
|
|
20
20
|
}).value;
|
|
21
21
|
} catch {
|
|
22
22
|
}
|
|
23
23
|
return "";
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
-
|
|
27
|
-
() =>
|
|
26
|
+
h(
|
|
27
|
+
() => e.value,
|
|
28
28
|
() => {
|
|
29
|
-
|
|
29
|
+
n();
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
o.value = s.render(e);
|
|
32
|
+
function n() {
|
|
33
|
+
e.value?.key && w(e.value).then((a) => {
|
|
34
|
+
t.value = m.render(a);
|
|
36
35
|
}).catch(() => {
|
|
37
|
-
|
|
36
|
+
t.value = "";
|
|
38
37
|
});
|
|
39
38
|
}
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
value:
|
|
39
|
+
return n(), (a, o) => (i(), r("div", y, [
|
|
40
|
+
t.value ? (i(), r(_, { key: 0 }, [
|
|
41
|
+
f(x, {
|
|
42
|
+
value: e.value
|
|
44
43
|
}, {
|
|
45
|
-
default:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
u("div", T, x((n = t.value) == null ? void 0 : n.value) + " 说明文档 ", 1)
|
|
49
|
-
];
|
|
50
|
-
}),
|
|
44
|
+
default: p(() => [
|
|
45
|
+
l("div", L, g(e.value?.value) + " 说明文档 ", 1)
|
|
46
|
+
]),
|
|
51
47
|
_: 1
|
|
52
48
|
}, 8, ["value"]),
|
|
53
|
-
|
|
54
|
-
], 64)) :
|
|
49
|
+
l("div", { innerHTML: t.value }, null, 8, T)
|
|
50
|
+
], 64)) : v("", !0)
|
|
55
51
|
]));
|
|
56
52
|
}
|
|
57
53
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../utils/index.cjs");function E(t){return delete t.problems,delete t.source,t}function d(t,e){const s={descriptions:t?.description||""},a=[];return t?.tags&&t?.tags?.forEach((r,o)=>{let n=r.tag,c=E(r);if(!s.hasOwnProperty(n)&&e.includes(n))s[n]=c;else{let f={};f[n]=c,a.push({key:n,value:f})}}),{arr:a,obj:s}}let u=[];function T(t){const e=["title","author","date"],s=d(t,e),a={};e.forEach(r=>{a[r]=s.obj[r]}),l(a),s.arr.forEach(r=>{h(r.key,r.value)})}let i=[];function v(t){const e=["state","type"],s=d(t,e),a={};e.forEach(r=>{a[r]=s.obj[r]}),g(a),s.arr.forEach(r=>{h(r.key,r.value)})}function l(t){u.push(t)}function y(t){u.push(t)}function x(t){u.push(t)}function g(t){i.push(t)}function h(t,e){switch(t){case"title":return l(e),!0;case"proposal":return y(e),!0;case"error":return x(e),!0;case"state":return g(e),!0;case"text":return l(e),!0;default:return!1}}function S(t,e){switch(t){case"title":return T(e),!0;case"state":return v(e),!0;default:return!1}}function b(t){return u=[],i=[],p.getTextNotes(t)?.forEach(s=>{let a=s?.tags||[],r=a?.length||0;if(r>0)for(let o=0;o<r;o++){const n=a[o]||{};if(S(n.tag,s))break}}),{titles:u,states:i}}exports.getNotes=b;
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { getTextNotes as
|
|
2
|
-
function
|
|
1
|
+
import { getTextNotes as p } from "../../utils/index.js";
|
|
2
|
+
function E(t) {
|
|
3
3
|
return delete t.problems, delete t.source, t;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
var r;
|
|
5
|
+
function d(t, e) {
|
|
7
6
|
const s = {
|
|
8
|
-
descriptions:
|
|
7
|
+
descriptions: t?.description || ""
|
|
9
8
|
}, a = [];
|
|
10
|
-
return t
|
|
11
|
-
let
|
|
12
|
-
if (!s.hasOwnProperty(
|
|
13
|
-
s[
|
|
9
|
+
return t?.tags && t?.tags?.forEach((r, u) => {
|
|
10
|
+
let n = r.tag, c = E(r);
|
|
11
|
+
if (!s.hasOwnProperty(n) && e.includes(n))
|
|
12
|
+
s[n] = c;
|
|
14
13
|
else {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
key:
|
|
18
|
-
value:
|
|
14
|
+
let f = {};
|
|
15
|
+
f[n] = c, a.push({
|
|
16
|
+
key: n,
|
|
17
|
+
value: f
|
|
19
18
|
});
|
|
20
19
|
}
|
|
21
|
-
})
|
|
20
|
+
}), {
|
|
22
21
|
arr: a,
|
|
23
22
|
obj: s
|
|
24
23
|
};
|
|
25
24
|
}
|
|
26
|
-
let
|
|
27
|
-
function
|
|
28
|
-
const e = ["title", "author", "date"], s =
|
|
25
|
+
let o = [];
|
|
26
|
+
function T(t) {
|
|
27
|
+
const e = ["title", "author", "date"], s = d(t, e), a = {};
|
|
29
28
|
e.forEach((r) => {
|
|
30
29
|
a[r] = s.obj[r];
|
|
31
30
|
}), l(a), s.arr.forEach((r) => {
|
|
@@ -33,24 +32,24 @@ function v(t) {
|
|
|
33
32
|
});
|
|
34
33
|
}
|
|
35
34
|
let i = [];
|
|
36
|
-
function
|
|
37
|
-
const e = ["state", "type"], s =
|
|
35
|
+
function v(t) {
|
|
36
|
+
const e = ["state", "type"], s = d(t, e), a = {};
|
|
38
37
|
e.forEach((r) => {
|
|
39
38
|
a[r] = s.obj[r];
|
|
40
|
-
}),
|
|
39
|
+
}), h(a), s.arr.forEach((r) => {
|
|
41
40
|
g(r.key, r.value);
|
|
42
41
|
});
|
|
43
42
|
}
|
|
44
43
|
function l(t) {
|
|
45
|
-
|
|
44
|
+
o.push(t);
|
|
46
45
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
46
|
+
function x(t) {
|
|
47
|
+
o.push(t);
|
|
49
48
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
49
|
+
function m(t) {
|
|
50
|
+
o.push(t);
|
|
52
51
|
}
|
|
53
|
-
function
|
|
52
|
+
function h(t) {
|
|
54
53
|
i.push(t);
|
|
55
54
|
}
|
|
56
55
|
function g(t, e) {
|
|
@@ -58,21 +57,21 @@ function g(t, e) {
|
|
|
58
57
|
case "title":
|
|
59
58
|
return l(e), !0;
|
|
60
59
|
case "proposal":
|
|
61
|
-
return
|
|
60
|
+
return x(e), !0;
|
|
62
61
|
case "error":
|
|
63
|
-
return
|
|
62
|
+
return m(e), !0;
|
|
64
63
|
case "state":
|
|
65
|
-
return
|
|
64
|
+
return h(e), !0;
|
|
66
65
|
case "text":
|
|
67
66
|
return l(e), !0;
|
|
68
67
|
default:
|
|
69
68
|
return !1;
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
|
-
function
|
|
71
|
+
function w(t, e) {
|
|
73
72
|
switch (t) {
|
|
74
73
|
case "title":
|
|
75
|
-
return
|
|
74
|
+
return T(e), !0;
|
|
76
75
|
// case 'proposal':
|
|
77
76
|
// setProposal(obj);
|
|
78
77
|
// return true;
|
|
@@ -80,27 +79,25 @@ function y(t, e) {
|
|
|
80
79
|
// setError(obj);
|
|
81
80
|
// return true;
|
|
82
81
|
case "state":
|
|
83
|
-
return
|
|
82
|
+
return v(e), !0;
|
|
84
83
|
default:
|
|
85
84
|
return !1;
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
|
-
function
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return e == null || e.forEach((s) => {
|
|
92
|
-
let a = (s == null ? void 0 : s.tags) || [], r = (a == null ? void 0 : a.length) || 0;
|
|
87
|
+
function k(t) {
|
|
88
|
+
return o = [], i = [], p(t)?.forEach((s) => {
|
|
89
|
+
let a = s?.tags || [], r = a?.length || 0;
|
|
93
90
|
if (r > 0)
|
|
94
|
-
for (let
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
91
|
+
for (let u = 0; u < r; u++) {
|
|
92
|
+
const n = a[u] || {};
|
|
93
|
+
if (w(n.tag, s))
|
|
97
94
|
break;
|
|
98
95
|
}
|
|
99
96
|
}), {
|
|
100
|
-
titles:
|
|
97
|
+
titles: o,
|
|
101
98
|
states: i
|
|
102
99
|
};
|
|
103
100
|
}
|
|
104
101
|
export {
|
|
105
|
-
|
|
102
|
+
k as getNotes
|
|
106
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),p=require("../boxurl/index.vue.cjs"),m=require("./top.cjs"),f=require("../code/index.vue.cjs"),x=require("./index.cjs"),y=require("../../utils/glob.cjs"),N={class:"md-top-name"},h={class:"test-top"},k={class:"test-div"},V={class:"test-body"},g={key:0,class:"test-code"},B=e.defineComponent({__name:"index",props:{value:Object,read:{type:Boolean,default:!0}},emits:["state"],setup(i,{emit:d}){const t=i,v=d,o=e.ref(""),c=e.ref([]),s=e.ref("1");e.watch([()=>t.value,()=>t.read],()=>{r()});let u;function r(){t.read&&t.value?.key&&y.getLocalTextTests(t.value).then(l=>{o.value=l;let{titles:a,states:_}=x.getNotes(l);c.value=a;const n=_[0];n&&n.type&&(s.value=n.type.type),v("state",s.value,t.value?.key)}).catch(()=>{o.value=""}),t.value?.component&&(u=e.defineAsyncComponent(t.value.component))}return r(),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["test","state-"+s.value])},[e.createVNode(p,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",N,e.toDisplayString(t.value?.value)+" 文件 示例代码 ",1)]),_:1},8,["value"]),e.createElementVNode("div",h,[e.createVNode(e.unref(m.default),{value:c.value},null,8,["value"])]),e.createElementVNode("div",k,[e.createElementVNode("div",V,[(e.openBlock(),e.createBlock(e.Suspense,null,{fallback:e.withCtx(()=>a[0]||(a[0]=[e.createTextVNode(" 示例加载中... ",-1)])),default:e.withCtx(()=>[e.createVNode(e.unref(u))]),_:1}))]),t.read?(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(f,{value:t.value,text:o.value},null,8,["value","text"])])):e.createCommentVNode("",!0)])],2))}});module.exports=B;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { getNotes as
|
|
6
|
-
import { getLocalTextTests as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as k, ref as u, watch as g, defineAsyncComponent as C, createElementBlock as p, openBlock as i, normalizeClass as N, createVNode as a, createElementVNode as o, withCtx as r, toDisplayString as B, unref as f, createCommentVNode as T, createBlock as V, Suspense as b, createTextVNode as w } from "vue";
|
|
2
|
+
import A from "../boxurl/index.vue.js";
|
|
3
|
+
import D from "./top.js";
|
|
4
|
+
import E from "../code/index.vue.js";
|
|
5
|
+
import { getNotes as S } from "./index.js";
|
|
6
|
+
import { getLocalTextTests as $ } from "../../utils/glob.js";
|
|
7
|
+
const j = { class: "md-top-name" }, z = { class: "test-top" }, L = { class: "test-div" }, O = { class: "test-body" }, P = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "test-code"
|
|
10
|
-
},
|
|
10
|
+
}, K = /* @__PURE__ */ k({
|
|
11
11
|
__name: "index",
|
|
12
12
|
props: {
|
|
13
13
|
value: Object,
|
|
@@ -17,70 +17,65 @@ const O = { class: "md-top-name" }, P = { class: "test-top" }, q = { class: "tes
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
emits: ["state"],
|
|
20
|
-
setup(
|
|
21
|
-
const e =
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
setup(_, { emit: y }) {
|
|
21
|
+
const e = _, h = y, s = u(""), d = u([]), l = u("1");
|
|
22
|
+
g([() => e.value, () => e.read], () => {
|
|
23
|
+
m();
|
|
24
24
|
});
|
|
25
|
-
let
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const u = C[0];
|
|
34
|
-
u && u.type && (n.value = u.type.type), k(
|
|
25
|
+
let v;
|
|
26
|
+
function m() {
|
|
27
|
+
e.read && e.value?.key && $(e.value).then((n) => {
|
|
28
|
+
s.value = n;
|
|
29
|
+
let { titles: t, states: x } = S(n);
|
|
30
|
+
d.value = t;
|
|
31
|
+
const c = x[0];
|
|
32
|
+
c && c.type && (l.value = c.type.type), h(
|
|
35
33
|
"state",
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
l.value,
|
|
35
|
+
e.value?.key
|
|
38
36
|
);
|
|
39
37
|
}).catch(() => {
|
|
40
|
-
|
|
41
|
-
}),
|
|
38
|
+
s.value = "";
|
|
39
|
+
}), e.value?.component && (v = C(
|
|
42
40
|
e.value.component
|
|
43
41
|
));
|
|
44
42
|
}
|
|
45
|
-
return
|
|
46
|
-
class:
|
|
43
|
+
return m(), (n, t) => (i(), p("div", {
|
|
44
|
+
class: N(["test", "state-" + l.value])
|
|
47
45
|
}, [
|
|
48
|
-
|
|
46
|
+
a(A, {
|
|
49
47
|
value: e.value
|
|
50
48
|
}, {
|
|
51
|
-
default:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
s("div", O, b((a = e.value) == null ? void 0 : a.value) + " 文件 示例代码 ", 1)
|
|
55
|
-
];
|
|
56
|
-
}),
|
|
49
|
+
default: r(() => [
|
|
50
|
+
o("div", j, B(e.value?.value) + " 文件 示例代码 ", 1)
|
|
51
|
+
]),
|
|
57
52
|
_: 1
|
|
58
53
|
}, 8, ["value"]),
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
o("div", z, [
|
|
55
|
+
a(f(D), { value: d.value }, null, 8, ["value"])
|
|
61
56
|
]),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
(
|
|
65
|
-
fallback:
|
|
66
|
-
|
|
57
|
+
o("div", L, [
|
|
58
|
+
o("div", O, [
|
|
59
|
+
(i(), V(b, null, {
|
|
60
|
+
fallback: r(() => t[0] || (t[0] = [
|
|
61
|
+
w(" 示例加载中... ", -1)
|
|
67
62
|
])),
|
|
68
|
-
default:
|
|
69
|
-
|
|
63
|
+
default: r(() => [
|
|
64
|
+
a(f(v))
|
|
70
65
|
]),
|
|
71
66
|
_: 1
|
|
72
67
|
}))
|
|
73
68
|
]),
|
|
74
|
-
e.read ? (
|
|
75
|
-
|
|
69
|
+
e.read ? (i(), p("div", P, [
|
|
70
|
+
a(E, {
|
|
76
71
|
value: e.value,
|
|
77
|
-
text:
|
|
72
|
+
text: s.value
|
|
78
73
|
}, null, 8, ["value", "text"])
|
|
79
|
-
])) :
|
|
74
|
+
])) : T("", !0)
|
|
80
75
|
])
|
|
81
76
|
], 2));
|
|
82
77
|
}
|
|
83
78
|
});
|
|
84
79
|
export {
|
|
85
|
-
|
|
80
|
+
K as default
|
|
86
81
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),d=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs"),j=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs"),h=require("./util.cjs");function F(n,t,e,r){const o=[],i=[];let l=!0;Object.keys(t).forEach(s=>{let c=t[s];if(/^on[A-Z]/.test(s)&&typeof c=="function"){let u=s.substring(2);const a=s.split(":");let f;if(a.length>1?(f=a[0]+a.slice(1).map(p=>d.firstUpper(p)).join(""),u=j.firstLower(u)):(f=a[0],u=b.humpToLine(u)),a.includes("-")){let p=f.split("-");p=p.map((m,$)=>$!=0?d.firstUpper(m):m),f=p.join("")}o.push(" @"+u+'="'+f+'"'),i.push("function "+f+"(...arr) {"),i.push(" console.log('"+f+"', arr)"),i.push("}")}else if(o.push(" :"+s+'="'+s+'"'),typeof c=="function")i.push("const "+s+" = "+J(c,s,r));else if(l&&(l=!1,i.unshift("import { ref } from 'vue';")),typeof c>"u")i.push("const "+s+" = ref();");else{let u=S(c,s,r);i.push("const "+s+" = ref("+u+");")}}),o.length>0&&o.unshift("");const g=O(e);return`<!--${n}-->
|
|
2
2
|
<template>
|
|
3
3
|
<div>
|
|
4
4
|
<${n}${o.join(`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { humpToLine as b } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.
|
|
2
|
-
import { firstUpper as g } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.
|
|
3
|
-
import { firstLower as S } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.
|
|
1
|
+
import { humpToLine as b } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
|
|
2
|
+
import { firstUpper as g } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js";
|
|
3
|
+
import { firstLower as S } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
|
|
4
4
|
import { vueFormat as d, getFunctionFormat as j, prettierFormat as F, getFunBody as E } from "./util.js";
|
|
5
5
|
function T(n, t, e, r) {
|
|
6
6
|
const o = [], i = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),x=require("./set-props.vue.cjs"),q=require("./set-emit.vue.cjs"),E=require("./set-code.vue.cjs"),b=require("./set-expose.vue.cjs"),C=require("./set-slot.vue.cjs"),i=require("../../utils/props.cjs"),V=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.
|
|
1
|
+
"use strict";const t=require("vue"),x=require("./set-props.vue.cjs"),q=require("./set-emit.vue.cjs"),E=require("./set-code.vue.cjs"),b=require("./set-expose.vue.cjs"),C=require("./set-slot.vue.cjs"),i=require("../../utils/props.cjs"),V=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs"),j=t.defineComponent({props:{value:{type:Object},param:{type:Object}},render(O,T,v,D,a){console.log("render",new Date().getTime());const r=t.reactive({emitValue:{},slotValue:{}}),n=v.value;let c="div";n.component?c=t.defineAsyncComponent(n.component):n.name&&(c=t.resolveComponent(n.name));const u=v.param,d=i.getPropsValue(u.props),m=i.getEmitsValue(u.emits),y=i.getExposeValue(u.expose),h=i.getSlotValue(u.slot),l={},f={};d.forEach(s=>{let e=s.name;if(!e.includes(".")){let o=e.split("/");e=(o[0]||"").trim(),e&&(l[e]=a.propsValue[e],o&&o.length>1&&m.push({name:"update:"+e,description:s.description,selectable:"value:["+s.type+"]"}))}}),m.forEach(s=>{let e=s.name;if(e.includes("-")){let p=e.split("-");p=p.map((_,U)=>V.firstUpper(_)),e=p.join("")}else e=V.firstUpper(e);const o="on"+e;l[o]=(...p)=>{const _={arr:p,_date_:new Date().getTime()};r.emitValue[s.name]=_}});let g;return h.forEach(s=>{const e=s.name||"default";f[e]=o=>{if(r.slotValue[e])return t.h(t.defineComponent({props:{scope:{type:Object}},template:r.slotValue[e]}),{scope:o})}}),t.h("div",{class:"use"},[t.h("div",{class:"use-props"},t.h(x,{name:n.name,list:d,onChange:(s,e)=>{a.propsValue=s,a.propsText=e}})),t.h("div",{class:"use-component"},t.h(c,{...l,ref:s=>{g=s}},f)),t.h("div",{class:"use-code"},t.h(E,{name:n.name,value:l,propsText:a.propsText,slotValue:r.slotValue})),t.h("div",{class:"use-emit"},t.h(q,{name:n.name,list:m,value:r.emitValue})),t.h("div",{class:"use-expose"},t.h(b,{name:n.name,list:y,getRef:()=>g})),t.h("div",{class:"use-slot"},t.h(C,{name:n.name,list:h,onChange:(s,e)=>{r.slotValue[s]=e}}))])},data(){return{propsValue:{},propsText:{}}}});module.exports=j;
|