@fangzhongya/vue-archive 0.0.46 → 0.0.48
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/index.css +1 -1
- package/dist/node/index.cjs +166 -134
- package/dist/node/index.d.cts +4 -0
- package/dist/node/index.d.ts +4 -0
- package/dist/node/index.js +166 -134
- package/dist/packages/components/boxurl/index.vue.cjs +1 -1
- package/dist/packages/components/boxurl/index.vue.js +37 -27
- package/dist/packages/components/code/index.vue.cjs +1 -1
- package/dist/packages/components/code/index.vue.js +67 -57
- package/dist/packages/components/compo/index.vue.cjs +1 -1
- package/dist/packages/components/compo/index.vue.js +18 -16
- package/dist/packages/components/compo/info-top.vue.cjs +1 -0
- package/dist/packages/components/compo/info-top.vue.js +32 -0
- package/dist/packages/components/compo/info-top.vue2.cjs +1 -0
- package/dist/packages/components/compo/info-top.vue2.js +4 -0
- package/dist/packages/components/compo/props.vue.cjs +1 -1
- package/dist/packages/components/compo/props.vue.js +44 -40
- package/dist/packages/components/compo/top.cjs +1 -1
- package/dist/packages/components/compo/top.js +69 -48
- package/dist/packages/components/main/index.vue.cjs +1 -1
- package/dist/packages/components/main/index.vue.js +30 -25
- package/dist/packages/components/test/index.cjs +1 -1
- package/dist/packages/components/test/index.js +24 -22
- package/dist/packages/components/test/top.cjs +1 -1
- package/dist/packages/components/test/top.js +69 -84
- package/dist/packages/components/use/set-code.vue.cjs +1 -1
- package/dist/packages/components/use/set-code.vue.js +31 -36
- package/dist/packages/config.d.ts +3 -0
- package/dist/packages/page/develop/index.vue2.cjs +1 -1
- package/dist/packages/page/develop/index.vue2.js +2 -1
- package/dist/packages/utils/common.cjs +1 -1
- package/dist/packages/utils/common.d.ts +2 -0
- package/dist/packages/utils/common.js +13 -12
- package/dist/packages/utils/glob.cjs +2 -2
- package/dist/packages/utils/glob.d.ts +1 -1
- package/dist/packages/utils/glob.js +226 -235
- package/dist/packages/utils/util.cjs +1 -0
- package/dist/packages/utils/util.d.ts +4 -0
- package/dist/packages/utils/util.js +46 -0
- package/package.json +2 -2
|
@@ -1,105 +1,115 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { toSingle as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as j, watch as B, ref as s, createElementBlock as d, openBlock as u, createElementVNode as l, withDirectives as $, toDisplayString as f, createVNode as m, withCtx as p, withModifiers as _, normalizeClass as k, Fragment as E, renderList as F, createBlock as L, vShow as N } from "vue";
|
|
2
|
+
import h from "../boxurl/index.vue.js";
|
|
3
|
+
import { toSingle as O } from "../../router/index.js";
|
|
4
|
+
import U from "./highlight.vue.js";
|
|
5
5
|
import { copyCode as g } from "../../utils/index.js";
|
|
6
6
|
import { getTestImportUrl as V, getLocalTextArr as z } from "../../utils/glob.js";
|
|
7
|
+
import { exportStringToFile as C } from "../../utils/util.js";
|
|
8
|
+
import { getUrlCatalogueObj as x } from "@fangzhongya/utils/urls/getUrlCatalogueObj";
|
|
7
9
|
import { useRouter as A } from "vue-router";
|
|
8
|
-
const
|
|
10
|
+
const H = { class: "code" }, I = { class: "code-top" }, M = { class: "code-top-but" }, R = { class: "top-but-files" }, q = ["onClick"], G = { class: "code-highlightjs" }, le = /* @__PURE__ */ j({
|
|
9
11
|
__name: "index",
|
|
10
12
|
props: {
|
|
11
13
|
text: String,
|
|
12
14
|
value: Object
|
|
13
15
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
+
setup(w) {
|
|
17
|
+
const b = A(), e = w;
|
|
16
18
|
B(
|
|
17
19
|
() => e.text,
|
|
18
20
|
() => {
|
|
19
21
|
v();
|
|
20
22
|
}
|
|
21
23
|
);
|
|
22
|
-
const c =
|
|
23
|
-
function
|
|
24
|
-
|
|
24
|
+
const c = s([]), t = s(), n = s(!1);
|
|
25
|
+
function y() {
|
|
26
|
+
t.value?.raw ? g(t.value.raw) : g(e.text);
|
|
27
|
+
}
|
|
28
|
+
function S() {
|
|
29
|
+
if (t.value?.raw) {
|
|
30
|
+
const o = x(t.value?.key), i = e.value?.name + "_" + o.name + "." + o.suffix;
|
|
31
|
+
C(t.value.raw, i);
|
|
32
|
+
} else {
|
|
33
|
+
const o = x(e.value?.key), i = e.value?.name + "_" + o.name + "." + o.suffix;
|
|
34
|
+
C(e.text, i);
|
|
35
|
+
}
|
|
25
36
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
37
|
+
function D() {
|
|
38
|
+
n.value = !n.value;
|
|
28
39
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
40
|
+
function T() {
|
|
41
|
+
O(b, e.value);
|
|
31
42
|
}
|
|
32
|
-
function r(
|
|
33
|
-
|
|
43
|
+
function r(o) {
|
|
44
|
+
n.value = !0, t.value = o;
|
|
34
45
|
}
|
|
35
46
|
function v() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
).then((a) => {
|
|
44
|
-
z(a).then((s) => {
|
|
45
|
-
c.value = s.filter((l) => l.raw);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
47
|
+
t.value = void 0, n.value = !1, e.text && V(e.value, e.text, "vue").then(
|
|
48
|
+
(o) => {
|
|
49
|
+
z(o).then((i) => {
|
|
50
|
+
c.value = i.filter((a) => a.raw);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
);
|
|
48
54
|
}
|
|
49
|
-
return v(), (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
return v(), (o, i) => (u(), d("div", H, [
|
|
56
|
+
l("div", I, [
|
|
57
|
+
l("div", M, [
|
|
58
|
+
l("div", {
|
|
53
59
|
class: "but-div",
|
|
54
|
-
onClick:
|
|
60
|
+
onClick: T
|
|
55
61
|
}, "go"),
|
|
56
|
-
|
|
62
|
+
l("div", {
|
|
57
63
|
class: "but-div",
|
|
58
|
-
onClick:
|
|
64
|
+
onClick: y
|
|
59
65
|
}, "复制"),
|
|
60
|
-
|
|
66
|
+
l("div", {
|
|
67
|
+
class: "but-div",
|
|
68
|
+
onClick: S
|
|
69
|
+
}, "下载"),
|
|
70
|
+
l("div", {
|
|
61
71
|
class: "but-div",
|
|
62
|
-
onClick:
|
|
63
|
-
}, f(
|
|
64
|
-
|
|
65
|
-
|
|
72
|
+
onClick: D
|
|
73
|
+
}, f(n.value ? "隐藏" : "显示"), 1),
|
|
74
|
+
l("div", R, [
|
|
75
|
+
m(h, {
|
|
66
76
|
value: e.value
|
|
67
77
|
}, {
|
|
68
|
-
default:
|
|
69
|
-
|
|
70
|
-
class:
|
|
71
|
-
on: !(
|
|
78
|
+
default: p(() => [
|
|
79
|
+
l("div", {
|
|
80
|
+
class: k(["but-div", {
|
|
81
|
+
on: !(t.value && t.value.value)
|
|
72
82
|
}]),
|
|
73
|
-
onClick:
|
|
83
|
+
onClick: i[0] || (i[0] = _((a) => r(), ["stop"]))
|
|
74
84
|
}, " index.vue ", 2)
|
|
75
85
|
]),
|
|
76
86
|
_: 1
|
|
77
87
|
}, 8, ["value"]),
|
|
78
|
-
(u(!0), d(
|
|
79
|
-
default:
|
|
80
|
-
|
|
81
|
-
class:
|
|
82
|
-
on:
|
|
88
|
+
(u(!0), d(E, null, F(c.value, (a, J) => (u(), L(h, { value: a }, {
|
|
89
|
+
default: p(() => [
|
|
90
|
+
l("div", {
|
|
91
|
+
class: k(["but-div", {
|
|
92
|
+
on: a.key == t.value?.key
|
|
83
93
|
}]),
|
|
84
|
-
onClick:
|
|
85
|
-
}, f(
|
|
94
|
+
onClick: _((K) => r(a), ["stop"])
|
|
95
|
+
}, f(a.value), 11, q)
|
|
86
96
|
]),
|
|
87
97
|
_: 2
|
|
88
98
|
}, 1032, ["value"]))), 256))
|
|
89
99
|
])
|
|
90
100
|
])
|
|
91
101
|
]),
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
$(l("div", G, [
|
|
103
|
+
m(U, {
|
|
94
104
|
language: "html",
|
|
95
|
-
code:
|
|
105
|
+
code: t.value?.raw || e.text
|
|
96
106
|
}, null, 8, ["code"])
|
|
97
107
|
], 512), [
|
|
98
|
-
[
|
|
108
|
+
[N, n.value]
|
|
99
109
|
])
|
|
100
110
|
]));
|
|
101
111
|
}
|
|
102
112
|
});
|
|
103
113
|
export {
|
|
104
|
-
|
|
114
|
+
le as default
|
|
105
115
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),d=require("../use/index.cjs"),_=require("./props.vue.cjs"),k=require("../../config.cjs"),
|
|
1
|
+
"use strict";const e=require("vue"),d=require("../use/index.cjs"),_=require("./props.vue.cjs"),k=require("../../config.cjs"),B=require("../md/index.vue.cjs");require("./index.cjs");const i=require("../../utils/glob.cjs"),f={class:"compo"},g={key:0,class:"compo-md"},y={key:0,class:"compo-md-list"},C={key:1,class:"compo-use"},h=e.defineComponent({__name:"index",props:{value:Object,istop:Boolean},setup(m){const t=m,p=k.getConfig("useparam"),r=e.ref(""),c=e.reactive({md:!0}),o=e.ref([]),a=e.ref();function v(n){a.value=n}e.watch(()=>t.value,()=>{l()});function l(){t.value?.key&&(i.getLocalTextComponents(t.value?.key).then(n=>{r.value=n}),o.value=i.getKeyMds(t.value?.key)||[])}return l(),(n,s)=>(e.openBlock(),e.createElementBlock("div",f,[o.value&&o.value.length?(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",{onClick:s[0]||(s[0]=u=>c.md=!c.md),class:"compo-md-name"},"说明文档"),c.md?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,u=>(e.openBlock(),e.createBlock(B,{value:u},null,8,["value"]))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createVNode(_,{istop:t.istop,onChange:v,value:r.value},null,8,["istop","value"]),e.unref(p)?(e.openBlock(),e.createElementBlock("div",C,[e.createVNode(e.unref(d),{value:t.value,param:a.value},null,8,["value","param"])])):e.createCommentVNode("",!0)]))}});module.exports=h;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, ref as l, reactive as h, watch as y, createElementBlock as o, openBlock as
|
|
1
|
+
import { defineComponent as g, ref as l, reactive as h, watch as y, createElementBlock as o, openBlock as t, createCommentVNode as m, createVNode as v, createElementVNode as C, Fragment as x, renderList as B, createBlock as N, unref as d } from "vue";
|
|
2
2
|
import V from "../use/index.js";
|
|
3
3
|
import $ from "./props.vue.js";
|
|
4
4
|
import { getConfig as E } from "../../config.js";
|
|
@@ -17,43 +17,45 @@ const w = { class: "compo" }, D = {
|
|
|
17
17
|
}, G = /* @__PURE__ */ g({
|
|
18
18
|
__name: "index",
|
|
19
19
|
props: {
|
|
20
|
-
value: Object
|
|
20
|
+
value: Object,
|
|
21
|
+
istop: Boolean
|
|
21
22
|
},
|
|
22
23
|
setup(f) {
|
|
23
|
-
const
|
|
24
|
+
const e = f, _ = E("useparam"), r = l(""), s = h({
|
|
24
25
|
md: !0
|
|
25
26
|
}), a = l([]), u = l();
|
|
26
27
|
function k(n) {
|
|
27
28
|
u.value = n;
|
|
28
29
|
}
|
|
29
30
|
y(
|
|
30
|
-
() =>
|
|
31
|
+
() => e.value,
|
|
31
32
|
() => {
|
|
32
33
|
c();
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
36
|
function c() {
|
|
36
|
-
|
|
37
|
+
e.value?.key && (b(e.value?.key).then((n) => {
|
|
37
38
|
r.value = n;
|
|
38
|
-
}), a.value = j(
|
|
39
|
+
}), a.value = j(e.value?.key) || []);
|
|
39
40
|
}
|
|
40
|
-
return c(), (n, i) => (
|
|
41
|
-
a.value && a.value.length ? (
|
|
41
|
+
return c(), (n, i) => (t(), o("div", w, [
|
|
42
|
+
a.value && a.value.length ? (t(), o("div", D, [
|
|
42
43
|
C("div", {
|
|
43
|
-
onClick: i[0] || (i[0] = (
|
|
44
|
+
onClick: i[0] || (i[0] = (p) => s.md = !s.md),
|
|
44
45
|
class: "compo-md-name"
|
|
45
46
|
}, "说明文档"),
|
|
46
|
-
s.md ? (
|
|
47
|
-
(
|
|
47
|
+
s.md ? (t(), o("div", F, [
|
|
48
|
+
(t(!0), o(x, null, B(a.value, (p) => (t(), N(L, { value: p }, null, 8, ["value"]))), 256))
|
|
48
49
|
])) : m("", !0)
|
|
49
50
|
])) : m("", !0),
|
|
50
|
-
|
|
51
|
+
v($, {
|
|
52
|
+
istop: e.istop,
|
|
51
53
|
onChange: k,
|
|
52
54
|
value: r.value
|
|
53
|
-
}, null, 8, ["value"]),
|
|
54
|
-
d(_) ? (
|
|
55
|
-
|
|
56
|
-
value:
|
|
55
|
+
}, null, 8, ["istop", "value"]),
|
|
56
|
+
d(_) ? (t(), o("div", K, [
|
|
57
|
+
v(d(V), {
|
|
58
|
+
value: e.value,
|
|
57
59
|
param: u.value
|
|
58
60
|
}, null, 8, ["value", "param"])
|
|
59
61
|
])) : m("", !0)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),r=require("./top.cjs"),a=require("./index.cjs"),l=require("../../utils/glob.cjs"),i={class:"info-top"},p=e.defineComponent({__name:"info-top",props:{value:{type:Object}},setup(u){const t=u,o=e.ref([]);function n(){t.value?.key&&l.getLocalTextComponents(t.value?.key).then(c=>{const s=a.getNotesText(c);o.value=s.titles})}return e.watch(()=>t.value,()=>{n()}),n(),(c,s)=>(e.openBlock(),e.createElementBlock("div",i,[e.createVNode(e.unref(r.default),{value:o.value},null,8,["value"])]))}});module.exports=p;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent as c, ref as l, watch as p, createElementBlock as s, openBlock as u, createVNode as i, unref as f } from "vue";
|
|
2
|
+
import m from "./top.js";
|
|
3
|
+
import { getNotesText as v } from "./index.js";
|
|
4
|
+
import { getLocalTextComponents as _ } from "../../utils/glob.js";
|
|
5
|
+
const d = { class: "info-top" }, y = /* @__PURE__ */ c({
|
|
6
|
+
__name: "info-top",
|
|
7
|
+
props: {
|
|
8
|
+
value: {
|
|
9
|
+
type: Object
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
setup(r) {
|
|
13
|
+
const e = r, t = l([]);
|
|
14
|
+
function o() {
|
|
15
|
+
e.value?.key && _(e.value?.key).then((n) => {
|
|
16
|
+
const a = v(n);
|
|
17
|
+
t.value = a.titles;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return p(
|
|
21
|
+
() => e.value,
|
|
22
|
+
() => {
|
|
23
|
+
o();
|
|
24
|
+
}
|
|
25
|
+
), o(), (n, a) => (u(), s("div", d, [
|
|
26
|
+
i(f(m), { value: t.value }, null, 8, ["value"])
|
|
27
|
+
]));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
y as default
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./info-top.vue.cjs");module.exports=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),B=require("./top.cjs"),n=require("./ftable.vue.cjs"),l=require("./index.cjs"),N={class:"compo"},_={key:0,class:"compo-top"},V={class:"compo-li compo-props"},x={class:"compo-li compo-emits"},C={class:"compo-li compo-expose"},E={class:"compo-li compo-slot"},y=e.defineComponent({__name:"props",props:{value:String,istop:Boolean},emits:["change"],setup(u,{emit:k}){const c=u,f=k,i=e.ref([]),t=e.reactive({props:!0,expose:!0,emits:!0,slot:!0,top:!0}),p=e.ref([]),a=e.ref([]),m=e.ref([]),v=e.ref([]);function d(){if(c.value){const s=l.getNotesText(c.value);i.value=s.titles,p.value=s.propss,v.value=s.slots,a.value=s.emitss,m.value=s.exposes,f("change",s)}}return e.watch(()=>c.value,()=>{d()}),d(),(s,o)=>(e.openBlock(),e.createElementBlock("div",N,[u.istop?(e.openBlock(),e.createElementBlock("div",_,[t.top?(e.openBlock(),e.createBlock(e.unref(B.default),{key:0,value:i.value},null,8,["value"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",V,[e.createElementVNode("h4",{onClick:o[0]||(o[0]=r=>t.props=!t.props)},"组件属性"),t.props?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.tprops),value:p.value},null,8,["list","value"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",x,[e.createElementVNode("h4",{onClick:o[1]||(o[1]=r=>t.emits=!t.emits)},"组件事件"),t.emits?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.temits),value:a.value},null,8,["list","value"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",C,[e.createElementVNode("h4",{onClick:o[2]||(o[2]=r=>t.expose=!t.expose)},"组件方法"),t.expose?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.texpose),value:m.value},null,8,["list","value"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",E,[e.createElementVNode("h4",{onClick:o[3]||(o[3]=r=>t.slot=!t.slot)},"组件插槽"),t.slot?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.tslot),value:v.value},null,8,["list","value"])):e.createCommentVNode("",!0)])]))}});module.exports=y;
|
|
@@ -1,78 +1,82 @@
|
|
|
1
|
-
import { defineComponent as g, ref as
|
|
1
|
+
import { defineComponent as g, ref as p, reactive as $, watch as B, createElementBlock as h, openBlock as l, createCommentVNode as i, createElementVNode as o, createBlock as n, unref as u } from "vue";
|
|
2
2
|
import N from "./top.js";
|
|
3
3
|
import r from "./ftable.vue.js";
|
|
4
4
|
import { tprops as E, temits as T, texpose as V, tslot as b, getNotesText as j } from "./index.js";
|
|
5
|
-
const w = { class: "compo" }, D = {
|
|
5
|
+
const w = { class: "compo" }, D = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "compo-top"
|
|
8
|
+
}, S = { class: "compo-li compo-props" }, q = { class: "compo-li compo-emits" }, z = { class: "compo-li compo-expose" }, A = { class: "compo-li compo-slot" }, J = /* @__PURE__ */ g({
|
|
6
9
|
__name: "props",
|
|
7
10
|
props: {
|
|
8
|
-
value: String
|
|
11
|
+
value: String,
|
|
12
|
+
istop: Boolean
|
|
9
13
|
},
|
|
10
14
|
emits: ["change"],
|
|
11
|
-
setup(
|
|
12
|
-
const v =
|
|
15
|
+
setup(c, { emit: y }) {
|
|
16
|
+
const v = c, C = y, m = p([]), e = $({
|
|
13
17
|
props: !0,
|
|
14
18
|
expose: !0,
|
|
15
19
|
emits: !0,
|
|
16
20
|
slot: !0,
|
|
17
21
|
top: !0
|
|
18
|
-
}),
|
|
22
|
+
}), d = p([]), k = p([]), f = p([]), x = p([]);
|
|
19
23
|
function _() {
|
|
20
24
|
if (v.value) {
|
|
21
25
|
const s = j(v.value);
|
|
22
|
-
|
|
26
|
+
m.value = s.titles, d.value = s.propss, x.value = s.slots, k.value = s.emitss, f.value = s.exposes, C("change", s);
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
|
-
return
|
|
29
|
+
return B(
|
|
26
30
|
() => v.value,
|
|
27
31
|
() => {
|
|
28
32
|
_();
|
|
29
33
|
}
|
|
30
|
-
), _(), (s,
|
|
31
|
-
|
|
32
|
-
e.top ? (l(),
|
|
34
|
+
), _(), (s, t) => (l(), h("div", w, [
|
|
35
|
+
c.istop ? (l(), h("div", D, [
|
|
36
|
+
e.top ? (l(), n(u(N), {
|
|
33
37
|
key: 0,
|
|
34
|
-
value:
|
|
35
|
-
}, null, 8, ["value"])) :
|
|
36
|
-
]),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
onClick:
|
|
40
|
-
}, "
|
|
41
|
-
e.props ? (l(),
|
|
38
|
+
value: m.value
|
|
39
|
+
}, null, 8, ["value"])) : i("", !0)
|
|
40
|
+
])) : i("", !0),
|
|
41
|
+
o("div", S, [
|
|
42
|
+
o("h4", {
|
|
43
|
+
onClick: t[0] || (t[0] = (a) => e.props = !e.props)
|
|
44
|
+
}, "组件属性"),
|
|
45
|
+
e.props ? (l(), n(r, {
|
|
42
46
|
key: 0,
|
|
43
47
|
list: u(E),
|
|
44
|
-
value:
|
|
45
|
-
}, null, 8, ["list", "value"])) :
|
|
48
|
+
value: d.value
|
|
49
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
46
50
|
]),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
onClick:
|
|
50
|
-
}, "
|
|
51
|
-
e.emits ? (l(),
|
|
51
|
+
o("div", q, [
|
|
52
|
+
o("h4", {
|
|
53
|
+
onClick: t[1] || (t[1] = (a) => e.emits = !e.emits)
|
|
54
|
+
}, "组件事件"),
|
|
55
|
+
e.emits ? (l(), n(r, {
|
|
52
56
|
key: 0,
|
|
53
57
|
list: u(T),
|
|
54
|
-
value:
|
|
55
|
-
}, null, 8, ["list", "value"])) :
|
|
58
|
+
value: k.value
|
|
59
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
56
60
|
]),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
onClick:
|
|
60
|
-
}, "
|
|
61
|
-
e.expose ? (l(),
|
|
61
|
+
o("div", z, [
|
|
62
|
+
o("h4", {
|
|
63
|
+
onClick: t[2] || (t[2] = (a) => e.expose = !e.expose)
|
|
64
|
+
}, "组件方法"),
|
|
65
|
+
e.expose ? (l(), n(r, {
|
|
62
66
|
key: 0,
|
|
63
67
|
list: u(V),
|
|
64
68
|
value: f.value
|
|
65
|
-
}, null, 8, ["list", "value"])) :
|
|
69
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
66
70
|
]),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
onClick:
|
|
71
|
+
o("div", A, [
|
|
72
|
+
o("h4", {
|
|
73
|
+
onClick: t[3] || (t[3] = (a) => e.slot = !e.slot)
|
|
70
74
|
}, "组件插槽"),
|
|
71
|
-
e.slot ? (l(),
|
|
75
|
+
e.slot ? (l(), n(r, {
|
|
72
76
|
key: 0,
|
|
73
77
|
list: u(b),
|
|
74
|
-
value:
|
|
75
|
-
}, null, 8, ["list", "value"])) :
|
|
78
|
+
value: x.value
|
|
79
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
76
80
|
])
|
|
77
81
|
]));
|
|
78
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("@fangzhongya/utils/html/htmlEscape");function v(m,e,u){let i=[],f=[],l=[];const n=t=>t,a=()=>{l.length>0&&(i.push(e("div",{class:"compo-top-list"},l)),l=[])},c=()=>{i.length>0&&(f.push(e("div",{class:"compo-top-division"},i)),i=[])};return m?.forEach(t=>{const r=[];let o=!1;if(t.date&&(o=!0,r.push(e("div",{class:"compo-top-date"},[e("span",{},"更新时间:"),e("span",{},[n(t.date.name+" "+t.date.description)])]))),t.author&&(o=!0,r.push(e("div",{class:"compo-top-author"},[e("span",{},"作者:"),e("span",{},[n(t.author.name+" "+t.author.description)])]))),t.title&&(t.title.type||t.title.name||t.title.description)){a(),o&&c();let s=(t.title.type||"div").split("."),p=s[1]||"";s[0]=="html"?i.push(e("div",{class:"compo-top-title "+p,innerHTML:t.title.name+" "+t.title.description})):i.push(e(s[0],{class:"compo-top-title "+p},[e("span",{},[n(t.title.name+" "+t.title.description)])]))}if(o&&(l.length>0&&(a(),c()),i.push(e("div",{class:"compo-top-info"},r))),t.html){let s=(t.html.type||"div").split("."),p=s[1]||"";l.push(e(s[0],{class:"compo-top-html "+p,innerHTML:t.html.name+" "+t.html.description}))}["text"].forEach(s=>{if(t[s]){let p=(t[s].type||"div").split("."),h=p[1]||"";p[0]=="html"?l.push(e("div",{class:"compo-top-"+s+" "+h,innerHTML:t[s].name+" "+t[s].description})):l.push(e(p[0],{class:"compo-top-"+s+" "+h},[e("span",{},[n(t[s].name+" "+t[s].description)])]))}})}),a(),c(),f}const y=d.defineComponent({props:{value:Array},render(m,e,u){const i=v(u.value,d.h);return d.h("div",{class:"compo-top"},i)}});exports.default=y;exports.getTopDom=v;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, h } from "vue";
|
|
2
2
|
import "@fangzhongya/utils/html/htmlEscape";
|
|
3
|
-
function v(
|
|
4
|
-
let
|
|
5
|
-
const
|
|
6
|
-
|
|
3
|
+
function v(m, e, d) {
|
|
4
|
+
let i = [], u = [], l = [];
|
|
5
|
+
const n = (t) => t, a = () => {
|
|
6
|
+
l.length > 0 && (i.push(
|
|
7
7
|
e(
|
|
8
8
|
"div",
|
|
9
9
|
{
|
|
10
10
|
class: "compo-top-list"
|
|
11
11
|
},
|
|
12
|
-
|
|
12
|
+
l
|
|
13
13
|
)
|
|
14
|
-
),
|
|
15
|
-
},
|
|
16
|
-
|
|
14
|
+
), l = []);
|
|
15
|
+
}, c = () => {
|
|
16
|
+
i.length > 0 && (u.push(
|
|
17
17
|
e(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
20
|
class: "compo-top-division"
|
|
21
21
|
},
|
|
22
|
-
|
|
22
|
+
i
|
|
23
23
|
)
|
|
24
|
-
),
|
|
24
|
+
), i = []);
|
|
25
25
|
};
|
|
26
|
-
return
|
|
27
|
-
const
|
|
26
|
+
return m?.forEach((t) => {
|
|
27
|
+
const r = [];
|
|
28
28
|
let o = !1;
|
|
29
|
-
if (t.date && (o = !0,
|
|
29
|
+
if (t.date && (o = !0, r.push(
|
|
30
30
|
e(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
@@ -35,13 +35,13 @@ function v(r, e, d) {
|
|
|
35
35
|
[
|
|
36
36
|
e("span", {}, "更新时间:"),
|
|
37
37
|
e("span", {}, [
|
|
38
|
-
|
|
38
|
+
n(
|
|
39
39
|
t.date.name + " " + t.date.description
|
|
40
40
|
)
|
|
41
41
|
])
|
|
42
42
|
]
|
|
43
43
|
)
|
|
44
|
-
)), t.author && (o = !0,
|
|
44
|
+
)), t.author && (o = !0, r.push(
|
|
45
45
|
e(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
@@ -50,24 +50,29 @@ function v(r, e, d) {
|
|
|
50
50
|
[
|
|
51
51
|
e("span", {}, "作者:"),
|
|
52
52
|
e("span", {}, [
|
|
53
|
-
|
|
53
|
+
n(
|
|
54
54
|
t.author.name + " " + t.author.description
|
|
55
55
|
)
|
|
56
56
|
])
|
|
57
57
|
]
|
|
58
58
|
)
|
|
59
59
|
)), t.title && (t.title.type || t.title.name || t.title.description)) {
|
|
60
|
-
|
|
61
|
-
let
|
|
62
|
-
s.push(
|
|
60
|
+
a(), o && c();
|
|
61
|
+
let s = (t.title.type || "div").split("."), p = s[1] || "";
|
|
62
|
+
s[0] == "html" ? i.push(
|
|
63
|
+
e("div", {
|
|
64
|
+
class: "compo-top-title " + p,
|
|
65
|
+
innerHTML: t.title.name + " " + t.title.description
|
|
66
|
+
})
|
|
67
|
+
) : i.push(
|
|
63
68
|
e(
|
|
64
|
-
|
|
69
|
+
s[0],
|
|
65
70
|
{
|
|
66
|
-
class: "compo-top-title"
|
|
71
|
+
class: "compo-top-title " + p
|
|
67
72
|
},
|
|
68
73
|
[
|
|
69
74
|
e("span", {}, [
|
|
70
|
-
|
|
75
|
+
n(
|
|
71
76
|
t.title.name + " " + t.title.description
|
|
72
77
|
)
|
|
73
78
|
])
|
|
@@ -75,53 +80,69 @@ function v(r, e, d) {
|
|
|
75
80
|
)
|
|
76
81
|
);
|
|
77
82
|
}
|
|
78
|
-
if (o && (
|
|
83
|
+
if (o && (l.length > 0 && (a(), c()), i.push(
|
|
79
84
|
e(
|
|
80
85
|
"div",
|
|
81
86
|
{
|
|
82
87
|
class: "compo-top-info"
|
|
83
88
|
},
|
|
84
|
-
|
|
89
|
+
r
|
|
85
90
|
)
|
|
86
|
-
)), t.
|
|
87
|
-
let
|
|
88
|
-
|
|
89
|
-
e(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
[
|
|
95
|
-
e("span", {}, [
|
|
96
|
-
p(
|
|
97
|
-
t.text.name + " " + t.text.description
|
|
98
|
-
)
|
|
99
|
-
])
|
|
100
|
-
]
|
|
101
|
-
)
|
|
91
|
+
)), t.html) {
|
|
92
|
+
let s = (t.html.type || "div").split("."), p = s[1] || "";
|
|
93
|
+
l.push(
|
|
94
|
+
e(s[0], {
|
|
95
|
+
class: "compo-top-html " + p,
|
|
96
|
+
innerHTML: t.html.name + " " + t.html.description
|
|
97
|
+
})
|
|
102
98
|
);
|
|
103
99
|
}
|
|
104
|
-
|
|
100
|
+
["text"].forEach((s) => {
|
|
101
|
+
if (t[s]) {
|
|
102
|
+
let p = (t[s].type || "div").split("."), f = p[1] || "";
|
|
103
|
+
p[0] == "html" ? l.push(
|
|
104
|
+
e("div", {
|
|
105
|
+
class: "compo-top-" + s + " " + f,
|
|
106
|
+
innerHTML: t[s].name + " " + t[s].description
|
|
107
|
+
})
|
|
108
|
+
) : l.push(
|
|
109
|
+
e(
|
|
110
|
+
p[0],
|
|
111
|
+
{
|
|
112
|
+
class: "compo-top-" + s + " " + f
|
|
113
|
+
},
|
|
114
|
+
[
|
|
115
|
+
e("span", {}, [
|
|
116
|
+
n(
|
|
117
|
+
t[s].name + " " + t[s].description
|
|
118
|
+
)
|
|
119
|
+
])
|
|
120
|
+
]
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}), a(), c(), u;
|
|
105
126
|
}
|
|
106
|
-
const
|
|
127
|
+
const H = y({
|
|
107
128
|
/**
|
|
108
129
|
* @props {Stinrg} value 插入数据
|
|
109
130
|
*/
|
|
110
131
|
props: {
|
|
111
132
|
value: Array
|
|
112
133
|
},
|
|
113
|
-
render(
|
|
114
|
-
const
|
|
115
|
-
return
|
|
134
|
+
render(m, e, d) {
|
|
135
|
+
const i = v(d.value, h);
|
|
136
|
+
return h(
|
|
116
137
|
"div",
|
|
117
138
|
{
|
|
118
139
|
class: "compo-top"
|
|
119
140
|
},
|
|
120
|
-
|
|
141
|
+
i
|
|
121
142
|
);
|
|
122
143
|
}
|
|
123
144
|
});
|
|
124
145
|
export {
|
|
125
|
-
|
|
146
|
+
H as default,
|
|
126
147
|
v as getTopDom
|
|
127
148
|
};
|