@fangzhongya/vue-archive 0.0.3-4 → 0.0.3-6
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/node/index.cjs +19 -18
- package/dist/node/index.js +19 -18
- package/dist/packages/components/use/code.cjs +10 -11
- package/dist/packages/components/use/code.js +88 -90
- package/dist/packages/components/use/set-props.vue.cjs +1 -1
- package/dist/packages/components/use/set-props.vue.js +21 -21
- package/dist/style.css +2 -2
- package/package.json +1 -1
package/dist/node/index.cjs
CHANGED
|
@@ -66513,30 +66513,32 @@ function getFunctionBody(v, key, propsText) {
|
|
|
66513
66513
|
if (text) {
|
|
66514
66514
|
return "function" + text;
|
|
66515
66515
|
} else {
|
|
66516
|
-
|
|
66517
|
-
|
|
66518
|
-
|
|
66519
|
-
|
|
66520
|
-
|
|
66516
|
+
return funstr(v.toString());
|
|
66517
|
+
}
|
|
66518
|
+
}
|
|
66519
|
+
function funstr(v) {
|
|
66520
|
+
const st = getFunctionFormat(prettierFormat(v));
|
|
66521
|
+
if (st) {
|
|
66522
|
+
let body = `{
|
|
66521
66523
|
${vueFormat(getFunBody(st.body), " ")}
|
|
66522
66524
|
}`;
|
|
66523
|
-
|
|
66524
|
-
|
|
66525
|
-
|
|
66526
|
-
}
|
|
66525
|
+
return `function${st.param}${body}`;
|
|
66526
|
+
} else {
|
|
66527
|
+
return "undefined";
|
|
66527
66528
|
}
|
|
66528
66529
|
}
|
|
66529
66530
|
function getChange(str) {
|
|
66530
66531
|
const tr = str.trim();
|
|
66531
66532
|
if (/^\(/.test(tr)) {
|
|
66532
|
-
return
|
|
66533
|
+
return funstr(tr);
|
|
66533
66534
|
} else {
|
|
66534
|
-
return
|
|
66535
|
-
|
|
66536
|
-
|
|
66537
|
-
|
|
66538
|
-
return
|
|
66535
|
+
return JSON.stringify(
|
|
66536
|
+
new Function(
|
|
66537
|
+
"",
|
|
66538
|
+
`{
|
|
66539
|
+
return ${str}
|
|
66539
66540
|
}`
|
|
66541
|
+
)
|
|
66540
66542
|
);
|
|
66541
66543
|
}
|
|
66542
66544
|
}
|
|
@@ -66546,7 +66548,7 @@ function setValStringify(v, key, propsText) {
|
|
|
66546
66548
|
return text;
|
|
66547
66549
|
} else {
|
|
66548
66550
|
if (typeof v == "string") {
|
|
66549
|
-
return
|
|
66551
|
+
return getChange(v + "");
|
|
66550
66552
|
} else {
|
|
66551
66553
|
return JSON.stringify(v);
|
|
66552
66554
|
}
|
|
@@ -66673,8 +66675,7 @@ function getDefaultValue(obj) {
|
|
|
66673
66675
|
return new Function(
|
|
66674
66676
|
"",
|
|
66675
66677
|
`{
|
|
66676
|
-
|
|
66677
|
-
return a;
|
|
66678
|
+
return ${d}
|
|
66678
66679
|
}`
|
|
66679
66680
|
);
|
|
66680
66681
|
}
|
package/dist/node/index.js
CHANGED
|
@@ -66513,30 +66513,32 @@ function getFunctionBody(v, key, propsText) {
|
|
|
66513
66513
|
if (text) {
|
|
66514
66514
|
return "function" + text;
|
|
66515
66515
|
} else {
|
|
66516
|
-
|
|
66517
|
-
|
|
66518
|
-
|
|
66519
|
-
|
|
66520
|
-
|
|
66516
|
+
return funstr(v.toString());
|
|
66517
|
+
}
|
|
66518
|
+
}
|
|
66519
|
+
function funstr(v) {
|
|
66520
|
+
const st = getFunctionFormat(prettierFormat(v));
|
|
66521
|
+
if (st) {
|
|
66522
|
+
let body = `{
|
|
66521
66523
|
${vueFormat(getFunBody(st.body), " ")}
|
|
66522
66524
|
}`;
|
|
66523
|
-
|
|
66524
|
-
|
|
66525
|
-
|
|
66526
|
-
}
|
|
66525
|
+
return `function${st.param}${body}`;
|
|
66526
|
+
} else {
|
|
66527
|
+
return "undefined";
|
|
66527
66528
|
}
|
|
66528
66529
|
}
|
|
66529
66530
|
function getChange(str) {
|
|
66530
66531
|
const tr = str.trim();
|
|
66531
66532
|
if (/^\(/.test(tr)) {
|
|
66532
|
-
return
|
|
66533
|
+
return funstr(tr);
|
|
66533
66534
|
} else {
|
|
66534
|
-
return
|
|
66535
|
-
|
|
66536
|
-
|
|
66537
|
-
|
|
66538
|
-
return
|
|
66535
|
+
return JSON.stringify(
|
|
66536
|
+
new Function(
|
|
66537
|
+
"",
|
|
66538
|
+
`{
|
|
66539
|
+
return ${str}
|
|
66539
66540
|
}`
|
|
66541
|
+
)
|
|
66540
66542
|
);
|
|
66541
66543
|
}
|
|
66542
66544
|
}
|
|
@@ -66546,7 +66548,7 @@ function setValStringify(v, key, propsText) {
|
|
|
66546
66548
|
return text;
|
|
66547
66549
|
} else {
|
|
66548
66550
|
if (typeof v == "string") {
|
|
66549
|
-
return
|
|
66551
|
+
return getChange(v + "");
|
|
66550
66552
|
} else {
|
|
66551
66553
|
return JSON.stringify(v);
|
|
66552
66554
|
}
|
|
@@ -66673,8 +66675,7 @@ function getDefaultValue(obj) {
|
|
|
66673
66675
|
return new Function(
|
|
66674
66676
|
"",
|
|
66675
66677
|
`{
|
|
66676
|
-
|
|
66677
|
-
return a;
|
|
66678
|
+
return ${d}
|
|
66678
66679
|
}`
|
|
66679
66680
|
);
|
|
66680
66681
|
}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),d=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs"),S=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs"),h=require("./util.cjs");function F(n,t,e,r){const o=[],i=[];let f=!0;Object.keys(t).forEach(s=>{let l=t[s];if(/^on[A-Z]/.test(s)&&typeof l=="function"){let u=s.substring(2);const p=s.split(":");let c;if(p.length>1?(c=p[0]+p.slice(1).map(a=>d.firstUpper(a)).join(""),u=S.firstLower(u)):(c=p[0],u=b.humpToLine(u)),p.includes("-")){let a=c.split("-");a=a.map((m,$)=>$!=0?d.firstUpper(m):m),c=a.join("")}o.push(" @"+u+'="'+c+'"'),i.push("function "+c+"(...arr) {"),i.push(" console.log('"+c+"', arr)"),i.push("}")}else if(o.push(" :"+s+'="'+s+'"'),typeof l=="function")i.push("const "+s+" = "+O(l,s,r));else if(f&&(f=!1,i.unshift("import { ref } from 'vue';")),typeof l>"u")i.push("const "+s+" = ref();");else{let u=E(l,s,r);i.push("const "+s+" = ref("+u+");")}}),o.length>0&&o.unshift("");const g=j(e);return`<!--${n}-->
|
|
2
2
|
<template>
|
|
3
3
|
<div>
|
|
4
|
-
<${
|
|
4
|
+
<${n}${o.join(`
|
|
5
5
|
`)}>${g.join(`
|
|
6
6
|
`)}
|
|
7
|
-
</${
|
|
7
|
+
</${n}>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
<script lang="ts" setup>
|
|
11
|
-
${
|
|
11
|
+
${i.join(`
|
|
12
12
|
`)}
|
|
13
13
|
<\/script>
|
|
14
|
-
`}function
|
|
14
|
+
`}function j(n={}){const t=[];return Object.keys(n).forEach(e=>{const r=n[e];if(r){const o=` <template #${e}="scope">
|
|
15
15
|
${h.vueFormat(r," ")}
|
|
16
|
-
</template>`;
|
|
17
|
-
${h.vueFormat(h.getFunBody(
|
|
18
|
-
}`;return`function${
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}`)}function J(t,e,n){const r=n?n[e]:"";return r||JSON.stringify(typeof t=="string"?O(t+""):t)}function w(t){let e=E(t.type),n="any";e.length==1&&(n=e[0].split("<")[0]);const r=n;let i=(t.selectable||"").trim(),s=[];return i&&n!="boolean"&&(i.split(",").forEach(l=>{if(l){let g=l.split(":");s.push({label:l,prop:g[0].trim()})}}),n=="function"?n="function":n=="array"?n="choice":n="select"),{arr:s,zdtype:r,type:n,dataType:e}}function E(t){let e=[];return(t||"").trim().toLowerCase().split(",").forEach(r=>{r=r.trim(),r&&e.push(r)}),[...new Set(e)].sort()}exports.getHmtl=S;exports.getSpecType=w;
|
|
16
|
+
</template>`;t.push(o)}}),t&&t.length>0&&t.unshift(""),t}function O(n,t,e){const r=e?e[t]:"";return r?"function"+r:y(n.toString())}function y(n){const t=h.getFunctionFormat(h.prettierFormat(n));if(t){let e=`{
|
|
17
|
+
${h.vueFormat(h.getFunBody(t.body)," ")}
|
|
18
|
+
}`;return`function${t.param}${e}`}else return"undefined"}function J(n){const t=n.trim();return/^\(/.test(t)?y(t):JSON.stringify(new Function("",`{
|
|
19
|
+
return ${n}
|
|
20
|
+
}`))}function E(n,t,e){const r=e?e[t]:"";return r||(typeof n=="string"?J(n+""):JSON.stringify(n))}function T(n){let t=q(n.type),e="any";t.length==1&&(e=t[0].split("<")[0]);const r=e;let o=(n.selectable||"").trim(),i=[];return o&&e!="boolean"&&(o.split(",").forEach(f=>{if(f){let g=f.split(":");i.push({label:f,prop:g[0].trim()})}}),e=="function"?e="function":e=="array"?e="choice":e="select"),{arr:i,zdtype:r,type:e,dataType:t}}function q(n){let t=[];return(n||"").trim().toLowerCase().split(",").forEach(r=>{r=r.trim(),r&&t.push(r)}),[...new Set(t)].sort()}exports.getHmtl=F;exports.getSpecType=T;
|
|
@@ -1,136 +1,134 @@
|
|
|
1
|
-
import { humpToLine as
|
|
1
|
+
import { humpToLine as b } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
|
|
2
2
|
import { firstUpper as g } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js";
|
|
3
|
-
import { firstLower as
|
|
4
|
-
import { vueFormat as d, getFunctionFormat as
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
let
|
|
8
|
-
Object.keys(
|
|
9
|
-
let c =
|
|
10
|
-
if (/^on[A-Z]/.test(
|
|
11
|
-
let f =
|
|
12
|
-
const p =
|
|
13
|
-
let
|
|
14
|
-
if (p.length > 1 ? (
|
|
15
|
-
let a =
|
|
16
|
-
a = a.map((h,
|
|
3
|
+
import { firstLower as F } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
|
|
4
|
+
import { vueFormat as d, getFunctionFormat as S, prettierFormat as j, getFunBody as w } from "./util.js";
|
|
5
|
+
function T(n, t, e, r) {
|
|
6
|
+
const o = [], i = [];
|
|
7
|
+
let l = !0;
|
|
8
|
+
Object.keys(t).forEach((s) => {
|
|
9
|
+
let c = t[s];
|
|
10
|
+
if (/^on[A-Z]/.test(s) && typeof c == "function") {
|
|
11
|
+
let f = s.substring(2);
|
|
12
|
+
const p = s.split(":");
|
|
13
|
+
let u;
|
|
14
|
+
if (p.length > 1 ? (u = p[0] + p.slice(1).map((a) => g(a)).join(""), f = F(f)) : (u = p[0], f = b(f)), p.includes("-")) {
|
|
15
|
+
let a = u.split("-");
|
|
16
|
+
a = a.map((h, y) => y != 0 ? g(h) : h), u = a.join("");
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
" @" + f + '="' +
|
|
20
|
-
),
|
|
21
|
-
" console.log('" +
|
|
22
|
-
),
|
|
23
|
-
} else if (
|
|
24
|
-
" :" +
|
|
18
|
+
o.push(
|
|
19
|
+
" @" + f + '="' + u + '"'
|
|
20
|
+
), i.push("function " + u + "(...arr) {"), i.push(
|
|
21
|
+
" console.log('" + u + "', arr)"
|
|
22
|
+
), i.push("}");
|
|
23
|
+
} else if (o.push(
|
|
24
|
+
" :" + s + '="' + s + '"'
|
|
25
25
|
), typeof c == "function")
|
|
26
|
-
|
|
27
|
-
"const " +
|
|
26
|
+
i.push(
|
|
27
|
+
"const " + s + " = " + O(
|
|
28
28
|
c,
|
|
29
|
-
|
|
29
|
+
s,
|
|
30
30
|
r
|
|
31
31
|
)
|
|
32
32
|
);
|
|
33
|
-
else if (
|
|
33
|
+
else if (l && (l = !1, i.unshift(
|
|
34
34
|
"import { ref } from 'vue';"
|
|
35
35
|
)), typeof c > "u")
|
|
36
|
-
|
|
36
|
+
i.push("const " + s + " = ref();");
|
|
37
37
|
else {
|
|
38
|
-
let f =
|
|
38
|
+
let f = z(
|
|
39
39
|
c,
|
|
40
|
-
|
|
40
|
+
s,
|
|
41
41
|
r
|
|
42
42
|
);
|
|
43
|
-
|
|
44
|
-
"const " +
|
|
43
|
+
i.push(
|
|
44
|
+
"const " + s + " = ref(" + f + ");"
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
48
|
-
const m =
|
|
49
|
-
return `<!--${
|
|
47
|
+
}), o.length > 0 && o.unshift("");
|
|
48
|
+
const m = E(e);
|
|
49
|
+
return `<!--${n}-->
|
|
50
50
|
<template>
|
|
51
51
|
<div>
|
|
52
|
-
<${
|
|
52
|
+
<${n}${o.join(`
|
|
53
53
|
`)}>${m.join(`
|
|
54
54
|
`)}
|
|
55
|
-
</${
|
|
55
|
+
</${n}>
|
|
56
56
|
</div>
|
|
57
57
|
</template>
|
|
58
58
|
<script lang="ts" setup>
|
|
59
|
-
${
|
|
59
|
+
${i.join(`
|
|
60
60
|
`)}
|
|
61
61
|
<\/script>
|
|
62
62
|
`;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
return Object.keys(
|
|
67
|
-
const r =
|
|
64
|
+
function E(n = {}) {
|
|
65
|
+
const t = [];
|
|
66
|
+
return Object.keys(n).forEach((e) => {
|
|
67
|
+
const r = n[e];
|
|
68
68
|
if (r) {
|
|
69
|
-
const
|
|
69
|
+
const o = ` <template #${e}="scope">
|
|
70
70
|
${d(r, " ")}
|
|
71
71
|
</template>`;
|
|
72
|
-
|
|
72
|
+
t.push(o);
|
|
73
73
|
}
|
|
74
|
-
}),
|
|
74
|
+
}), t && t.length > 0 && t.unshift(""), t;
|
|
75
|
+
}
|
|
76
|
+
function O(n, t, e) {
|
|
77
|
+
const r = e ? e[t] : "";
|
|
78
|
+
return r ? "function" + r : $(n.toString());
|
|
75
79
|
}
|
|
76
|
-
function
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const i = F(
|
|
82
|
-
S(t.toString())
|
|
83
|
-
);
|
|
84
|
-
if (i) {
|
|
85
|
-
let s = `{
|
|
86
|
-
${d(j(i.body), " ")}
|
|
80
|
+
function $(n) {
|
|
81
|
+
const t = S(j(n));
|
|
82
|
+
if (t) {
|
|
83
|
+
let e = `{
|
|
84
|
+
${d(w(t.body), " ")}
|
|
87
85
|
}`;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
86
|
+
return `function${t.param}${e}`;
|
|
87
|
+
} else
|
|
88
|
+
return "undefined";
|
|
92
89
|
}
|
|
93
|
-
function
|
|
94
|
-
const
|
|
95
|
-
return /^\(/.test(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return
|
|
90
|
+
function L(n) {
|
|
91
|
+
const t = n.trim();
|
|
92
|
+
return /^\(/.test(t) ? $(t) : JSON.stringify(
|
|
93
|
+
new Function(
|
|
94
|
+
"",
|
|
95
|
+
`{
|
|
96
|
+
return ${n}
|
|
100
97
|
}`
|
|
98
|
+
)
|
|
101
99
|
);
|
|
102
100
|
}
|
|
103
|
-
function
|
|
104
|
-
const r =
|
|
105
|
-
return r ||
|
|
101
|
+
function z(n, t, e) {
|
|
102
|
+
const r = e ? e[t] : "";
|
|
103
|
+
return r || (typeof n == "string" ? L(n + "") : JSON.stringify(n));
|
|
106
104
|
}
|
|
107
|
-
function
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
const r =
|
|
111
|
-
let
|
|
112
|
-
return
|
|
113
|
-
if (
|
|
114
|
-
let m =
|
|
115
|
-
|
|
116
|
-
label:
|
|
105
|
+
function U(n) {
|
|
106
|
+
let t = B(n.type), e = "any";
|
|
107
|
+
t.length == 1 && (e = t[0].split("<")[0]);
|
|
108
|
+
const r = e;
|
|
109
|
+
let o = (n.selectable || "").trim(), i = [];
|
|
110
|
+
return o && e != "boolean" && (o.split(",").forEach((l) => {
|
|
111
|
+
if (l) {
|
|
112
|
+
let m = l.split(":");
|
|
113
|
+
i.push({
|
|
114
|
+
label: l,
|
|
117
115
|
prop: m[0].trim()
|
|
118
116
|
});
|
|
119
117
|
}
|
|
120
|
-
}),
|
|
121
|
-
arr:
|
|
118
|
+
}), e == "function" ? e = "function" : e == "array" ? e = "choice" : e = "select"), {
|
|
119
|
+
arr: i,
|
|
122
120
|
zdtype: r,
|
|
123
|
-
type:
|
|
124
|
-
dataType:
|
|
121
|
+
type: e,
|
|
122
|
+
dataType: t
|
|
125
123
|
};
|
|
126
124
|
}
|
|
127
|
-
function
|
|
128
|
-
let
|
|
129
|
-
return (
|
|
130
|
-
r = r.trim(), r &&
|
|
131
|
-
}), [...new Set(
|
|
125
|
+
function B(n) {
|
|
126
|
+
let t = [];
|
|
127
|
+
return (n || "").trim().toLowerCase().split(",").forEach((r) => {
|
|
128
|
+
r = r.trim(), r && t.push(r);
|
|
129
|
+
}), [...new Set(t)].sort();
|
|
132
130
|
}
|
|
133
131
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
T as getHmtl,
|
|
133
|
+
U as getSpecType
|
|
136
134
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),V=require("./retrie/index.vue.cjs"),T=require("./code.cjs"),k={key:0,class:"set-props"},x=t.defineComponent({__name:"set-props",props:{name:String,list:Array},emits:["change"],setup(
|
|
1
|
+
"use strict";const t=require("vue"),V=require("./retrie/index.vue.cjs"),T=require("./code.cjs"),k={key:0,class:"set-props"},x=t.defineComponent({__name:"set-props",props:{name:String,list:Array},emits:["change"],setup(i,{emit:p}){const c=i,u=t.ref({}),f=t.ref(0),a=t.ref({}),l=t.ref([]);function m(){var e;a.value={};const r=[];(e=c.list)==null||e.forEach(s=>{let n=s.name;if(n.includes(".")?n="":n=(n.split("/")[0]||"").trim(),n){a.value[n]=(s.default||"").trim();const{arr:y,type:v,dataType:b}=T.getSpecType(s);u.value[n]=y;let g={label:d(n,s),prop:n,type:v,dataType:b,select:n};r.push(g)}}),l.value=r}function d(r,e){let s=r+": { "+(e.type||"any")+" } "+e.description;return e.default&&(s+=" 默认值="+e.default),e.selectable&&(s+=" 可选值="+e.selectable),s}function _(r,e){let s=Object.assign({},r);p("change",s,e)}let o;function h(){clearTimeout(o),o=setTimeout(()=>{m()},400)}return t.watch(()=>c.name,()=>{l.value=[],t.nextTick(()=>{h()})},{immediate:!0}),(r,e)=>l.value&&l.value.length>0?(t.openBlock(),t.createElementBlock("div",k,[t.createVNode(V,{refresh:f.value,modelValue:a.value,selects:u.value,list:l.value,name:c.name,onQuery:_},null,8,["refresh","modelValue","selects","list","name"])])):t.createCommentVNode("",!0)}});module.exports=x;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v, ref as
|
|
1
|
+
import { defineComponent as v, ref as a, watch as T, nextTick as k, openBlock as x, createElementBlock as j, createVNode as B, createCommentVNode as C } from "vue";
|
|
2
2
|
import E from "./retrie/index.vue.js";
|
|
3
3
|
import { getSpecType as N } from "./code.js";
|
|
4
4
|
const S = {
|
|
@@ -11,48 +11,48 @@ const S = {
|
|
|
11
11
|
list: Array
|
|
12
12
|
},
|
|
13
13
|
emits: ["change"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
function
|
|
14
|
+
setup(u, { emit: m }) {
|
|
15
|
+
const r = u, c = a({}), p = a(0), o = a({}), n = a([]);
|
|
16
|
+
function f() {
|
|
17
17
|
var e;
|
|
18
18
|
o.value = {};
|
|
19
19
|
const l = [];
|
|
20
|
-
(e =
|
|
20
|
+
(e = r.list) == null || e.forEach((t) => {
|
|
21
21
|
let s = t.name;
|
|
22
22
|
if (s.includes(".") ? s = "" : s = (s.split("/")[0] || "").trim(), s) {
|
|
23
23
|
o.value[s] = (t.default || "").trim();
|
|
24
|
-
const { arr:
|
|
25
|
-
c.value[s] =
|
|
24
|
+
const { arr: y, type: b, dataType: g } = N(t);
|
|
25
|
+
c.value[s] = y;
|
|
26
26
|
let V = {
|
|
27
|
-
label:
|
|
27
|
+
label: d(s, t),
|
|
28
28
|
prop: s,
|
|
29
29
|
type: b,
|
|
30
30
|
dataType: g,
|
|
31
31
|
select: s
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
l.push(V);
|
|
34
34
|
}
|
|
35
35
|
}), n.value = l;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function d(l, e) {
|
|
38
38
|
let t = l + ": { " + (e.type || "any") + " } " + e.description;
|
|
39
39
|
return e.default && (t += " 默认值=" + e.default), e.selectable && (t += " 可选值=" + e.selectable), t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function h(l, e) {
|
|
42
42
|
let t = Object.assign({}, l);
|
|
43
|
-
|
|
43
|
+
m("change", t, e);
|
|
44
44
|
}
|
|
45
|
-
let
|
|
46
|
-
function
|
|
47
|
-
clearTimeout(
|
|
48
|
-
|
|
45
|
+
let i;
|
|
46
|
+
function _() {
|
|
47
|
+
clearTimeout(i), i = setTimeout(() => {
|
|
48
|
+
f();
|
|
49
49
|
}, 400);
|
|
50
50
|
}
|
|
51
51
|
return T(
|
|
52
|
-
() =>
|
|
52
|
+
() => r.name,
|
|
53
53
|
() => {
|
|
54
54
|
n.value = [], k(() => {
|
|
55
|
-
|
|
55
|
+
_();
|
|
56
56
|
});
|
|
57
57
|
},
|
|
58
58
|
{
|
|
@@ -60,12 +60,12 @@ const S = {
|
|
|
60
60
|
}
|
|
61
61
|
), (l, e) => n.value && n.value.length > 0 ? (x(), j("div", S, [
|
|
62
62
|
B(E, {
|
|
63
|
-
refresh:
|
|
63
|
+
refresh: p.value,
|
|
64
64
|
modelValue: o.value,
|
|
65
65
|
selects: c.value,
|
|
66
66
|
list: n.value,
|
|
67
|
-
name:
|
|
68
|
-
onQuery:
|
|
67
|
+
name: r.name,
|
|
68
|
+
onQuery: h
|
|
69
69
|
}, null, 8, ["refresh", "modelValue", "selects", "list", "name"])
|
|
70
70
|
])) : C("", !0);
|
|
71
71
|
}
|
package/dist/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
:root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{padding:20px 0}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{width:250px;position:relative;z-index:100}.__document .__document-index .index-aside .index-aside-div{height:100%;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-index .index-body{flex:1;position:relative;background-color:var(--bg-index-cor)}.__document .__document-index .index-body .index-div{padding:20px;position:absolute;top:0;right:0;left:0;bottom:0;overflow-y:auto}.__document .__document-tests{padding:10px;height:100%;position:relative}.__document .__document-tests .tests-top .but-div.on{background-color:var(--bg-aside-on-cor)}.__document .__document-develop,.__document .__document-single{padding:10px;height:100%;position:relative}.__document .__document-single .single-top .single-top-li{display:flex;flex-direction:row;align-items:center}.__document .__document-single .single-top .single-top-li .single-top-li-span{padding:5px 10px}.__document .__document-compon{padding:10px;height:100%;position:relative}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{position:absolute;top:0;bottom:0;left:0;z-index:100;display:flex;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but{cursor:pointer}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
1
|
+
:root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{padding:20px 0}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{width:250px;position:relative;z-index:100}.__document .__document-index .index-aside .index-aside-div{height:100%;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-index .index-body{flex:1;position:relative;background-color:var(--bg-index-cor)}.__document .__document-index .index-body .index-div{padding:20px;position:absolute;top:0;right:0;left:0;bottom:0;overflow-y:auto}.__document .__document-tests{padding:10px;height:100%;position:relative}.__document .__document-tests .tests-top .but-div.on{background-color:var(--bg-aside-on-cor)}.__document .__document-develop,.__document .__document-single{padding:10px;height:100%;position:relative}.__document .__document-single .single-top .single-top-li{display:flex;flex-direction:row;align-items:center}.__document .__document-single .single-top .single-top-li .single-top-li-span{padding:5px 10px}.__document .__document-compon{padding:10px;height:100%;position:relative}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{position:absolute;top:0;bottom:0;left:0;z-index:100;display:flex;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but{cursor:pointer}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.form-select .form-select-box{position:absolute;z-index:100;background-color:#fff;text-align:center}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
2
2
|
Theme: StackOverflow Light
|
|
3
3
|
Description: Light theme as used on stackoverflow.com
|
|
4
4
|
Author: stackoverflow.com
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
Updated for @stackoverflow/stacks v0.64.0
|
|
11
11
|
Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
|
|
12
12
|
Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
|
|
13
|
-
*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.form-select
|
|
13
|
+
*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.form-select{position:relative}.form-select .form-select-box{position:absolute;background-color:#fff;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #fff}.form-select .form-select-box .form-select-list-div .form-select-list-li{padding:10px;border-bottom:1px solid #eee}.form-select .form-select-box .form-select-list-div .form-select-list-li:last-child{border:0}.form-select .form-select-box .form-select-list-div .form-select-list-li.active{color:#0051ff}
|