dynamicformdjx 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -12
- package/dist/elementPlus/index.cjs +1 -1
- package/dist/elementPlus/index.mjs +1 -1
- package/dist/hooks/useDyForm.d.ts +4 -1
- package/dist/index-CA3F2Lxo.cjs +1 -0
- package/dist/index-MF72-iEr.js +34 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.mjs +63 -60
- package/dist/naiveUi/NaiDynamicForm.d.ts +6 -5
- package/dist/naiveUi/index.cjs +1 -1
- package/dist/naiveUi/index.mjs +298 -288
- package/dist/types/form.d.ts +1 -1
- package/dist/types/index.d.ts +7 -0
- package/dist/utils/tools.d.ts +3 -1
- package/package.json +4 -1
- package/dist/index-BWQjnQQF.cjs +0 -1
- package/dist/index-BqKRE4oH.js +0 -29
package/README.md
CHANGED
|
@@ -53,13 +53,16 @@ pnpm add dynamicformdjx
|
|
|
53
53
|
import {ref} from "vue";
|
|
54
54
|
import {NButton} from "naive-ui";
|
|
55
55
|
import {useDyForm, useReactiveForm} from "dynamicformdjx";
|
|
56
|
-
import {type naiDynamicFormRef, NaiDynamicForm, renderInput} from "dynamicformdjx/naiveUi";
|
|
56
|
+
import {type naiDynamicFormRef, NaiDynamicForm, renderInput, renderRadioGroup} from "dynamicformdjx/naiveUi";
|
|
57
|
+
import type {PresetType} from "dynamicformdjx/types/index";
|
|
57
58
|
|
|
58
59
|
type FormRow = {
|
|
59
60
|
username: string
|
|
60
61
|
password: string
|
|
62
|
+
preset: PresetType
|
|
61
63
|
}
|
|
62
64
|
const naiDynamicFormRef = ref<naiDynamicFormRef | null>(null)
|
|
65
|
+
const presetType = ref<PresetType>('fullRow')
|
|
63
66
|
const formItems = useReactiveForm<FormRow>([
|
|
64
67
|
{
|
|
65
68
|
key: "username",
|
|
@@ -69,6 +72,7 @@ pnpm add dynamicformdjx
|
|
|
69
72
|
placeholder: '请输入姓名',
|
|
70
73
|
required: true, // 是否必填 (简化rules规则)
|
|
71
74
|
render2: f => renderInput(f.value, {}, f),
|
|
75
|
+
span: 6
|
|
72
76
|
},
|
|
73
77
|
{
|
|
74
78
|
key: "password",
|
|
@@ -79,7 +83,22 @@ pnpm add dynamicformdjx
|
|
|
79
83
|
required: true,
|
|
80
84
|
placeholder: '请输入密码',
|
|
81
85
|
render2: f => renderInput(f.value, {showPasswordOn: 'click'}, f),
|
|
82
|
-
|
|
86
|
+
span: 6,
|
|
87
|
+
requiredHint:l=>`${l} is not empty`
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
key: "preset",
|
|
91
|
+
label: "表格预设",
|
|
92
|
+
value: ref<PresetType | null>(presetType.value),
|
|
93
|
+
render2: f => renderRadioGroup(f.value, [
|
|
94
|
+
{label: '整行', value: 'fullRow'},
|
|
95
|
+
{label: '表格', value: 'grid'},
|
|
96
|
+
], {name: 'preset'}, f),
|
|
97
|
+
onChange: (v) => {
|
|
98
|
+
console.log(v)
|
|
99
|
+
presetType.value = v
|
|
100
|
+
}
|
|
101
|
+
},
|
|
83
102
|
])
|
|
84
103
|
const useForm = useDyForm<FormRow>(formItems)
|
|
85
104
|
const getData = () => {
|
|
@@ -89,7 +108,7 @@ pnpm add dynamicformdjx
|
|
|
89
108
|
}
|
|
90
109
|
const resetData = () => {
|
|
91
110
|
// useForm.onReset() // 或
|
|
92
|
-
naiDynamicFormRef.value?.reset()
|
|
111
|
+
naiDynamicFormRef.value?.reset?.()
|
|
93
112
|
}
|
|
94
113
|
const setData = () => {
|
|
95
114
|
// 隐藏username
|
|
@@ -113,16 +132,26 @@ pnpm add dynamicformdjx
|
|
|
113
132
|
</script>
|
|
114
133
|
|
|
115
134
|
<template>
|
|
116
|
-
<NaiDynamicForm :items="formItems" ref="naiDynamicFormRef"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
135
|
+
<NaiDynamicForm :items="formItems" ref="naiDynamicFormRef" :preset="presetType">
|
|
136
|
+
<template #header>
|
|
137
|
+
<h3>基本表单</h3>
|
|
138
|
+
</template>
|
|
139
|
+
<template #footer>
|
|
140
|
+
<div class="control">
|
|
141
|
+
<n-button @click="getData" type="success" size="small">get Data</n-button>
|
|
142
|
+
<n-button @click="setData" type="warning" size="small">set Data</n-button>
|
|
143
|
+
<n-button @click="validatorData" type="default" size="small">validate Data</n-button>
|
|
144
|
+
<n-button @click="resetData" type="error" size="small">reset Data</n-button>
|
|
145
|
+
</div>
|
|
146
|
+
</template>
|
|
147
|
+
</NaiDynamicForm>
|
|
123
148
|
</template>
|
|
124
149
|
|
|
125
150
|
<style scoped>
|
|
151
|
+
h3{
|
|
152
|
+
text-align: center;
|
|
153
|
+
margin:0 0 10px 0;
|
|
154
|
+
}
|
|
126
155
|
.control {
|
|
127
156
|
display: flex;
|
|
128
157
|
gap: 5px;
|
|
@@ -266,7 +295,7 @@ const validatorData = () => {
|
|
|
266
295
|
> (可省略render2函数)
|
|
267
296
|
```vue
|
|
268
297
|
<script setup lang="ts">
|
|
269
|
-
import {
|
|
298
|
+
import { ref} from "vue";
|
|
270
299
|
import {NButton} from "naive-ui";
|
|
271
300
|
import {useDyForm} from "dynamicformdjx";
|
|
272
301
|
import {
|
|
@@ -318,7 +347,7 @@ const getData = () => {
|
|
|
318
347
|
console.log(res)
|
|
319
348
|
}
|
|
320
349
|
const resetData = () => {
|
|
321
|
-
naiDynamicFormRef.value?.reset()
|
|
350
|
+
naiDynamicFormRef.value?.reset?.()
|
|
322
351
|
}
|
|
323
352
|
const setData = () => {
|
|
324
353
|
useForm.setValues({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("../index-CA3F2Lxo.cjs"),u=require("element-plus"),k=e.defineComponent({name:"EleDynamicInput",props:{size:{type:String},isController:{type:Boolean},dyCls:{type:String},randomFun:{type:Function,default:t=>`${Date.now()}_${t??0}`},btnConfigs:{type:Object},configs:{type:Object},dyListConfigs:{type:Object},modelValue:{type:Object,required:!0}},emits:{"update:modelValue":t=>!0,onReset:()=>!0,onMerge:(t,s)=>!0},setup(t,{emit:s,expose:C}){const N={resetTxt:"重置",newTxt:"添加项",mergeTxt:"合并",...t.btnConfigs},i={hideReset:!1,maxHeight:"300px",autoScroll:!0,allowFilter:!0,...t.configs},c={arraySplitSymbol:",",...t.dyListConfigs},m=t.size,o=e.ref(f.tranArr(t.modelValue,t.randomFun,c.arraySplitSymbol)),V=e.ref(null);return e.watch(o,l=>{if(!t.isController)return;const v=f.resetObj(l,c.arraySplitSymbol);s("update:modelValue",v),s("onMerge",v,e.toRaw(o.value))},{deep:!0}),C({onSet:l=>{o.value=f.tranArr(l??t.modelValue,t.randomFun,c.arraySplitSymbol)},getResult:(l="res")=>l==="ori"?e.toRaw(o.value):f.resetObj(o.value,c.arraySplitSymbol)}),()=>e.createVNode("div",{class:t.dyCls??`dynamicForm ${m}`,style:{maxHeight:i.maxHeight}},[e.createVNode("div",{class:"dyFormList",ref:V},[o.value.map((l,v,n)=>e.createVNode("div",{class:"dItem",key:l.rId},[e.createVNode("div",{class:"input"},[e.createVNode(u.ElInput,{size:m,modelValue:l.key,class:"key",onInput:r=>{l.key=r}},null),e.createTextVNode(":"),e.createVNode(u.ElInput,{size:m,modelValue:l.value,class:"value",onInput:r=>{i.allowFilter&&l.isNumber?l.value=f.formatNumberInput(r,l.isArray,c.arraySplitSymbol):l.value=r}},{prefix:()=>e.createVNode(e.Fragment,null,[e.createVNode(u.ElButton,{class:"typeBtn",type:l.isArray?"success":"default",size:"small",onClick:()=>{l.isArray=!l.isArray}},{default:()=>[e.createTextVNode("Array")]}),e.createTextVNode(" "),e.createVNode(u.ElButton,{class:"typeBtn",type:l.isNumber?"success":"default",size:"small",onClick:()=>{l.isNumber=!l.isNumber}},{default:()=>[e.createTextVNode("Number")]})])})]),e.createVNode("div",{class:"btn"},[e.createVNode(u.ElButton,{type:"success",size:m,disabled:v!==n.length-1,onClick:()=>{o.value.push({rId:t.randomFun(),key:"",value:""}),i.autoScroll&&e.nextTick(()=>{const r=V.value;r?.scrollTo({top:r.scrollHeight,behavior:"smooth"})})}},{default:()=>[e.createTextVNode("+")]}),e.createVNode(u.ElButton,{size:m,type:"danger",onClick:()=>{o.value=o.value.filter(r=>r.rId!==l.rId)}},{default:()=>[e.createTextVNode("-")]})])]))]),e.createVNode("div",{class:"control"},[!o.value.length&&e.createVNode(u.ElButton,{size:m,type:"success",onClick:()=>{o.value.push({rId:t.randomFun(),key:"",value:""})}},{default:()=>[N.newTxt]}),!t.isController&&e.createVNode(e.Fragment,null,[!i.hideReset&&e.createVNode(u.ElButton,{size:m,type:"default",onClick:()=>{o.value=f.tranArr(t.modelValue,t.randomFun,c.arraySplitSymbol),s("onReset")}},{default:()=>[N.resetTxt]}),e.createVNode(u.ElButton,{size:m,type:"info",onClick:()=>{o.value.sort((v,n)=>+v.rId-+n.rId);const l=f.resetObj(o.value,c.arraySplitSymbol);s("update:modelValue",l),s("onMerge",l,e.toRaw(o.value)),o.value=f.tranArr(l,t.randomFun,c.arraySplitSymbol)}},{default:()=>[N.mergeTxt]})])])])}});function I(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const A=e.defineComponent({name:"EleDynamicCascadeInput",props:{modelValue:{type:Object,required:!0},isController:{type:Boolean},dyCls:{type:String},randomFun:{type:Function,default:t=>`${Date.now()}_${t??0}`},depth:{type:Number,default:3},btnConfigs:{type:Object},configs:{type:Object},dyListConfigs:{type:Object},newChildTxt:{type:Function,default:t=>`添加 '${t.key}' 子项`}},emits:{"update:modelValue":t=>!0,onReset:()=>!0,onMerge:(t,s)=>!0},setup(t,{emit:s,expose:C}){const N={resetTxt:"重置",newTxt:"添加项",mergeTxt:"合并",...t.btnConfigs},i={hideReset:!1,maxHeight:"600px",allowFilter:!0,showBorder:!0,showPad:!0,retractLen:0,borderColors:[],...t.configs},c={arraySplitSymbol:",",...t.dyListConfigs},m=n=>["string","number"].includes(n),o=n=>Object.keys(n).map((r,d)=>{let a=n[r];const b=Array.isArray(a),x=b?a.every(p=>typeof p=="number"):typeof a=="number",g=a===null;return m(typeof a)&&(a=n[r]),g&&(a=""),{rId:t.randomFun(d),key:r,value:Object.prototype.toString.call(a)==="[object Object]"?o(n[r]):b?a.join(c.arraySplitSymbol):a,isArray:b||void 0,isNumber:x||void 0}}),V=n=>n.reduce((r,d)=>{const a=d.value;return d.key.trim().length&&(r[d.key]=Array.isArray(a)?V(a):f.parseValue(d.value,d.isArray,d.isNumber,c.arraySplitSymbol)),r},{}),l=e.ref(o(t.modelValue)),v=(n,r=1,d)=>e.createVNode("div",{class:[`depth-${r}`,i.showBorder?"":"no-border",i.showPad?"":"no-pad"],style:{"--depth":r,["--c"+[r]]:f.saferRepairColor(i.borderColors,r)}},[n.map((a,b,x)=>{const g=Array.isArray(a.value),p=m(typeof a.value);return e.createVNode("div",{class:"dItem",key:a.rId,style:{marginLeft:r>1?`${r*i.retractLen}px`:"0"}},[e.createVNode("div",{class:"input"},[!g&&e.createVNode(e.Fragment,null,[e.createVNode(u.ElInput,{modelValue:a.key,class:"key",onInput:y=>a.key=y},null),e.createTextVNode(":")]),e.createVNode(u.ElInput,{class:`value ${g?"isKey":""}`,modelValue:p?a.value:a.key,onInput:y=>{if(g){a.key=y;return}i.allowFilter&&a.isNumber?a.value=f.formatNumberInput(y,a.isArray,c.arraySplitSymbol):a.value=y}},{prefix:Array.isArray(a.value)?void 0:()=>e.createVNode(e.Fragment,null,[e.createVNode(u.ElButton,{type:a.isArray?"success":"default",size:"small",onClick:()=>{a.isArray=!a.isArray}},{default:()=>[e.createTextVNode("Array")]}),e.createTextVNode(" "),e.createVNode(u.ElButton,{type:a.isNumber?"success":"default",size:"small",onClick:()=>{a.isNumber=!a.isNumber}},{default:()=>[e.createTextVNode("Number")]})]),suffix:()=>{let y;return r<t.depth?!g&&e.createVNode(u.ElButton,{type:"success",size:"small",onClick:()=>{p&&(a.value=[],a.isArray=void 0),a.value.push({rId:t.randomFun(),key:"",value:""})}},I(y=t.newChildTxt(a))?y:{default:()=>[y]}):null}})]),e.createVNode("div",{class:"btn"},[e.createVNode(u.ElButton,{type:"success",disabled:b!==x.length-1,onClick:()=>{n.push({rId:t.randomFun(),key:"",value:""})}},{default:()=>[e.createTextVNode("+")]}),e.createVNode(u.ElButton,{type:"danger",onClick:()=>{if(n.splice(b,1),n.length<1){if(d===void 0)return V([]);const y=l.value.findIndex(S=>S.rId===d?.rId);r<1?l.value.splice(y,1,{...d,value:""}):d.value=""}}},{default:()=>[e.createTextVNode("-")]})]),Array.isArray(a.value)&&v(a.value,r+1,a)])})]);return e.watch(l,n=>{if(!t.isController)return;const r=V(n);s("update:modelValue",r),s("onMerge",r,e.toRaw(l.value))},{deep:!0}),C({onSet:n=>{l.value=o(n??t.modelValue)},getResult:(n="res")=>n==="ori"?e.toRaw(l.value):V(l.value)}),()=>e.createVNode("div",{class:t.dyCls??"dynamicCascadeForm"},[e.createVNode("div",{class:"dyFormList",style:{maxHeight:i.maxHeight}},[v(l.value)]),e.createVNode("div",{class:"control"},[!l.value.length&&e.createVNode(u.ElButton,{type:"success",onClick:()=>{l.value.push({rId:t.randomFun(),key:"",value:""})}},{default:()=>[N.newTxt]}),!t.isController&&e.createVNode(e.Fragment,null,[!i.hideReset&&e.createVNode(u.ElButton,{type:"default",onClick:()=>{l.value=o(t.modelValue),s("onReset")}},{default:()=>[N.resetTxt]}),e.createVNode(u.ElButton,{type:"info",onClick:()=>{const n=V(l.value);s("update:modelValue",n),s("onMerge",n,e.toRaw(l.value)),l.value=o(n)}},{default:()=>[N.mergeTxt]})])])])}});exports.EleDynamicCascadeInput=A;exports.EleDynamicInput=k;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as N, ref as w, watch as T, toRaw as k, createVNode as a, createTextVNode as m, Fragment as S, nextTick as O, isVNode as R } from "vue";
|
|
2
|
-
import { t as I, r as V, f as j, p as L, s as M } from "../index-
|
|
2
|
+
import { t as I, r as V, f as j, p as L, s as M } from "../index-MF72-iEr.js";
|
|
3
3
|
import { ElInput as h, ElButton as r } from "element-plus";
|
|
4
4
|
const E = /* @__PURE__ */ N({
|
|
5
5
|
name: "EleDynamicInput",
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { DyFormItem } from '../types/form';
|
|
3
3
|
type KeyOf<T> = Extract<keyof T, string>;
|
|
4
|
-
export
|
|
4
|
+
export type DyFormItemLike<Row extends Record<string, any>, RuleT = any> = Omit<DyFormItem<Row, RuleT>, "value"> & {
|
|
5
|
+
value: DyFormItem<Row, RuleT>["value"] | any | null;
|
|
6
|
+
};
|
|
7
|
+
export declare function useReactiveForm<T extends Record<string, any>, U = any>(items: DyFormItemLike<T, U>[], isReactive?: boolean): DyFormItem<T, U>[];
|
|
5
8
|
export declare function useDyForm<Row extends Record<string, any>>(items: DyFormItem<Row>[] | Ref<DyFormItem<Row>[]>): {
|
|
6
9
|
setDisabled: (disabled: boolean, keys?: KeyOf<Row>[]) => void;
|
|
7
10
|
setHidden: (hidden: boolean, keys?: KeyOf<Row>[]) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./index.css');const a=require("vue"),l=(e,s,n)=>Object.keys(e).map((t,r)=>{const i=e[t],o=Array.isArray(i),c=o?i.every(f=>typeof f=="number"):typeof i=="number";return{rId:s(r),key:t,value:o?i.join(n):i,isArray:o||void 0,isNumber:c||void 0}}),p=(e,s)=>e.reduce((n,t)=>(t.key.trim()&&(n[t.key]=u(t.value,t.isArray,t.isNumber,s)),n),{}),u=(e,s,n,t=",")=>{let r;return s?n?r=String(e).split(t).map(Number).filter(i=>!Number.isNaN(i)):r=String(e).split(t):n?r=parseFloat(e):r=e.toString(),r},m=(e,s,n=",")=>{const t=r=>{r=r.replace(/[^\d.-]/g,"");let i=!1;r.startsWith("-")&&(i=!0),r=r.replace(/-/g,"");const o=r.indexOf(".");return o!==-1&&(r=r.slice(0,o+1)+r.slice(o+1).replace(/\./g,"")),(i?"-":"")+r};return s?e.split(n).map(r=>t(r)).join(n):t(e)},g=e=>`hsl(${e*35%360}, 60%, 65%)`,y=(e,s)=>e[s-1]??g(s);function b(e){return a.isRef(e)?e:a.ref(e??null)}exports.ensureRef=b;exports.formatNumberInput=m;exports.parseValue=u;exports.resetObj=p;exports.saferRepairColor=y;exports.tranArr=l;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ref as c, isRef as f } from "vue";
|
|
2
|
+
import './index.css';const g = (e, s, n) => Object.keys(e).map((t, r) => {
|
|
3
|
+
const i = e[t], o = Array.isArray(i), a = o ? i.every((u) => typeof u == "number") : typeof i == "number";
|
|
4
|
+
return {
|
|
5
|
+
rId: s(r),
|
|
6
|
+
key: t,
|
|
7
|
+
value: o ? i.join(n) : i,
|
|
8
|
+
isArray: o || void 0,
|
|
9
|
+
isNumber: a || void 0
|
|
10
|
+
};
|
|
11
|
+
}), y = (e, s) => e.reduce((n, t) => (t.key.trim() && (n[t.key] = l(t.value, t.isArray, t.isNumber, s)), n), {}), l = (e, s, n, t = ",") => {
|
|
12
|
+
let r;
|
|
13
|
+
return s ? n ? r = String(e).split(t).map(Number).filter((i) => !Number.isNaN(i)) : r = String(e).split(t) : n ? r = parseFloat(e) : r = e.toString(), r;
|
|
14
|
+
}, b = (e, s, n = ",") => {
|
|
15
|
+
const t = (r) => {
|
|
16
|
+
r = r.replace(/[^\d.-]/g, "");
|
|
17
|
+
let i = !1;
|
|
18
|
+
r.startsWith("-") && (i = !0), r = r.replace(/-/g, "");
|
|
19
|
+
const o = r.indexOf(".");
|
|
20
|
+
return o !== -1 && (r = r.slice(0, o + 1) + r.slice(o + 1).replace(/\./g, "")), (i ? "-" : "") + r;
|
|
21
|
+
};
|
|
22
|
+
return s ? e.split(n).map((r) => t(r)).join(n) : t(e);
|
|
23
|
+
}, p = (e) => `hsl(${e * 35 % 360}, 60%, 65%)`, d = (e, s) => e[s - 1] ?? p(s);
|
|
24
|
+
function h(e) {
|
|
25
|
+
return f(e) ? e : c(e ?? null);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
h as e,
|
|
29
|
+
b as f,
|
|
30
|
+
l as p,
|
|
31
|
+
y as r,
|
|
32
|
+
d as s,
|
|
33
|
+
g as t
|
|
34
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-CA3F2Lxo.cjs"),I=e.defineComponent({name:"DynamicInput",props:{size:{type:String},isController:{type:Boolean},dyCls:{type:String},randomFun:{type:Function,default:a=>`${Date.now()}_${a??0}`},btnConfigs:{type:Object},configs:{type:Object},dyListConfigs:{type:Object},modelValue:{type:Object,required:!0}},emits:{"update:modelValue":a=>!0,onReset:()=>!0,onMerge:(a,u)=>!0},setup(a,{emit:u,expose:f}){const d={resetTxt:"重置",newTxt:"添加项",mergeTxt:"合并",...a.btnConfigs},i={hideReset:!1,maxHeight:"300px",autoScroll:!0,allowFilter:!0,...a.configs},y={arraySplitSymbol:",",...a.dyListConfigs},v=a.size,s=e.ref(m.tranArr(a.modelValue,a.randomFun,y.arraySplitSymbol)),b=e.ref(null);return e.watch(s,t=>{if(!a.isController)return;const o=m.resetObj(t,y.arraySplitSymbol);u("update:modelValue",o),u("onMerge",o,e.toRaw(s.value))},{deep:!0}),f({onSet:t=>{s.value=m.tranArr(t??a.modelValue,a.randomFun,y.arraySplitSymbol)},getResult:(t="res")=>t==="ori"?e.toRaw(s.value):m.resetObj(s.value,y.arraySplitSymbol)}),()=>e.createVNode("div",{class:a.dyCls??`dynamicForm ${v}`},[e.createVNode("div",{class:"dyFormList",ref:b,style:{maxHeight:i.maxHeight}},[s.value.map((t,o,l)=>e.createVNode("div",{class:"dItem",key:t.rId},[e.createVNode("div",{class:"input"},[e.createVNode("input",{size:v,value:t.key,class:"key nativeInput",onInput:r=>{t.key=r.target.value}},null),e.createTextVNode(":"),e.createVNode("div",{class:"vInput"},[e.createVNode("div",{class:"slot"},[e.createVNode("button",{class:[t.isArray?"success":"default","small","bt"],onClick:()=>{t.isArray=!t.isArray}},[e.createTextVNode("Array")]),e.createTextVNode(" "),e.createVNode("button",{class:[t.isNumber?"success":"default","small","bt"],onClick:()=>{t.isNumber=!t.isNumber}},[e.createTextVNode("Number")])]),e.createVNode("input",{size:v,value:t.value,class:"value nativeV",onInput:r=>{const c=r.target.value;i.allowFilter&&t.isNumber?t.value=m.formatNumberInput(c,t.isArray,y.arraySplitSymbol):t.value=c}},null)])]),e.createVNode("div",{class:"btn"},[e.createVNode("button",{class:[v,"success","bt"],disabled:o!==l.length-1,onClick:()=>{s.value.push({rId:a.randomFun(),key:"",value:""}),i.autoScroll&&e.nextTick(()=>{const r=b.value;r?.scrollTo({top:r.scrollHeight,behavior:"smooth"})})}},[e.createTextVNode("+")]),e.createVNode("button",{class:["danger",v,"bt"],onClick:()=>{s.value=s.value.filter(r=>r.rId!==t.rId)}},[e.createTextVNode("-")])])]))]),e.createVNode("div",{class:"control"},[!s.value.length&&e.createVNode("button",{class:["success",v,"bt"],onClick:()=>{s.value.push({rId:a.randomFun(),key:"",value:""})}},[d.newTxt]),!a.isController&&e.createVNode(e.Fragment,null,[!i.hideReset&&e.createVNode("button",{class:["default",v,"bt"],onClick:()=>{s.value=m.tranArr(a.modelValue,a.randomFun,y.arraySplitSymbol),u("onReset")}},[d.resetTxt]),e.createVNode("button",{class:["info",v,"bt"],onClick:()=>{s.value.sort((o,l)=>+o.rId-+l.rId);const t=m.resetObj(s.value,y.arraySplitSymbol);u("update:modelValue",t),u("onMerge",t,e.toRaw(s.value)),s.value=m.tranArr(t,a.randomFun,y.arraySplitSymbol)}},[d.mergeTxt])])])])}}),S=e.defineComponent({name:"DynamicCascadeInput",props:{modelValue:{type:Object,required:!0},isController:{type:Boolean},dyCls:{type:String},randomFun:{type:Function,default:a=>`${Date.now()}_${a??0}`},depth:{type:Number,default:3},btnConfigs:{type:Object},configs:{type:Object},dyListConfigs:{type:Object},newChildTxt:{type:Function,default:a=>`添加 '${a.key}' 子项`}},emits:{"update:modelValue":a=>!0,onReset:()=>!0,onMerge:(a,u)=>!0},setup(a,{emit:u,expose:f}){const d={resetTxt:"重置",newTxt:"添加项",mergeTxt:"合并",...a.btnConfigs},i={hideReset:!1,maxHeight:"600px",allowFilter:!0,showBorder:!0,showPad:!0,retractLen:0,borderColors:[],...a.configs},y={arraySplitSymbol:",",...a.dyListConfigs},v=l=>["string","number"].includes(l),s=l=>Object.keys(l).map((r,c)=>{let n=l[r];const V=Array.isArray(n),x=V?n.every(k=>typeof k=="number"):typeof n=="number",N=n===null;return v(typeof n)&&(n=l[r]),N&&(n=""),{rId:a.randomFun(c),key:r,value:Object.prototype.toString.call(n)==="[object Object]"?s(l[r]):V?n.join(y.arraySplitSymbol):n,isArray:V||void 0,isNumber:x||void 0}}),b=l=>l.reduce((r,c)=>{const n=c.value;return c.key.trim().length&&(r[c.key]=Array.isArray(n)?b(n):m.parseValue(c.value,c.isArray,c.isNumber,y.arraySplitSymbol)),r},{}),t=e.ref(s(a.modelValue)),o=(l,r=1,c)=>e.createVNode("div",{class:[`depth-${r}`,i.showBorder?"":"no-border",i.showPad?"":"no-pad"],style:{"--depth":r,["--c"+[r]]:m.saferRepairColor(i.borderColors,r)}},[l.map((n,V,x)=>{const N=Array.isArray(n.value),k=v(typeof n.value);return e.createVNode("div",{class:"dItem",key:n.rId,style:{marginLeft:r>1?`${r*i.retractLen}px`:"0"}},[e.createVNode("div",{class:"input"},[!N&&e.createVNode(e.Fragment,null,[e.createVNode("input",{value:n.key,class:"key nativeInput",onInput:C=>n.key=C.target.value},null),e.createTextVNode(":")]),e.createVNode("div",{class:"vInput"},[e.createVNode("div",{class:"slot"},[Array.isArray(n.value)?void 0:e.createVNode(e.Fragment,null,[e.createVNode("button",{class:[n.isArray?"success":"default","small","bt"],onClick:()=>{n.isArray=!n.isArray}},[e.createTextVNode("Array")]),e.createTextVNode(" "),e.createVNode("button",{class:[n.isNumber?"success":"default","small","bt"],onClick:()=>{n.isNumber=!n.isNumber}},[e.createTextVNode("Number")])])]),e.createVNode("input",{class:`value nativeV ${N?"isKey":""}`,value:k?n.value:n.key,onInput:C=>{const g=C.target.value;if(N){n.key=g;return}i.allowFilter&&n.isNumber?n.value=m.formatNumberInput(g,n.isArray,y.arraySplitSymbol):n.value=g}},null),e.createVNode("div",{class:"surSlot"},[r<a.depth?!N&&e.createVNode("button",{class:["success","bt"],onClick:()=>{k&&(n.value=[],n.isArray=void 0),n.value.push({rId:a.randomFun(),key:"",value:""})}},[a.newChildTxt(n)]):null])])]),e.createVNode("div",{class:"btn"},[e.createVNode("button",{class:["success","bt"],disabled:V!==x.length-1,onClick:()=>{l.push({rId:a.randomFun(),key:"",value:""})}},[e.createTextVNode("+")]),e.createVNode("button",{class:["danger","bt"],onClick:()=>{if(l.splice(V,1),l.length<1){if(c===void 0)return b([]);const C=t.value.findIndex(g=>g.rId===c?.rId);r<1?t.value.splice(C,1,{...c,value:""}):c.value=""}}},[e.createTextVNode("-")])]),Array.isArray(n.value)&&o(n.value,r+1,n)])})]);return e.watch(t,l=>{if(!a.isController)return;const r=b(l);u("update:modelValue",r),u("onMerge",r,e.toRaw(t.value))},{deep:!0}),f({onSet:l=>{t.value=s(l??a.modelValue)},getResult:(l="res")=>l==="ori"?e.toRaw(t.value):b(t.value)}),()=>e.createVNode("div",{class:a.dyCls??"dynamicCascadeForm"},[e.createVNode("div",{class:"dyFormList",style:{maxHeight:i.maxHeight}},[o(t.value)]),e.createVNode("div",{class:"control"},[!t.value.length&&e.createVNode("button",{class:["success","bt"],onClick:()=>{t.value.push({rId:a.randomFun(),key:"",value:""})}},[d.newTxt]),!a.isController&&e.createVNode(e.Fragment,null,[!i.hideReset&&e.createVNode("button",{class:["default","bt"],onClick:()=>{t.value=s(a.modelValue),u("onReset")}},[d.resetTxt]),e.createVNode("button",{class:["info","bt"],onClick:()=>{const l=b(t.value);u("update:modelValue",l),u("onMerge",l,e.toRaw(t.value)),t.value=s(l)}},[d.mergeTxt])])])])}});function h(a,u=!0){return a.map(f=>{const d=f;return d.value=m.ensureRef(f.value),u?e.shallowReactive(d):d})}function p(a){const u=()=>e.unref(a),f=(t,o)=>{u().forEach(l=>{const r=l.key;(!o||o.includes(r))&&(l.disabled=t)})},d=(t,o)=>{u().forEach(l=>{const r=l.key;(!o||o.includes(r))&&(l.hidden=t)})},i=(t,o)=>{const l=u().find(r=>r.key===t);l&&(e.isRef(l.value)?l.value.value=o:l.value=o)};return{setDisabled:f,setHidden:d,setValue:i,setValues:t=>{Object.entries(t).forEach(([o,l])=>{i(o,l)})},getValue:t=>u().find(o=>o.key===t),getValues:t=>{const o=t&&t.length?new Set(t):null;return u().reduce((l,r)=>{const c=r.key;if(!o||o.has(c)){const n=e.isRef(r.value)?r.value.value:r.value;l[c]=n}return l},{})},onReset:(t=null)=>{u().forEach(o=>{e.isRef(o.value)?o.value.value=t:o.value=t})}}}const F={install(a){a.component("DynamicInput",I),a.component("DynamicCascadeInput",S)}};exports.DynamicCascadeInput=S;exports.DynamicInput=I;exports.DynamicInputPlugin=F;exports.useDyForm=p;exports.useReactiveForm=h;
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.dynamicForm{overflow:hidden}.dynamicForm.small .dyFormList{gap:6px}.dynamicForm.small .dyFormList .typeBtn{padding:.2em .6em;height:18px}.dynamicForm.small .dyFormList>.dItem .input .key{font-size:.7em}.dynamicForm.small .dyFormList>.dItem .input .vInput{padding:.15em .4em}.dynamicForm.small .dyFormList>.dItem .input .vInput .slot{white-space:nowrap}.dynamicForm.small .dyFormList>.dItem .input .vInput .slot>button{padding:.1em .4em;font-size:.8em}.dynamicForm.small .dyFormList>.dItem .btn .bt{padding:.3em .8em}.dynamicForm.large .dyFormList{gap:15px}.dynamicForm.large .dyFormList .dItem{column-gap:20px}.dynamicForm.large .dyFormList .dItem .input .key{font-size:1.2em}.dynamicForm.large .dyFormList .dItem .input .vInput{padding:.5em .4em}.dynamicForm.large .dyFormList .dItem .input .vInput input{font-size:1.2em}.dynamicForm.large .dyFormList .dItem .input .vInput .slot{white-space:nowrap}.dynamicForm.large .dyFormList .dItem .input .vInput .slot>button{padding:.15em .4em;font-size:1em}.dynamicForm.large .dyFormList .dItem .btn .bt{padding:.8em 1.2em}.dynamicForm .dyFormList{overflow:auto;display:grid;gap:10px;padding:0 5px 10px}.dynamicForm .dyFormList.noList{padding:0}.dynamicForm .dyFormList .dItem{width:100%;display:grid;grid-template-columns:1fr 100px;column-gap:0}.dynamicForm .dyFormList .dItem .input{display:flex;justify-content:flex-start;align-items:center;column-gap:15px}.dynamicForm .dyFormList .dItem .input .key{text-align:center;width:150px}.dynamicForm .dyFormList .dItem .input .key.nativeInput{border:1px solid #d2d6dd;padding:.5em .4em;border-radius:3px}.dynamicForm .dyFormList .dItem .input .key.nativeInput:focus{outline:none;box-shadow:0 0 5px #007bff4d}.dynamicForm .dyFormList .dItem .input .vInput{width:100%;border:1px solid #d2d6dd;padding:.2em .4em;border-radius:3px;display:flex;column-gap:5px}.dynamicForm .dyFormList .dItem .input .vInput>.value{border:none;width:100%}.dynamicForm .dyFormList .dItem .input .vInput>.value.nativeV{letter-spacing:3px}.dynamicForm .dyFormList .dItem .input .vInput>.value.nativeV:focus{outline:none}.dynamicForm .dyFormList .dItem .input .vInput .slot{white-space:nowrap}.dynamicForm .dyFormList .dItem .input .vInput .slot>button{font-weight:400;border-radius:3px;font-size:.8em}.dynamicForm .dyFormList .dItem .btn{display:flex;justify-content:flex-end;align-items:center;column-gap:8px}.dynamicForm .dyFormList .dItem .btn .n-button{font-size:25px;padding:10px 12px}.dynamicForm .dyFormList .dItem .btn .el-button+.el-button{margin-left:0}.dynamicForm .dyFormList .dItem .btn .bt{padding:.5em 1em}.dynamicForm .key .el-input__inner,.dynamicForm .isKey .el-input__inner{text-align:center}.dynamicForm .control{display:flex;justify-content:center;align-items:center;margin-top:5px;column-gap:10px}.dynamicForm .control.noList{margin-top:0}.dynamicForm .bt{color:#fff;border-radius:5px;border:1px solid transparent;padding:.3em .8em;font-size:.9em;font-weight:600;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:.25s;opacity:.9}.dynamicForm .bt:hover{opacity:1}.dynamicForm .bt:disabled{opacity:.35;cursor:not-allowed}.dynamicForm .default{background:#fff;color:#000;border:1px solid #d2d6dd}.dynamicForm .info{background:#8a8e94}.dynamicForm .success{background:#63ba39}.dynamicForm .danger{background:#ea696a}.dynamicCascadeForm{overflow:hidden}.dynamicCascadeForm.small .dyFormList{gap:6px}.dynamicCascadeForm.small .dyFormList .typeBtn{padding:.2em .6em;height:18px}.dynamicCascadeForm.small .dyFormList>.dItem .input .key{font-size:.7em}.dynamicCascadeForm.small .dyFormList>.dItem .input .vInput{padding:.15em .4em}.dynamicCascadeForm.small .dyFormList>.dItem .input .vInput .slot{white-space:nowrap}.dynamicCascadeForm.small .dyFormList>.dItem .input .vInput .slot>button{padding:.1em .4em;font-size:.8em}.dynamicCascadeForm.small .dyFormList>.dItem .btn .bt{padding:.3em .8em}.dynamicCascadeForm.large .dyFormList{gap:15px}.dynamicCascadeForm.large .dyFormList .dItem{column-gap:20px}.dynamicCascadeForm.large .dyFormList .dItem .input .key{font-size:1.2em}.dynamicCascadeForm.large .dyFormList .dItem .input .vInput{padding:.5em .4em}.dynamicCascadeForm.large .dyFormList .dItem .input .vInput input{font-size:1.2em}.dynamicCascadeForm.large .dyFormList .dItem .input .vInput .slot{white-space:nowrap}.dynamicCascadeForm.large .dyFormList .dItem .input .vInput .slot>button{padding:.15em .4em;font-size:1em}.dynamicCascadeForm.large .dyFormList .dItem .btn .bt{padding:.8em 1.2em}.dynamicCascadeForm .dyFormList{overflow:auto;display:grid;gap:10px;padding:0 5px 10px}.dynamicCascadeForm .dyFormList.noList{padding:0}.dynamicCascadeForm .dyFormList .dItem{width:100%;display:grid;grid-template-columns:1fr 100px;column-gap:0}.dynamicCascadeForm .dyFormList .dItem .input{display:flex;justify-content:flex-start;align-items:center;column-gap:15px}.dynamicCascadeForm .dyFormList .dItem .input .key{text-align:center;width:150px}.dynamicCascadeForm .dyFormList .dItem .input .key.nativeInput{border:1px solid #d2d6dd;padding:.5em .4em;border-radius:3px}.dynamicCascadeForm .dyFormList .dItem .input .key.nativeInput:focus{outline:none;box-shadow:0 0 5px #007bff4d}.dynamicCascadeForm .dyFormList .dItem .input .vInput{width:100%;border:1px solid #d2d6dd;padding:.2em .4em;border-radius:3px;display:flex;column-gap:5px}.dynamicCascadeForm .dyFormList .dItem .input .vInput>.value{border:none;width:100%}.dynamicCascadeForm .dyFormList .dItem .input .vInput>.value.nativeV{letter-spacing:3px}.dynamicCascadeForm .dyFormList .dItem .input .vInput>.value.nativeV:focus{outline:none}.dynamicCascadeForm .dyFormList .dItem .input .vInput .slot{white-space:nowrap}.dynamicCascadeForm .dyFormList .dItem .input .vInput .slot>button{font-weight:400;border-radius:3px;font-size:.8em}.dynamicCascadeForm .dyFormList .dItem .btn{display:flex;justify-content:flex-end;align-items:center;column-gap:8px}.dynamicCascadeForm .dyFormList .dItem .btn .n-button{font-size:25px;padding:10px 12px}.dynamicCascadeForm .dyFormList .dItem .btn .el-button+.el-button{margin-left:0}.dynamicCascadeForm .dyFormList .dItem .btn .bt{padding:.5em 1em}.dynamicCascadeForm .key .el-input__inner,.dynamicCascadeForm .isKey .el-input__inner{text-align:center}.dynamicCascadeForm .control{display:flex;justify-content:center;align-items:center;margin-top:5px;column-gap:10px}.dynamicCascadeForm .control.noList{margin-top:0}.dynamicCascadeForm .bt{color:#fff;border-radius:5px;border:1px solid transparent;padding:.3em .8em;font-size:.9em;font-weight:600;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:.25s;opacity:.9}.dynamicCascadeForm .bt:hover{opacity:1}.dynamicCascadeForm .bt:disabled{opacity:.35;cursor:not-allowed}.dynamicCascadeForm .default{background:#fff;color:#000;border:1px solid #d2d6dd}.dynamicCascadeForm .info{background:#8a8e94}.dynamicCascadeForm .success{background:#63ba39}.dynamicCascadeForm .danger{background:#ea696a}.dynamicCascadeForm .dyFormList .dItem{width:inherit}.dynamicCascadeForm .dyFormList .dItem .vInput .surSlot{white-space:nowrap}.dynamicCascadeForm .dyFormList .dItem .vInput .surSlot>button{padding:.1em .4em;font-size:.8em}.dynamicCascadeForm .dyFormList .dItem .input .value.isKey{text-align:center}.dynamicCascadeForm .dyFormList .dItem .input .value.isKey input{font-weight:700}.dynamicCascadeForm .dyFormList>.depth-1{display:grid;border:1px solid var(--c1);border-style:dashed;border-radius:5px}.dynamicCascadeForm .dyFormList>.depth-1>.dItem{padding:5px}.dynamicCascadeForm .dyFormList>.depth-1 .dItem+.dItem{margin-top:5px}.dynamicCascadeForm .dyFormList>.depth-1.no-pad>.dItem{padding:0}.dynamicCascadeForm .dyFormList .depth-1 .depth-2{border:1px solid var(--c2);border-style:dashed;padding:8px;border-radius:5px;margin-top:10px;row-gap:-3px}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .dItem .btn .n-button{transform:scale(.84)}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3{border:1px solid var(--c3);border-style:dashed;padding:7px;border-radius:5px;margin-top:9px;row-gap:-5px}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3 .dItem .btn .n-button{transform:scale(.76)}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3 .depth-4{border:1px solid var(--c4);border-style:dashed;padding:6px;border-radius:5px;margin-top:8px;row-gap:-7px}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3 .depth-4 .dItem .btn .n-button{transform:scale(.68)}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3 .depth-4 .depth-5{border:1px solid var(--c5);border-style:dashed;padding:5px;border-radius:5px;margin-top:7px;row-gap:-9px}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3 .depth-4 .depth-5 .dItem .btn .n-button{transform:scale(.6)}.dynamicCascadeForm .dyFormList .no-border{border:none!important}.dynamicCascadeForm .dyFormList .no-pad{padding:0!important}.naiDynamicForm .cls-required{margin-left:5px;color:red}@media(max-width:756px){.dynamicForm .dyFormList .dItem .input .key{width:50px}.dynamicForm .dyFormList .dItem .input .value{width:calc(100% - 60px)}}
|
|
1
|
+
.dynamicForm{overflow:hidden}.dynamicForm.small .dyFormList{gap:6px}.dynamicForm.small .dyFormList .typeBtn{padding:.2em .6em;height:18px}.dynamicForm.small .dyFormList>.dItem .input .key{font-size:.7em}.dynamicForm.small .dyFormList>.dItem .input .vInput{padding:.15em .4em}.dynamicForm.small .dyFormList>.dItem .input .vInput .slot{white-space:nowrap}.dynamicForm.small .dyFormList>.dItem .input .vInput .slot>button{padding:.1em .4em;font-size:.8em}.dynamicForm.small .dyFormList>.dItem .btn .bt{padding:.3em .8em}.dynamicForm.large .dyFormList{gap:15px}.dynamicForm.large .dyFormList .dItem{column-gap:20px}.dynamicForm.large .dyFormList .dItem .input .key{font-size:1.2em}.dynamicForm.large .dyFormList .dItem .input .vInput{padding:.5em .4em}.dynamicForm.large .dyFormList .dItem .input .vInput input{font-size:1.2em}.dynamicForm.large .dyFormList .dItem .input .vInput .slot{white-space:nowrap}.dynamicForm.large .dyFormList .dItem .input .vInput .slot>button{padding:.15em .4em;font-size:1em}.dynamicForm.large .dyFormList .dItem .btn .bt{padding:.8em 1.2em}.dynamicForm .dyFormList{overflow:auto;display:grid;gap:10px;padding:0 5px 10px}.dynamicForm .dyFormList.noList{padding:0}.dynamicForm .dyFormList .dItem{width:100%;display:grid;grid-template-columns:1fr 100px;column-gap:0}.dynamicForm .dyFormList .dItem .input{display:flex;justify-content:flex-start;align-items:center;column-gap:15px}.dynamicForm .dyFormList .dItem .input .key{text-align:center;width:150px}.dynamicForm .dyFormList .dItem .input .key.nativeInput{border:1px solid #d2d6dd;padding:.5em .4em;border-radius:3px}.dynamicForm .dyFormList .dItem .input .key.nativeInput:focus{outline:none;box-shadow:0 0 5px #007bff4d}.dynamicForm .dyFormList .dItem .input .vInput{width:100%;border:1px solid #d2d6dd;padding:.2em .4em;border-radius:3px;display:flex;column-gap:5px}.dynamicForm .dyFormList .dItem .input .vInput>.value{border:none;width:100%}.dynamicForm .dyFormList .dItem .input .vInput>.value.nativeV{letter-spacing:3px}.dynamicForm .dyFormList .dItem .input .vInput>.value.nativeV:focus{outline:none}.dynamicForm .dyFormList .dItem .input .vInput .slot{white-space:nowrap}.dynamicForm .dyFormList .dItem .input .vInput .slot>button{font-weight:400;border-radius:3px;font-size:.8em}.dynamicForm .dyFormList .dItem .btn{display:flex;justify-content:flex-end;align-items:center;column-gap:8px}.dynamicForm .dyFormList .dItem .btn .n-button{font-size:25px;padding:10px 12px}.dynamicForm .dyFormList .dItem .btn .el-button+.el-button{margin-left:0}.dynamicForm .dyFormList .dItem .btn .bt{padding:.5em 1em}.dynamicForm .key .el-input__inner,.dynamicForm .isKey .el-input__inner{text-align:center}.dynamicForm .control{display:flex;justify-content:center;align-items:center;margin-top:5px;column-gap:10px}.dynamicForm .control.noList{margin-top:0}.dynamicForm .bt{color:#fff;border-radius:5px;border:1px solid transparent;padding:.3em .8em;font-size:.9em;font-weight:600;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:.25s;opacity:.9}.dynamicForm .bt:hover{opacity:1}.dynamicForm .bt:disabled{opacity:.35;cursor:not-allowed}.dynamicForm .default{background:#fff;color:#000;border:1px solid #d2d6dd}.dynamicForm .info{background:#8a8e94}.dynamicForm .success{background:#63ba39}.dynamicForm .danger{background:#ea696a}.dynamicCascadeForm{overflow:hidden}.dynamicCascadeForm.small .dyFormList{gap:6px}.dynamicCascadeForm.small .dyFormList .typeBtn{padding:.2em .6em;height:18px}.dynamicCascadeForm.small .dyFormList>.dItem .input .key{font-size:.7em}.dynamicCascadeForm.small .dyFormList>.dItem .input .vInput{padding:.15em .4em}.dynamicCascadeForm.small .dyFormList>.dItem .input .vInput .slot{white-space:nowrap}.dynamicCascadeForm.small .dyFormList>.dItem .input .vInput .slot>button{padding:.1em .4em;font-size:.8em}.dynamicCascadeForm.small .dyFormList>.dItem .btn .bt{padding:.3em .8em}.dynamicCascadeForm.large .dyFormList{gap:15px}.dynamicCascadeForm.large .dyFormList .dItem{column-gap:20px}.dynamicCascadeForm.large .dyFormList .dItem .input .key{font-size:1.2em}.dynamicCascadeForm.large .dyFormList .dItem .input .vInput{padding:.5em .4em}.dynamicCascadeForm.large .dyFormList .dItem .input .vInput input{font-size:1.2em}.dynamicCascadeForm.large .dyFormList .dItem .input .vInput .slot{white-space:nowrap}.dynamicCascadeForm.large .dyFormList .dItem .input .vInput .slot>button{padding:.15em .4em;font-size:1em}.dynamicCascadeForm.large .dyFormList .dItem .btn .bt{padding:.8em 1.2em}.dynamicCascadeForm .dyFormList{overflow:auto;display:grid;gap:10px;padding:0 5px 10px}.dynamicCascadeForm .dyFormList.noList{padding:0}.dynamicCascadeForm .dyFormList .dItem{width:100%;display:grid;grid-template-columns:1fr 100px;column-gap:0}.dynamicCascadeForm .dyFormList .dItem .input{display:flex;justify-content:flex-start;align-items:center;column-gap:15px}.dynamicCascadeForm .dyFormList .dItem .input .key{text-align:center;width:150px}.dynamicCascadeForm .dyFormList .dItem .input .key.nativeInput{border:1px solid #d2d6dd;padding:.5em .4em;border-radius:3px}.dynamicCascadeForm .dyFormList .dItem .input .key.nativeInput:focus{outline:none;box-shadow:0 0 5px #007bff4d}.dynamicCascadeForm .dyFormList .dItem .input .vInput{width:100%;border:1px solid #d2d6dd;padding:.2em .4em;border-radius:3px;display:flex;column-gap:5px}.dynamicCascadeForm .dyFormList .dItem .input .vInput>.value{border:none;width:100%}.dynamicCascadeForm .dyFormList .dItem .input .vInput>.value.nativeV{letter-spacing:3px}.dynamicCascadeForm .dyFormList .dItem .input .vInput>.value.nativeV:focus{outline:none}.dynamicCascadeForm .dyFormList .dItem .input .vInput .slot{white-space:nowrap}.dynamicCascadeForm .dyFormList .dItem .input .vInput .slot>button{font-weight:400;border-radius:3px;font-size:.8em}.dynamicCascadeForm .dyFormList .dItem .btn{display:flex;justify-content:flex-end;align-items:center;column-gap:8px}.dynamicCascadeForm .dyFormList .dItem .btn .n-button{font-size:25px;padding:10px 12px}.dynamicCascadeForm .dyFormList .dItem .btn .el-button+.el-button{margin-left:0}.dynamicCascadeForm .dyFormList .dItem .btn .bt{padding:.5em 1em}.dynamicCascadeForm .key .el-input__inner,.dynamicCascadeForm .isKey .el-input__inner{text-align:center}.dynamicCascadeForm .control{display:flex;justify-content:center;align-items:center;margin-top:5px;column-gap:10px}.dynamicCascadeForm .control.noList{margin-top:0}.dynamicCascadeForm .bt{color:#fff;border-radius:5px;border:1px solid transparent;padding:.3em .8em;font-size:.9em;font-weight:600;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:.25s;opacity:.9}.dynamicCascadeForm .bt:hover{opacity:1}.dynamicCascadeForm .bt:disabled{opacity:.35;cursor:not-allowed}.dynamicCascadeForm .default{background:#fff;color:#000;border:1px solid #d2d6dd}.dynamicCascadeForm .info{background:#8a8e94}.dynamicCascadeForm .success{background:#63ba39}.dynamicCascadeForm .danger{background:#ea696a}.dynamicCascadeForm .dyFormList .dItem{width:inherit}.dynamicCascadeForm .dyFormList .dItem .vInput .surSlot{white-space:nowrap}.dynamicCascadeForm .dyFormList .dItem .vInput .surSlot>button{padding:.1em .4em;font-size:.8em}.dynamicCascadeForm .dyFormList .dItem .input .value.isKey{text-align:center}.dynamicCascadeForm .dyFormList .dItem .input .value.isKey input{font-weight:700}.dynamicCascadeForm .dyFormList>.depth-1{display:grid;border:1px solid var(--c1);border-style:dashed;border-radius:5px}.dynamicCascadeForm .dyFormList>.depth-1>.dItem{padding:5px}.dynamicCascadeForm .dyFormList>.depth-1 .dItem+.dItem{margin-top:5px}.dynamicCascadeForm .dyFormList>.depth-1.no-pad>.dItem{padding:0}.dynamicCascadeForm .dyFormList .depth-1 .depth-2{border:1px solid var(--c2);border-style:dashed;padding:8px;border-radius:5px;margin-top:10px;row-gap:-3px}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .dItem .btn .n-button{transform:scale(.84)}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3{border:1px solid var(--c3);border-style:dashed;padding:7px;border-radius:5px;margin-top:9px;row-gap:-5px}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3 .dItem .btn .n-button{transform:scale(.76)}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3 .depth-4{border:1px solid var(--c4);border-style:dashed;padding:6px;border-radius:5px;margin-top:8px;row-gap:-7px}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3 .depth-4 .dItem .btn .n-button{transform:scale(.68)}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3 .depth-4 .depth-5{border:1px solid var(--c5);border-style:dashed;padding:5px;border-radius:5px;margin-top:7px;row-gap:-9px}.dynamicCascadeForm .dyFormList .depth-1 .depth-2 .depth-3 .depth-4 .depth-5 .dItem .btn .n-button{transform:scale(.6)}.dynamicCascadeForm .dyFormList .no-border{border:none!important}.dynamicCascadeForm .dyFormList .no-pad{padding:0!important}.naiDynamicForm .cls-required{margin-left:5px;color:red}.naiDynamicForm .header{margin-bottom:5px}.naiDynamicForm .footer{margin-top:5px}@media(max-width:756px){.dynamicForm .dyFormList .dItem .input .key{width:50px}.dynamicForm .dyFormList .dItem .input .value{width:calc(100% - 60px)}}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { t as p, r as V, f as T, p as L, s as M } from "./index-
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as R, ref as w, watch as N, toRaw as h, createVNode as n, createTextVNode as m, nextTick as j, Fragment as x, shallowReactive as O, unref as D, isRef as F } from "vue";
|
|
2
|
+
import { t as p, r as V, f as T, p as L, s as M, e as $ } from "./index-MF72-iEr.js";
|
|
3
|
+
const H = /* @__PURE__ */ R({
|
|
4
4
|
name: "DynamicInput",
|
|
5
5
|
props: {
|
|
6
6
|
size: {
|
|
@@ -39,7 +39,7 @@ const $ = /* @__PURE__ */ N({
|
|
|
39
39
|
emit: r,
|
|
40
40
|
expose: f
|
|
41
41
|
}) {
|
|
42
|
-
const
|
|
42
|
+
const d = {
|
|
43
43
|
resetTxt: "重置",
|
|
44
44
|
newTxt: "添加项",
|
|
45
45
|
mergeTxt: "合并",
|
|
@@ -50,23 +50,23 @@ const $ = /* @__PURE__ */ N({
|
|
|
50
50
|
autoScroll: !0,
|
|
51
51
|
allowFilter: !0,
|
|
52
52
|
...t.configs
|
|
53
|
-
},
|
|
53
|
+
}, y = {
|
|
54
54
|
arraySplitSymbol: ",",
|
|
55
55
|
...t.dyListConfigs
|
|
56
|
-
},
|
|
57
|
-
return
|
|
56
|
+
}, v = t.size, o = w(p(t.modelValue, t.randomFun, y.arraySplitSymbol)), b = w(null);
|
|
57
|
+
return N(o, (e) => {
|
|
58
58
|
if (!t.isController) return;
|
|
59
|
-
const u = V(e,
|
|
59
|
+
const u = V(e, y.arraySplitSymbol);
|
|
60
60
|
r("update:modelValue", u), r("onMerge", u, h(o.value));
|
|
61
61
|
}, {
|
|
62
62
|
deep: !0
|
|
63
63
|
}), f({
|
|
64
64
|
onSet: (e) => {
|
|
65
|
-
o.value = p(e ?? t.modelValue, t.randomFun,
|
|
65
|
+
o.value = p(e ?? t.modelValue, t.randomFun, y.arraySplitSymbol);
|
|
66
66
|
},
|
|
67
|
-
getResult: (e = "res") => e === "ori" ? h(o.value) : V(o.value,
|
|
67
|
+
getResult: (e = "res") => e === "ori" ? h(o.value) : V(o.value, y.arraySplitSymbol)
|
|
68
68
|
}), () => n("div", {
|
|
69
|
-
class: t.dyCls ?? `dynamicForm ${
|
|
69
|
+
class: t.dyCls ?? `dynamicForm ${v}`
|
|
70
70
|
}, [n("div", {
|
|
71
71
|
class: "dyFormList",
|
|
72
72
|
ref: b,
|
|
@@ -79,13 +79,13 @@ const $ = /* @__PURE__ */ N({
|
|
|
79
79
|
}, [n("div", {
|
|
80
80
|
class: "input"
|
|
81
81
|
}, [n("input", {
|
|
82
|
-
size:
|
|
82
|
+
size: v,
|
|
83
83
|
value: e.key,
|
|
84
84
|
class: "key nativeInput",
|
|
85
85
|
onInput: (s) => {
|
|
86
86
|
e.key = s.target.value;
|
|
87
87
|
}
|
|
88
|
-
}, null),
|
|
88
|
+
}, null), m(":"), n("div", {
|
|
89
89
|
class: "vInput"
|
|
90
90
|
}, [n("div", {
|
|
91
91
|
class: "slot"
|
|
@@ -94,23 +94,23 @@ const $ = /* @__PURE__ */ N({
|
|
|
94
94
|
onClick: () => {
|
|
95
95
|
e.isArray = !e.isArray;
|
|
96
96
|
}
|
|
97
|
-
}, [
|
|
97
|
+
}, [m("Array")]), m(" "), n("button", {
|
|
98
98
|
class: [e.isNumber ? "success" : "default", "small", "bt"],
|
|
99
99
|
onClick: () => {
|
|
100
100
|
e.isNumber = !e.isNumber;
|
|
101
101
|
}
|
|
102
|
-
}, [
|
|
103
|
-
size:
|
|
102
|
+
}, [m("Number")])]), n("input", {
|
|
103
|
+
size: v,
|
|
104
104
|
value: e.value,
|
|
105
105
|
class: "value nativeV",
|
|
106
106
|
onInput: (s) => {
|
|
107
107
|
const i = s.target.value;
|
|
108
|
-
c.allowFilter && e.isNumber ? e.value = T(i, e.isArray,
|
|
108
|
+
c.allowFilter && e.isNumber ? e.value = T(i, e.isArray, y.arraySplitSymbol) : e.value = i;
|
|
109
109
|
}
|
|
110
110
|
}, null)])]), n("div", {
|
|
111
111
|
class: "btn"
|
|
112
112
|
}, [n("button", {
|
|
113
|
-
class: [
|
|
113
|
+
class: [v, "success", "bt"],
|
|
114
114
|
disabled: u !== l.length - 1,
|
|
115
115
|
onClick: () => {
|
|
116
116
|
o.value.push({
|
|
@@ -125,15 +125,15 @@ const $ = /* @__PURE__ */ N({
|
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
}, [
|
|
129
|
-
class: ["danger",
|
|
128
|
+
}, [m("+")]), n("button", {
|
|
129
|
+
class: ["danger", v, "bt"],
|
|
130
130
|
onClick: () => {
|
|
131
131
|
o.value = o.value.filter((s) => s.rId !== e.rId);
|
|
132
132
|
}
|
|
133
|
-
}, [
|
|
133
|
+
}, [m("-")])])]))]), n("div", {
|
|
134
134
|
class: "control"
|
|
135
135
|
}, [!o.value.length && n("button", {
|
|
136
|
-
class: ["success",
|
|
136
|
+
class: ["success", v, "bt"],
|
|
137
137
|
onClick: () => {
|
|
138
138
|
o.value.push({
|
|
139
139
|
rId: t.randomFun(),
|
|
@@ -141,21 +141,21 @@ const $ = /* @__PURE__ */ N({
|
|
|
141
141
|
value: ""
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
}, [
|
|
145
|
-
class: ["default",
|
|
144
|
+
}, [d.newTxt]), !t.isController && n(x, null, [!c.hideReset && n("button", {
|
|
145
|
+
class: ["default", v, "bt"],
|
|
146
146
|
onClick: () => {
|
|
147
|
-
o.value = p(t.modelValue, t.randomFun,
|
|
147
|
+
o.value = p(t.modelValue, t.randomFun, y.arraySplitSymbol), r("onReset");
|
|
148
148
|
}
|
|
149
|
-
}, [
|
|
150
|
-
class: ["info",
|
|
149
|
+
}, [d.resetTxt]), n("button", {
|
|
150
|
+
class: ["info", v, "bt"],
|
|
151
151
|
onClick: () => {
|
|
152
152
|
o.value.sort((u, l) => +u.rId - +l.rId);
|
|
153
|
-
const e = V(o.value,
|
|
154
|
-
r("update:modelValue", e), r("onMerge", e, h(o.value)), o.value = p(e, t.randomFun,
|
|
153
|
+
const e = V(o.value, y.arraySplitSymbol);
|
|
154
|
+
r("update:modelValue", e), r("onMerge", e, h(o.value)), o.value = p(e, t.randomFun, y.arraySplitSymbol);
|
|
155
155
|
}
|
|
156
|
-
}, [
|
|
156
|
+
}, [d.mergeTxt])])])]);
|
|
157
157
|
}
|
|
158
|
-
}),
|
|
158
|
+
}), z = /* @__PURE__ */ R({
|
|
159
159
|
name: "DynamicCascadeInput",
|
|
160
160
|
props: {
|
|
161
161
|
modelValue: {
|
|
@@ -200,7 +200,7 @@ const $ = /* @__PURE__ */ N({
|
|
|
200
200
|
emit: r,
|
|
201
201
|
expose: f
|
|
202
202
|
}) {
|
|
203
|
-
const
|
|
203
|
+
const d = {
|
|
204
204
|
resetTxt: "重置",
|
|
205
205
|
newTxt: "添加项",
|
|
206
206
|
mergeTxt: "合并",
|
|
@@ -214,22 +214,22 @@ const $ = /* @__PURE__ */ N({
|
|
|
214
214
|
retractLen: 0,
|
|
215
215
|
borderColors: [],
|
|
216
216
|
...t.configs
|
|
217
|
-
},
|
|
217
|
+
}, y = {
|
|
218
218
|
arraySplitSymbol: ",",
|
|
219
219
|
...t.dyListConfigs
|
|
220
|
-
},
|
|
220
|
+
}, v = (l) => ["string", "number"].includes(l), o = (l) => Object.keys(l).map((s, i) => {
|
|
221
221
|
let a = l[s];
|
|
222
222
|
const g = Array.isArray(a), A = g ? a.every((S) => typeof S == "number") : typeof a == "number", C = a === null;
|
|
223
|
-
return
|
|
223
|
+
return v(typeof a) && (a = l[s]), C && (a = ""), {
|
|
224
224
|
rId: t.randomFun(i),
|
|
225
225
|
key: s,
|
|
226
|
-
value: Object.prototype.toString.call(a) === "[object Object]" ? o(l[s]) : g ? a.join(
|
|
226
|
+
value: Object.prototype.toString.call(a) === "[object Object]" ? o(l[s]) : g ? a.join(y.arraySplitSymbol) : a,
|
|
227
227
|
isArray: g || void 0,
|
|
228
228
|
isNumber: A || void 0
|
|
229
229
|
};
|
|
230
230
|
}), b = (l) => l.reduce((s, i) => {
|
|
231
231
|
const a = i.value;
|
|
232
|
-
return i.key.trim().length && (s[i.key] = Array.isArray(a) ? b(a) : L(i.value, i.isArray, i.isNumber,
|
|
232
|
+
return i.key.trim().length && (s[i.key] = Array.isArray(a) ? b(a) : L(i.value, i.isArray, i.isNumber, y.arraySplitSymbol)), s;
|
|
233
233
|
}, {}), e = w(o(t.modelValue)), u = (l, s = 1, i) => n("div", {
|
|
234
234
|
class: [`depth-${s}`, c.showBorder ? "" : "no-border", c.showPad ? "" : "no-pad"],
|
|
235
235
|
style: {
|
|
@@ -237,7 +237,7 @@ const $ = /* @__PURE__ */ N({
|
|
|
237
237
|
["--c" + [s]]: M(c.borderColors, s)
|
|
238
238
|
}
|
|
239
239
|
}, [l.map((a, g, A) => {
|
|
240
|
-
const C = Array.isArray(a.value), S =
|
|
240
|
+
const C = Array.isArray(a.value), S = v(typeof a.value);
|
|
241
241
|
return n("div", {
|
|
242
242
|
class: "dItem",
|
|
243
243
|
key: a.rId,
|
|
@@ -250,7 +250,7 @@ const $ = /* @__PURE__ */ N({
|
|
|
250
250
|
value: a.key,
|
|
251
251
|
class: "key nativeInput",
|
|
252
252
|
onInput: (I) => a.key = I.target.value
|
|
253
|
-
}, null),
|
|
253
|
+
}, null), m(":")]), n("div", {
|
|
254
254
|
class: "vInput"
|
|
255
255
|
}, [n("div", {
|
|
256
256
|
class: "slot"
|
|
@@ -259,12 +259,12 @@ const $ = /* @__PURE__ */ N({
|
|
|
259
259
|
onClick: () => {
|
|
260
260
|
a.isArray = !a.isArray;
|
|
261
261
|
}
|
|
262
|
-
}, [
|
|
262
|
+
}, [m("Array")]), m(" "), n("button", {
|
|
263
263
|
class: [a.isNumber ? "success" : "default", "small", "bt"],
|
|
264
264
|
onClick: () => {
|
|
265
265
|
a.isNumber = !a.isNumber;
|
|
266
266
|
}
|
|
267
|
-
}, [
|
|
267
|
+
}, [m("Number")])])]), n("input", {
|
|
268
268
|
class: `value nativeV ${C ? "isKey" : ""}`,
|
|
269
269
|
value: S ? a.value : a.key,
|
|
270
270
|
onInput: (I) => {
|
|
@@ -273,7 +273,7 @@ const $ = /* @__PURE__ */ N({
|
|
|
273
273
|
a.key = k;
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
|
-
c.allowFilter && a.isNumber ? a.value = T(k, a.isArray,
|
|
276
|
+
c.allowFilter && a.isNumber ? a.value = T(k, a.isArray, y.arraySplitSymbol) : a.value = k;
|
|
277
277
|
}
|
|
278
278
|
}, null), n("div", {
|
|
279
279
|
class: "surSlot"
|
|
@@ -298,7 +298,7 @@ const $ = /* @__PURE__ */ N({
|
|
|
298
298
|
value: ""
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
}, [
|
|
301
|
+
}, [m("+")]), n("button", {
|
|
302
302
|
class: ["danger", "bt"],
|
|
303
303
|
onClick: () => {
|
|
304
304
|
if (l.splice(g, 1), l.length < 1) {
|
|
@@ -310,9 +310,9 @@ const $ = /* @__PURE__ */ N({
|
|
|
310
310
|
}) : i.value = "";
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
}, [
|
|
313
|
+
}, [m("-")])]), Array.isArray(a.value) && u(a.value, s + 1, a)]);
|
|
314
314
|
})]);
|
|
315
|
-
return
|
|
315
|
+
return N(e, (l) => {
|
|
316
316
|
if (!t.isController) return;
|
|
317
317
|
const s = b(l);
|
|
318
318
|
r("update:modelValue", s), r("onMerge", s, h(e.value));
|
|
@@ -341,30 +341,33 @@ const $ = /* @__PURE__ */ N({
|
|
|
341
341
|
value: ""
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
|
-
}, [
|
|
344
|
+
}, [d.newTxt]), !t.isController && n(x, null, [!c.hideReset && n("button", {
|
|
345
345
|
class: ["default", "bt"],
|
|
346
346
|
onClick: () => {
|
|
347
347
|
e.value = o(t.modelValue), r("onReset");
|
|
348
348
|
}
|
|
349
|
-
}, [
|
|
349
|
+
}, [d.resetTxt]), n("button", {
|
|
350
350
|
class: ["info", "bt"],
|
|
351
351
|
onClick: () => {
|
|
352
352
|
const l = b(e.value);
|
|
353
353
|
r("update:modelValue", l), r("onMerge", l, h(e.value)), e.value = o(l);
|
|
354
354
|
}
|
|
355
|
-
}, [
|
|
355
|
+
}, [d.mergeTxt])])])]);
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
|
-
function
|
|
359
|
-
return
|
|
358
|
+
function P(t, r = !0) {
|
|
359
|
+
return t.map((f) => {
|
|
360
|
+
const d = f;
|
|
361
|
+
return d.value = $(f.value), r ? O(d) : d;
|
|
362
|
+
});
|
|
360
363
|
}
|
|
361
|
-
function
|
|
364
|
+
function q(t) {
|
|
362
365
|
const r = () => D(t), f = (e, u) => {
|
|
363
366
|
r().forEach((l) => {
|
|
364
367
|
const s = l.key;
|
|
365
368
|
(!u || u.includes(s)) && (l.disabled = e);
|
|
366
369
|
});
|
|
367
|
-
},
|
|
370
|
+
}, d = (e, u) => {
|
|
368
371
|
r().forEach((l) => {
|
|
369
372
|
const s = l.key;
|
|
370
373
|
(!u || u.includes(s)) && (l.hidden = e);
|
|
@@ -373,7 +376,7 @@ function P(t) {
|
|
|
373
376
|
const l = r().find((s) => s.key === e);
|
|
374
377
|
l && (F(l.value) ? l.value.value = u : l.value = u);
|
|
375
378
|
};
|
|
376
|
-
return { setDisabled: f, setHidden:
|
|
379
|
+
return { setDisabled: f, setHidden: d, setValue: c, setValues: (e) => {
|
|
377
380
|
Object.entries(e).forEach(([u, l]) => {
|
|
378
381
|
c(u, l);
|
|
379
382
|
});
|
|
@@ -393,15 +396,15 @@ function P(t) {
|
|
|
393
396
|
});
|
|
394
397
|
} };
|
|
395
398
|
}
|
|
396
|
-
const
|
|
399
|
+
const _ = {
|
|
397
400
|
install(t) {
|
|
398
|
-
t.component("DynamicInput",
|
|
401
|
+
t.component("DynamicInput", H), t.component("DynamicCascadeInput", z);
|
|
399
402
|
}
|
|
400
403
|
};
|
|
401
404
|
export {
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
405
|
+
z as DynamicCascadeInput,
|
|
406
|
+
H as DynamicInput,
|
|
407
|
+
_ as DynamicInputPlugin,
|
|
408
|
+
q as useDyForm,
|
|
409
|
+
P as useReactiveForm
|
|
407
410
|
};
|