@fangzhongya/vue-archive 0.0.77 → 0.0.78
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/packages/components/use/retrie/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/index.vue.js +12 -12
- package/dist/packages/components/use/retrie/input/codemirror/codemirror.d.ts +41 -0
- package/dist/packages/components/use/set-props.d.ts +1 -1
- package/dist/packages/components/use/set-props.vue.cjs +1 -1
- package/dist/packages/components/use/set-props.vue.js +21 -24
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),m=require("./any/index.vue.cjs"),y=require("./form/index.vue.cjs"),_={class:"com-retrie"},k={key:0,class:"com-retrie-label"},f=e.defineComponent({__name:"index",props:{name:String,selects:{type:Object,default(){return{}}},list:{type:Array,default(){return[]}},refresh:{type:Number,default:0},modelValue:{type:null,default(){return{}}},queryName:{type:String,default:"执行"},defaultQuery:{type:Boolean}},emits:["query"],setup(c,{emit:i}){const l=c,p=i,n=e.ref({}),o=e.ref({});function u(r,s,t){n.value[r]=s,o.value[r]=t}function a(){p("query",n.value,o.value)}return e.watch(()=>l.modelValue,()=>{n.value={},o.value={},e.nextTick(()=>{a()})},{immediate:!0}),(r,s)=>(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.list,(t,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"com-retrie-li"},[t.label?(e.openBlock(),e.createElementBlock("label",k,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),!t.type||t.type=="any"?(e.openBlock(),e.createBlock(m,{key:1,config:t,selects:l.selects,modelValue:l.modelValue[t.prop],onChange:u},null,8,["config","selects","modelValue"])):(e.openBlock(),e.createBlock(y,{key:2,config:t,selects:l.selects,modelValue:l.modelValue[t.prop],onChange:u},null,8,["config","selects","modelValue"]))]))),128))
|
|
1
|
+
"use strict";const e=require("vue"),m=require("./any/index.vue.cjs"),y=require("./form/index.vue.cjs"),_={class:"com-retrie"},k={key:0,class:"com-retrie-label"},f=e.defineComponent({__name:"index",props:{name:String,selects:{type:Object,default(){return{}}},list:{type:Array,default(){return[]}},refresh:{type:Number,default:0},modelValue:{type:null,default(){return{}}},queryName:{type:String,default:"执行"},defaultQuery:{type:Boolean}},emits:["query"],setup(c,{emit:i}){const l=c,p=i,n=e.ref({}),o=e.ref({});function u(r,s,t){n.value[r]=s,o.value[r]=t}function a(){p("query",n.value,o.value)}return e.watch(()=>l.modelValue,()=>{n.value={},o.value={},e.nextTick(()=>{a()})},{immediate:!0}),(r,s)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",{class:"but-div com-retrie-but",onClick:e.withModifiers(a,["stop"])},[e.createElementVNode("span",null,e.toDisplayString(c.queryName),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.list,(t,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"com-retrie-li"},[t.label?(e.openBlock(),e.createElementBlock("label",k,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),!t.type||t.type=="any"?(e.openBlock(),e.createBlock(m,{key:1,config:t,selects:l.selects,modelValue:l.modelValue[t.prop],onChange:u},null,8,["config","selects","modelValue"])):(e.openBlock(),e.createBlock(y,{key:2,config:t,selects:l.selects,modelValue:l.modelValue[t.prop],onChange:u},null,8,["config","selects","modelValue"]))]))),128))]))}});module.exports=f;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as k, ref as m, watch as V, nextTick as g, createElementBlock as r, openBlock as l, createElementVNode as d,
|
|
1
|
+
import { defineComponent as k, ref as m, watch as V, nextTick as g, createElementBlock as r, openBlock as l, createElementVNode as d, withModifiers as b, toDisplayString as f, Fragment as h, renderList as x, createCommentVNode as C, createBlock as p } from "vue";
|
|
2
2
|
import N from "./any/index.vue.js";
|
|
3
3
|
import q from "./form/index.vue.js";
|
|
4
4
|
const B = { class: "com-retrie" }, S = {
|
|
@@ -70,31 +70,31 @@ const B = { class: "com-retrie" }, S = {
|
|
|
70
70
|
immediate: !0
|
|
71
71
|
}
|
|
72
72
|
), (n, i) => (l(), r("div", B, [
|
|
73
|
-
(
|
|
73
|
+
d("div", {
|
|
74
|
+
class: "but-div com-retrie-but",
|
|
75
|
+
onClick: b(s, ["stop"])
|
|
76
|
+
}, [
|
|
77
|
+
d("span", null, f(u.queryName), 1)
|
|
78
|
+
]),
|
|
79
|
+
(l(!0), r(h, null, x(t.list, (e, _) => (l(), r("div", {
|
|
74
80
|
key: _,
|
|
75
81
|
class: "com-retrie-li"
|
|
76
82
|
}, [
|
|
77
|
-
e.label ? (l(), r("label", S,
|
|
78
|
-
!e.type || e.type == "any" ? (l(),
|
|
83
|
+
e.label ? (l(), r("label", S, f(e.label), 1)) : C("", !0),
|
|
84
|
+
!e.type || e.type == "any" ? (l(), p(N, {
|
|
79
85
|
key: 1,
|
|
80
86
|
config: e,
|
|
81
87
|
selects: t.selects,
|
|
82
88
|
modelValue: t.modelValue[e.prop],
|
|
83
89
|
onChange: c
|
|
84
|
-
}, null, 8, ["config", "selects", "modelValue"])) : (l(),
|
|
90
|
+
}, null, 8, ["config", "selects", "modelValue"])) : (l(), p(q, {
|
|
85
91
|
key: 2,
|
|
86
92
|
config: e,
|
|
87
93
|
selects: t.selects,
|
|
88
94
|
modelValue: t.modelValue[e.prop],
|
|
89
95
|
onChange: c
|
|
90
96
|
}, null, 8, ["config", "selects", "modelValue"]))
|
|
91
|
-
]))), 128))
|
|
92
|
-
d("div", {
|
|
93
|
-
class: "but-div com-retrie-but",
|
|
94
|
-
onClick: C(s, ["stop"])
|
|
95
|
-
}, [
|
|
96
|
-
d("span", null, p(u.queryName), 1)
|
|
97
|
-
])
|
|
97
|
+
]))), 128))
|
|
98
98
|
]));
|
|
99
99
|
}
|
|
100
100
|
});
|
|
@@ -16,3 +16,44 @@ export declare function getHtml(parent: Element, obj: CreateStateOptions): Edito
|
|
|
16
16
|
export declare function getJson(parent: Element, obj: CreateStateOptions): EditorView;
|
|
17
17
|
export declare function getCss(parent: Element, obj: CreateStateOptions): EditorView;
|
|
18
18
|
export {};
|
|
19
|
+
>): Promise<T[]>;
|
|
20
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
21
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
25
|
+
"update:modelValue": (...args: any[]) => void;
|
|
26
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
format: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
};
|
|
34
|
+
options: {
|
|
35
|
+
type: {
|
|
36
|
+
(arrayLength: number): string[];
|
|
37
|
+
(...items: string[]): string[];
|
|
38
|
+
new (arrayLength: number): string[];
|
|
39
|
+
new (...items: string[]): string[];
|
|
40
|
+
isArray(arg: any): arg is any[];
|
|
41
|
+
readonly prototype: any[];
|
|
42
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
43
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
44
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
45
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
46
|
+
of<T>(...items: T[]): T[];
|
|
47
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
48
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
49
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}>> & Readonly<{
|
|
53
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
54
|
+
}>, {
|
|
55
|
+
modelValue: string;
|
|
56
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
57
|
+
refText: HTMLDivElement;
|
|
58
|
+
}, HTMLDivElement>;
|
|
59
|
+
export default _default;
|
|
@@ -40,5 +40,5 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
40
40
|
};
|
|
41
41
|
}>> & Readonly<{
|
|
42
42
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
43
|
-
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {},
|
|
43
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
44
44
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("vue"),T=require("./retrie/index.vue.cjs");;/* empty css */const o=require("./code.cjs"),
|
|
1
|
+
"use strict";const s=require("vue"),T=require("./retrie/index.vue.cjs");;/* empty css */const o=require("./code.cjs"),x={class:"set-props"},j=s.defineComponent({__name:"set-props",props:{name:String,list:Array},emits:["change"],setup(i,{emit:p}){const r=i,f=p,a=s.ref({}),m=s.ref(0),l=s.ref({}),c=s.ref([]);function _(){l.value={};const n=[];r.list?.forEach(t=>{let e=t.name;if(!e.includes(".")&&(e=(e.split("/")[0]||"").trim(),e)){const b=o.getDefaultValue(t,!1);l.value[e]=b;const{arr:g,type:v,dataType:V}=o.getSpecType(t);a.value[e]=g;let q={label:d(e,t),prop:e,type:v,dataType:V,select:e};n.push(q)}}),c.value=n}function d(n,t){let e=n+": { "+(t.type||"any")+" } "+t.description;return t.default&&(e+=" 默认值="+t.default),t.selectable&&(e+=" 可选值="+t.selectable),e}function h(n,t){let e=Object.assign({},n);f("change",e,t)}let u;function y(){clearTimeout(u),u=setTimeout(()=>{_()},400)}return s.watch(()=>r.name,()=>{c.value=[],y()},{immediate:!0}),(n,t)=>(s.openBlock(),s.createElementBlock("div",x,[s.createVNode(T,{refresh:m.value,modelValue:l.value,selects:a.value,list:c.value,name:r.name,onQuery:h},null,8,["refresh","modelValue","selects","list","name"])]))}});module.exports=j;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { defineComponent as T, ref as
|
|
1
|
+
import { defineComponent as T, ref as l, watch as j, createElementBlock as k, openBlock as x, createVNode as B } from "vue";
|
|
2
2
|
import E from "./retrie/index.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { getDefaultValue as
|
|
5
|
-
const
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "set-props"
|
|
8
|
-
}, R = /* @__PURE__ */ T({
|
|
4
|
+
import { getDefaultValue as S, getSpecType as w } from "./code.js";
|
|
5
|
+
const A = { class: "set-props" }, Q = /* @__PURE__ */ T({
|
|
9
6
|
__name: "set-props",
|
|
10
7
|
props: {
|
|
11
8
|
name: String,
|
|
@@ -13,17 +10,17 @@ const w = {
|
|
|
13
10
|
},
|
|
14
11
|
emits: ["change"],
|
|
15
12
|
setup(i, { emit: u }) {
|
|
16
|
-
const
|
|
13
|
+
const n = i, m = u, r = l({}), p = l(0), a = l({}), o = l([]);
|
|
17
14
|
function f() {
|
|
18
|
-
|
|
15
|
+
a.value = {};
|
|
19
16
|
const s = [];
|
|
20
|
-
|
|
17
|
+
n.list?.forEach((t) => {
|
|
21
18
|
let e = t.name;
|
|
22
19
|
if (!e.includes(".") && (e = (e.split("/")[0] || "").trim(), e)) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
const { arr:
|
|
26
|
-
r.value[e] =
|
|
20
|
+
const b = S(t, !1);
|
|
21
|
+
a.value[e] = b;
|
|
22
|
+
const { arr: y, type: g, dataType: V } = w(t);
|
|
23
|
+
r.value[e] = y;
|
|
27
24
|
let v = {
|
|
28
25
|
label: d(e, t),
|
|
29
26
|
prop: e,
|
|
@@ -33,7 +30,7 @@ const w = {
|
|
|
33
30
|
};
|
|
34
31
|
s.push(v);
|
|
35
32
|
}
|
|
36
|
-
}),
|
|
33
|
+
}), o.value = s;
|
|
37
34
|
}
|
|
38
35
|
function d(s, t) {
|
|
39
36
|
let e = s + ": { " + (t.type || "any") + " } " + t.description;
|
|
@@ -49,26 +46,26 @@ const w = {
|
|
|
49
46
|
f();
|
|
50
47
|
}, 400);
|
|
51
48
|
}
|
|
52
|
-
return
|
|
53
|
-
() =>
|
|
49
|
+
return j(
|
|
50
|
+
() => n.name,
|
|
54
51
|
() => {
|
|
55
|
-
|
|
52
|
+
o.value = [], _();
|
|
56
53
|
},
|
|
57
54
|
{
|
|
58
55
|
immediate: !0
|
|
59
56
|
}
|
|
60
|
-
), (s, t) =>
|
|
61
|
-
|
|
57
|
+
), (s, t) => (x(), k("div", A, [
|
|
58
|
+
B(E, {
|
|
62
59
|
refresh: p.value,
|
|
63
|
-
modelValue:
|
|
60
|
+
modelValue: a.value,
|
|
64
61
|
selects: r.value,
|
|
65
|
-
list:
|
|
66
|
-
name:
|
|
62
|
+
list: o.value,
|
|
63
|
+
name: n.name,
|
|
67
64
|
onQuery: h
|
|
68
65
|
}, null, 8, ["refresh", "modelValue", "selects", "list", "name"])
|
|
69
|
-
]))
|
|
66
|
+
]));
|
|
70
67
|
}
|
|
71
68
|
});
|
|
72
69
|
export {
|
|
73
|
-
|
|
70
|
+
Q as default
|
|
74
71
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fangzhongya/vue-archive",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.78",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "vue 组件注释生成文档",
|
|
7
7
|
"author": "fangzhongya ",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tsup": "^8.5.0",
|
|
31
31
|
"typescript": "^5.9.2",
|
|
32
32
|
"unplugin-vue-components": "^29.0.0",
|
|
33
|
-
"vite": "^7.1.
|
|
33
|
+
"vite": "^7.1.3",
|
|
34
34
|
"vite-plugin-dts": "4.5.4",
|
|
35
35
|
"vitest": "^3.2.4",
|
|
36
36
|
"vue-router": "^4.5.1",
|