@fangzhongya/vue-archive 0.0.3-2 → 0.0.3-21
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 +1473 -1139
- package/dist/node/index.js +1473 -1139
- package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.cjs +1 -0
- package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js +13 -0
- package/dist/node_modules/.pnpm/es-module-lexer@1.2.0/node_modules/es-module-lexer/dist/lexer.cjs +3 -0
- package/dist/node_modules/.pnpm/es-module-lexer@1.2.0/node_modules/es-module-lexer/dist/lexer.js +52 -0
- package/dist/packages/components/compo/index.vue.cjs +1 -1
- package/dist/packages/components/compo/index.vue.js +48 -42
- package/dist/packages/components/compo/top.cjs +1 -1
- package/dist/packages/components/compo/top.d.ts +1 -1
- package/dist/packages/components/compo/top.js +41 -40
- package/dist/packages/components/test/top.cjs +1 -1
- package/dist/packages/components/test/top.d.ts +1 -1
- package/dist/packages/components/test/top.js +52 -51
- package/dist/packages/components/use/code.cjs +10 -10
- package/dist/packages/components/use/code.d.ts +13 -0
- package/dist/packages/components/use/code.js +88 -59
- package/dist/packages/components/use/index.cjs +1 -1
- package/dist/packages/components/use/index.js +2 -2
- package/dist/packages/components/use/retrie/choice/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/choice/index.vue.js +1 -1
- package/dist/packages/components/use/set-props.vue.cjs +1 -1
- package/dist/packages/components/use/set-props.vue.js +46 -63
- package/dist/packages/config.cjs +1 -1
- package/dist/packages/config.js +1 -1
- package/dist/packages/page/comprops/index.vue2.cjs +1 -1
- package/dist/packages/page/comprops/index.vue2.js +50 -40
- package/dist/packages/router/file.cjs +1 -0
- package/dist/packages/router/file.d.ts +8 -0
- package/dist/packages/router/file.js +43 -0
- package/dist/packages/router/index.cjs +1 -1
- package/dist/packages/router/index.d.ts +1 -0
- package/dist/packages/router/index.js +62 -89
- package/dist/packages/utils/common.cjs +1 -1
- package/dist/packages/utils/common.js +4 -4
- package/dist/packages/utils/glob.cjs +1 -1
- package/dist/packages/utils/glob.js +6 -6
- package/dist/packages/utils/index.cjs +1 -1
- package/dist/packages/utils/index.js +1 -1
- package/package.json +7 -7
- package/dist/markdown-it.d.ts +0 -1
- package/dist/node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.cjs +0 -3
- package/dist/node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.js +0 -52
- package/dist/packages/components/md/markdown-it.d.ts +0 -1
- package/dist/packages/components/use/prettier.d.ts +0 -7
- package/dist/prettier.d.ts +0 -7
- package/dist/src/vite-env.d.ts +0 -1
- package/dist/vite-env.d.ts +0 -1
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { defineComponent as m, h as f } from "vue";
|
|
2
|
+
import { htmlEscape as v } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js";
|
|
3
|
+
function y(c, e, n) {
|
|
4
|
+
let s = [], u = [], p = [];
|
|
5
|
+
const r = (t) => n ? v(t) : t, l = () => {
|
|
5
6
|
p.length > 0 && (s.push(
|
|
6
7
|
e(
|
|
7
8
|
"div",
|
|
@@ -11,8 +12,8 @@ function f(d, e) {
|
|
|
11
12
|
p
|
|
12
13
|
)
|
|
13
14
|
), p = []);
|
|
14
|
-
},
|
|
15
|
-
s.length > 0 && (
|
|
15
|
+
}, o = () => {
|
|
16
|
+
s.length > 0 && (u.push(
|
|
16
17
|
e(
|
|
17
18
|
"div",
|
|
18
19
|
{
|
|
@@ -22,10 +23,10 @@ function f(d, e) {
|
|
|
22
23
|
)
|
|
23
24
|
), s = []);
|
|
24
25
|
};
|
|
25
|
-
return
|
|
26
|
-
const
|
|
26
|
+
return c.forEach((t) => {
|
|
27
|
+
const d = [];
|
|
27
28
|
let a = !1;
|
|
28
|
-
if (t.date && (a = !0,
|
|
29
|
+
if (t.date && (a = !0, d.push(
|
|
29
30
|
e(
|
|
30
31
|
"div",
|
|
31
32
|
{
|
|
@@ -33,14 +34,14 @@ function f(d, e) {
|
|
|
33
34
|
},
|
|
34
35
|
[
|
|
35
36
|
e("span", {}, "更新时间:"),
|
|
36
|
-
e(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
37
|
+
e("span", {}, [
|
|
38
|
+
r(
|
|
39
|
+
t.date.name + " " + t.date.description
|
|
40
|
+
)
|
|
41
|
+
])
|
|
41
42
|
]
|
|
42
43
|
)
|
|
43
|
-
)), t.author && (a = !0,
|
|
44
|
+
)), t.author && (a = !0, d.push(
|
|
44
45
|
e(
|
|
45
46
|
"div",
|
|
46
47
|
{
|
|
@@ -48,15 +49,15 @@ function f(d, e) {
|
|
|
48
49
|
},
|
|
49
50
|
[
|
|
50
51
|
e("span", {}, "作者:"),
|
|
51
|
-
e(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
)
|
|
52
|
+
e("span", {}, [
|
|
53
|
+
r(
|
|
54
|
+
t.author.name + " " + t.author.description
|
|
55
|
+
)
|
|
56
|
+
])
|
|
56
57
|
]
|
|
57
58
|
)
|
|
58
59
|
)), t.title && (t.title.type || t.title.name || t.title.description)) {
|
|
59
|
-
|
|
60
|
+
l(), a && o();
|
|
60
61
|
let i = t.title.type || "div";
|
|
61
62
|
s.push(
|
|
62
63
|
e(
|
|
@@ -65,22 +66,22 @@ function f(d, e) {
|
|
|
65
66
|
class: "test-top-title"
|
|
66
67
|
},
|
|
67
68
|
[
|
|
68
|
-
e(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
)
|
|
69
|
+
e("span", {}, [
|
|
70
|
+
r(
|
|
71
|
+
t.title.name + " " + t.title.description
|
|
72
|
+
)
|
|
73
|
+
])
|
|
73
74
|
]
|
|
74
75
|
)
|
|
75
76
|
);
|
|
76
77
|
}
|
|
77
|
-
if (a && (p.length > 0 && (
|
|
78
|
+
if (a && (p.length > 0 && (l(), o()), s.push(
|
|
78
79
|
e(
|
|
79
80
|
"div",
|
|
80
81
|
{
|
|
81
82
|
class: "test-top-info"
|
|
82
83
|
},
|
|
83
|
-
|
|
84
|
+
d
|
|
84
85
|
)
|
|
85
86
|
)), t.text) {
|
|
86
87
|
let i = t.text.type || "div";
|
|
@@ -91,11 +92,11 @@ function f(d, e) {
|
|
|
91
92
|
class: "test-top-text"
|
|
92
93
|
},
|
|
93
94
|
[
|
|
94
|
-
e(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
)
|
|
95
|
+
e("span", {}, [
|
|
96
|
+
r(
|
|
97
|
+
t.text.name + " " + t.text.description
|
|
98
|
+
)
|
|
99
|
+
])
|
|
99
100
|
]
|
|
100
101
|
)
|
|
101
102
|
);
|
|
@@ -109,11 +110,11 @@ function f(d, e) {
|
|
|
109
110
|
class: "test-top-proposal"
|
|
110
111
|
},
|
|
111
112
|
[
|
|
112
|
-
e(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
)
|
|
113
|
+
e("span", {}, [
|
|
114
|
+
r(
|
|
115
|
+
t.proposal.name + " " + t.proposal.description
|
|
116
|
+
)
|
|
117
|
+
])
|
|
117
118
|
]
|
|
118
119
|
)
|
|
119
120
|
);
|
|
@@ -127,36 +128,36 @@ function f(d, e) {
|
|
|
127
128
|
class: "test-top-error"
|
|
128
129
|
},
|
|
129
130
|
[
|
|
130
|
-
e(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
)
|
|
131
|
+
e("span", {}, [
|
|
132
|
+
r(
|
|
133
|
+
t.error.name + " " + t.error.description
|
|
134
|
+
)
|
|
135
|
+
])
|
|
135
136
|
]
|
|
136
137
|
)
|
|
137
138
|
);
|
|
138
139
|
}
|
|
139
|
-
}),
|
|
140
|
+
}), l(), o(), u;
|
|
140
141
|
}
|
|
141
|
-
const
|
|
142
|
+
const T = m({
|
|
142
143
|
/**
|
|
143
144
|
* @props {Stinrg} value 插入数据
|
|
144
145
|
*/
|
|
145
146
|
props: {
|
|
146
147
|
value: Array
|
|
147
148
|
},
|
|
148
|
-
render(
|
|
149
|
-
const
|
|
150
|
-
return
|
|
149
|
+
render(c, e, n) {
|
|
150
|
+
const s = y(n.value, f);
|
|
151
|
+
return f(
|
|
151
152
|
"div",
|
|
152
153
|
{
|
|
153
154
|
class: "test-top"
|
|
154
155
|
},
|
|
155
|
-
|
|
156
|
+
s
|
|
156
157
|
);
|
|
157
158
|
}
|
|
158
159
|
});
|
|
159
160
|
export {
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
T as default,
|
|
162
|
+
y as getTestTopDom
|
|
162
163
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
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-20/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),d=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs"),j=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/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
|
-
<${
|
|
5
|
-
`)}>${
|
|
4
|
+
<${n}${o.join(`
|
|
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
|
|
15
|
-
${
|
|
16
|
-
</template>`;t.push(
|
|
17
|
-
${
|
|
18
|
-
}`;return`function${
|
|
14
|
+
`}function O(n={}){const t=[];return Object.keys(n).forEach(e=>{const r=n[e];if(r){const o=` <template #${e}="scope">
|
|
15
|
+
${h.vueFormat(r," ")}
|
|
16
|
+
</template>`;t.push(o)}}),t&&t.length>0&&t.unshift(""),t}function J(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 E(n){const t=n.trim();return/^\(/.test(t)?y(t):JSON.stringify(n)}function S(n,t,e){const r=e?e[t]:"";return r||(typeof n=="string"?E(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(l=>{if(l){let g=l.split(":");i.push({label:l,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;exports.setValStringify=S;
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
import type { ObjStr, ObjUnk } from '../../config';
|
|
2
|
+
import type { Spec } from '../../utils/index';
|
|
2
3
|
export declare function getHmtl(propsname: string, value: ObjUnk, slotValue?: ObjStr, propsText?: ObjStr): string;
|
|
4
|
+
export declare function setValStringify(v: unknown, key: string, propsText?: ObjStr): string;
|
|
5
|
+
type SelectsObj = {
|
|
6
|
+
label: string;
|
|
7
|
+
prop: unknown;
|
|
8
|
+
};
|
|
9
|
+
export declare function getSpecType(val: Spec): {
|
|
10
|
+
arr: SelectsObj[];
|
|
11
|
+
zdtype: string;
|
|
12
|
+
type: string;
|
|
13
|
+
dataType: string[];
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -1,99 +1,128 @@
|
|
|
1
|
-
import { humpToLine as
|
|
2
|
-
import { firstUpper as
|
|
3
|
-
import { firstLower as
|
|
4
|
-
import { vueFormat as
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
let
|
|
1
|
+
import { humpToLine as b } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
|
|
2
|
+
import { firstUpper as g } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js";
|
|
3
|
+
import { firstLower as S } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
|
|
4
|
+
import { vueFormat as d, getFunctionFormat as j, prettierFormat as F, getFunBody as E } from "./util.js";
|
|
5
|
+
function T(n, t, e, r) {
|
|
6
|
+
const o = [], i = [];
|
|
7
|
+
let u = !0;
|
|
8
8
|
Object.keys(t).forEach((s) => {
|
|
9
9
|
let c = t[s];
|
|
10
10
|
if (/^on[A-Z]/.test(s) && typeof c == "function") {
|
|
11
11
|
let f = s.substring(2);
|
|
12
|
-
const
|
|
13
|
-
let
|
|
14
|
-
if (
|
|
15
|
-
let
|
|
16
|
-
|
|
12
|
+
const p = s.split(":");
|
|
13
|
+
let l;
|
|
14
|
+
if (p.length > 1 ? (l = p[0] + p.slice(1).map((a) => g(a)).join(""), f = S(f)) : (l = p[0], f = b(f)), p.includes("-")) {
|
|
15
|
+
let a = l.split("-");
|
|
16
|
+
a = a.map((h, y) => y != 0 ? g(h) : h), l = a.join("");
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
" @" + f + '="' +
|
|
20
|
-
),
|
|
21
|
-
" console.log('" +
|
|
22
|
-
),
|
|
23
|
-
} else if (
|
|
18
|
+
o.push(
|
|
19
|
+
" @" + f + '="' + l + '"'
|
|
20
|
+
), i.push("function " + l + "(...arr) {"), i.push(
|
|
21
|
+
" console.log('" + l + "', arr)"
|
|
22
|
+
), i.push("}");
|
|
23
|
+
} else if (o.push(
|
|
24
24
|
" :" + s + '="' + s + '"'
|
|
25
25
|
), typeof c == "function")
|
|
26
|
-
|
|
27
|
-
"const " + s + " = " +
|
|
26
|
+
i.push(
|
|
27
|
+
"const " + s + " = " + w(
|
|
28
28
|
c,
|
|
29
29
|
s,
|
|
30
|
-
|
|
30
|
+
r
|
|
31
31
|
)
|
|
32
32
|
);
|
|
33
|
-
else if (
|
|
33
|
+
else if (u && (u = !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
|
-
|
|
43
|
+
i.push(
|
|
44
44
|
"const " + s + " = ref(" + f + ");"
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
48
|
-
const
|
|
49
|
-
return `<!--${
|
|
47
|
+
}), o.length > 0 && o.unshift("");
|
|
48
|
+
const m = O(e);
|
|
49
|
+
return `<!--${n}-->
|
|
50
50
|
<template>
|
|
51
51
|
<div>
|
|
52
|
-
<${
|
|
53
|
-
`)}>${
|
|
52
|
+
<${n}${o.join(`
|
|
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 O(
|
|
64
|
+
function O(n = {}) {
|
|
65
65
|
const t = [];
|
|
66
|
-
return Object.keys(
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
${
|
|
66
|
+
return Object.keys(n).forEach((e) => {
|
|
67
|
+
const r = n[e];
|
|
68
|
+
if (r) {
|
|
69
|
+
const o = ` <template #${e}="scope">
|
|
70
|
+
${d(r, " ")}
|
|
71
71
|
</template>`;
|
|
72
|
-
t.push(
|
|
72
|
+
t.push(o);
|
|
73
73
|
}
|
|
74
74
|
}), t && t.length > 0 && t.unshift(""), t;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
let o = `{
|
|
86
|
-
${g(S(e.body), " ")}
|
|
76
|
+
function w(n, t, e) {
|
|
77
|
+
const r = e ? e[t] : "";
|
|
78
|
+
return r ? "function " + r : $(n.toString());
|
|
79
|
+
}
|
|
80
|
+
function $(n) {
|
|
81
|
+
const t = j(F(n));
|
|
82
|
+
if (t) {
|
|
83
|
+
let e = `{
|
|
84
|
+
${d(E(t.body), " ")}
|
|
87
85
|
}`;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
return `function ${t.param} ${e}`;
|
|
87
|
+
} else
|
|
88
|
+
return "undefined";
|
|
89
|
+
}
|
|
90
|
+
function L(n) {
|
|
91
|
+
const t = n.trim();
|
|
92
|
+
return /^\(/.test(t) ? $(t) : JSON.stringify(n);
|
|
93
|
+
}
|
|
94
|
+
function z(n, t, e) {
|
|
95
|
+
const r = e ? e[t] : "";
|
|
96
|
+
return r || (typeof n == "string" ? L(n + "") : JSON.stringify(n));
|
|
97
|
+
}
|
|
98
|
+
function U(n) {
|
|
99
|
+
let t = B(n.type), e = "any";
|
|
100
|
+
t.length == 1 && (e = t[0].split("<")[0]);
|
|
101
|
+
const r = e;
|
|
102
|
+
let o = (n.selectable || "").trim(), i = [];
|
|
103
|
+
return o && e != "boolean" && (o.split(",").forEach((u) => {
|
|
104
|
+
if (u) {
|
|
105
|
+
let m = u.split(":");
|
|
106
|
+
i.push({
|
|
107
|
+
label: u,
|
|
108
|
+
prop: m[0].trim()
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}), e == "function" ? e = "function" : e == "array" ? e = "choice" : e = "select"), {
|
|
112
|
+
arr: i,
|
|
113
|
+
zdtype: r,
|
|
114
|
+
type: e,
|
|
115
|
+
dataType: t
|
|
116
|
+
};
|
|
92
117
|
}
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
return n ||
|
|
118
|
+
function B(n) {
|
|
119
|
+
let t = [];
|
|
120
|
+
return (n || "").trim().toLowerCase().split(",").forEach((r) => {
|
|
121
|
+
r = r.trim(), r && t.push(r);
|
|
122
|
+
}), [...new Set(t)].sort();
|
|
96
123
|
}
|
|
97
124
|
export {
|
|
98
|
-
|
|
125
|
+
T as getHmtl,
|
|
126
|
+
U as getSpecType,
|
|
127
|
+
z as setValStringify
|
|
99
128
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
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.7-20/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;
|
|
@@ -5,7 +5,7 @@ import E from "./set-code.vue.js";
|
|
|
5
5
|
import O from "./set-expose.vue.js";
|
|
6
6
|
import $ from "./set-slot.vue.js";
|
|
7
7
|
import { getPropsValue as D, getEmitsValue as w, getExposeValue as U, getSlotValue as k } from "../../utils/props.js";
|
|
8
|
-
import { firstUpper as h } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
8
|
+
import { firstUpper as h } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js";
|
|
9
9
|
const K = g({
|
|
10
10
|
/**
|
|
11
11
|
* @props {Stinrg} value 插入数据
|
|
@@ -26,7 +26,7 @@ const K = g({
|
|
|
26
26
|
}), o = f.value;
|
|
27
27
|
let i = "div";
|
|
28
28
|
o.component ? i = j(o.component) : o.name && (i = T(o.name));
|
|
29
|
-
const p = f.param, d = D(p.
|
|
29
|
+
const p = f.param, d = D(p.props), c = w(p.emits), x = U(p.expose), V = k(p.slot), l = {}, v = {};
|
|
30
30
|
d.forEach((s) => {
|
|
31
31
|
let e = s.name;
|
|
32
32
|
if (!e.includes(".")) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),S=require("../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";const e=require("vue"),S=require("../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.cjs"),v=require("../../util.cjs"),C={class:"form-select"},x=["value","disabled","onClick","onBlur"],A=["onMousemove","onMouseout"],j={class:"form-select-list"},O={key:0,class:"form-select-list-div"},T=["onClick"],q={key:1,class:"no-data"},L=e.defineComponent({__name:"index",props:{modelValue:{type:null},dataType:{type:[String,Array]},disabled:Boolean,list:{type:Array},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","change"],setup(h,{emit:g}){const l=h,u=e.ref(),a=e.ref(!1),c=e.ref(!1),r=e.ref([]),y=e.computed(()=>r.value.map(t=>d(t)).join(",")),p=e.computed(()=>{let t=l.dataType||"";return(v.getSonType(t)||[])[1]});e.watch(()=>l.modelValue,()=>{b()},{immediate:!0});function _(t=[]){return p.value=="string"?t.map(n=>v.getString(n)):p.value=="number"?t.map(n=>{let o=Number(n);return isNaN(o)&&(o=0),o}):t}function k(t){return new Function("",`{
|
|
2
2
|
var a = ${t};
|
|
3
3
|
return a;
|
|
4
4
|
}`)}function b(){r.value=[];let t=l.modelValue,n=[];const o=k(t);if(o instanceof Array&&(n=o),l.list)for(let i=0;i<l.list.length;i++){const f=l.list[i];n.includes(s(f))&&r.value.push(f)}m()}function d(t){var o;let n=(o=l.config)==null?void 0:o.label;return n&&typeof t=="object"&&t?t[n]:t}function s(t){var o;let n=(o=l.config)==null?void 0:o.prop;return n&&typeof t=="object"&&t?t[n]:t}function B(t){return r.value.map(n=>s(n)).includes(s(t))}function w(){l.disabled||(a.value=!0)}function M(){c.value||(a.value=!1)}function V(){c.value=!0}function E(){c.value=!1}function N(t){u.value&&u.value.focus(),r.value=S.toggleArray(r.value,t,l.config.prop),m()}function m(){let t=_(r.value.map(n=>s(n)));g("value",t,JSON.stringify(t))}return(t,n)=>(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("input",{value:e.unref(y),readonly:"",placeholder:"请选择",type:"text",disabled:l.disabled,ref_key:"refInput",ref:u,onClick:e.withModifiers(w,["stop"]),onBlur:e.withModifiers(M,["stop"])},null,40,x),e.createElementVNode("div",{onMousemove:e.withModifiers(V,["stop"]),onMouseout:e.withModifiers(E,["stop"]),class:"form-select-box"},[e.withDirectives(e.createElementVNode("div",j,[l.list&&l.list.length>0?(e.openBlock(),e.createElementBlock("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.list,(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-select-list-li",{active:B(o)}]),onClick:e.withModifiers(f=>N(o),["stop"])},[e.createElementVNode("span",null,e.toDisplayString(d(o)),1)],10,T))),256))])):(e.openBlock(),e.createElementBlock("div",q," 暂无数据 "))],512),[[e.vShow,a.value]])],40,A)]))}});module.exports=L;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as T, ref as c, computed as h, watch as L, openBlock as s, createElementBlock as i, createElementVNode as f, unref as z, withModifiers as u, withDirectives as D, Fragment as E, renderList as F, normalizeClass as I, toDisplayString as O, vShow as $ } from "vue";
|
|
2
|
-
import { toggleArray as J } from "../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
2
|
+
import { toggleArray as J } from "../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js";
|
|
3
3
|
import { getSonType as P, getString as q } from "../../util.js";
|
|
4
4
|
const G = { class: "form-select" }, H = ["value", "disabled", "onClick", "onBlur"], K = ["onMousemove", "onMouseout"], Q = { class: "form-select-list" }, R = {
|
|
5
5
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
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;
|