vue-form-craft 4.6.0 → 4.6.2

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.
Files changed (27) hide show
  1. package/README.md +133 -0
  2. package/dist/lazy/{Card-SlrXi_q7.js → Card-B8pKJPp_.js} +1 -1
  3. package/dist/lazy/{Cascader-C-5P34H1.js → Cascader-Bj1MKP1h.js} +6 -6
  4. package/dist/lazy/{Checkbox-CSpBR5Xj.js → Checkbox-C7cedqdm.js} +9 -9
  5. package/dist/lazy/{Collapse-bcxPYVIJ.js → Collapse-B9aQfM0l.js} +1 -1
  6. package/dist/lazy/{Component-CLWNoceC.js → Component-90FKsVnF.js} +1 -1
  7. package/dist/lazy/{Component-CZCrc_rf.js → Component-Bf-0vp25.js} +9 -9
  8. package/dist/lazy/{Component-f13dQG7R.js → Component-CYzr90VJ.js} +7 -7
  9. package/dist/lazy/{Component-D2bxRGIa.js → Component-DBxHG6gd.js} +5 -5
  10. package/dist/lazy/{Component-D4I6MoSg.js → Component-DO63yabq.js} +9 -9
  11. package/dist/lazy/{Component-pwCIyEPi.js → Component-XLW-HW-w.js} +7 -7
  12. package/dist/lazy/{Custom-BuhTq_5b.js → Custom-DvBd4WJt.js} +6 -6
  13. package/dist/lazy/{FormList-CpVgqkkh.js → FormList-BU-Rshq5.js} +7 -7
  14. package/dist/lazy/{Grid-DdKc_Z1p.js → Grid-CCWNeHmC.js} +1 -1
  15. package/dist/lazy/{Inline-hEdXlaPF.js → Inline-DjvYKa4Y.js} +1 -1
  16. package/dist/lazy/{JsonEdit-C3zKC2yg.js → JsonEdit-DWa8IstP.js} +2590 -2583
  17. package/dist/lazy/{ObjGroup-q5IIlnrr.js → ObjGroup-DXu3Ka-M.js} +4 -4
  18. package/dist/lazy/{Radio-CGL9LYVg.js → Radio-DLWdhD-s.js} +11 -11
  19. package/dist/lazy/{Select-9v5gulcg.js → Select-DyYeWnkW.js} +10 -10
  20. package/dist/lazy/{Tabs-9yQuzMye.js → Tabs-BxZUuNSL.js} +1 -1
  21. package/dist/lazy/{TextArea-lj_ucLpK.js → TextArea-6_Jr6BtE.js} +1 -1
  22. package/dist/lazy/{index-C3H1n8kj.js → index-EwHmlOuJ.js} +3361 -3180
  23. package/dist/lazy/{useSelect-CR7iTrnS.js → useSelect-B9KCdR90.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/vue-form-craft.js +1 -1
  26. package/dist/vue-form-craft.umd.cjs +100 -100
  27. package/package.json +36 -35
package/README.md ADDED
@@ -0,0 +1,133 @@
1
+ # vue-form-craft
2
+
3
+ 基于 [vue](https://github.com/vuejs/vue) 和 [element-plus](https://github.com/ElemeFE/element) 实现的表单设计器 + 渲染器
4
+
5
+ 使用了最新的前端技术栈,可以让你免去vue项目中表单的烦恼。
6
+
7
+ - [在线预览](https://xinnian999.github.io/vue-form-craft/zh/form-design)
8
+ - [官方文档](https://xinnian999.github.io/vue-form-craft/zh/)
9
+ - 作者:Elin
10
+ - 联系方式:17803000829
11
+
12
+ ![ui](../../ui.png)
13
+
14
+ ## 特性
15
+
16
+ - 可视化设计表单
17
+ - 支持三十多种的表单组件(el所有表单组件、内置组件)
18
+ - 支持收集Array数据(自增组件)
19
+ - 用法简单,又非常灵活高效的表单联动
20
+ - 可预览生成的json配置
21
+ - 可预览生成的VUE组件
22
+ - 高扩展性、支持自定义组件、支持各种ui组件库来替换ui
23
+ - 支持表单填写校验
24
+ - 组件无限深层嵌套,深层校验
25
+
26
+ ## 第三方插件
27
+
28
+ - vuedraggable
29
+ - element-plus
30
+ - vue-form-craft
31
+ - lodash
32
+
33
+ ## 使用
34
+
35
+ ### 版本要求
36
+
37
+ vue@3.x
38
+
39
+ ### 安装
40
+
41
+ ```js
42
+ npm i vue-form-craft
43
+ //或
44
+ yarn add vue-form-craft
45
+ //或
46
+ pnpm i vue-form-craft
47
+ ```
48
+
49
+ ### 全局注册
50
+
51
+ ```js
52
+ import { createApp } from 'vue'
53
+ import VueFormCraft from 'vue-form-craft'
54
+ import ElementPlus from 'element-plus'
55
+ import 'element-plus/dist/index.css'
56
+ import App from './App.vue'
57
+
58
+ const app = createApp(App)
59
+
60
+ app.use(ElementPlus)
61
+ app.use(VueFormCraft)
62
+ app.mount('#app')
63
+ ```
64
+
65
+ ### 使用
66
+
67
+ > 使用表单设计器
68
+
69
+ ```vue
70
+ <template>
71
+ <div style="width:100vw;height:100vh">
72
+ <FormDesign />
73
+ </div>
74
+ </template>
75
+ ```
76
+
77
+ > 使用表单渲染器
78
+
79
+ ```vue
80
+ <template>
81
+ <FormRender v-model="formValues" :schema="schema" ref="formRef" />
82
+ <el-button @click="handleSubmit">提交</el-button>
83
+ </template>
84
+
85
+ <script setup lang="ts">
86
+ import { ref } from 'vue'
87
+ import type { FormSchema,FormInstance } from 'vue-form-craft'
88
+
89
+ const formRef = ref<FormInstance>()
90
+
91
+ const formValues = ref({})
92
+
93
+ const schema: FormSchema = {
94
+ labelWidth: 150,
95
+ labelAlign: 'right',
96
+ size: 'default',
97
+ items: [
98
+ {
99
+ label: '用户名',
100
+ component: 'Input',
101
+ name: 'username',
102
+ required: true,
103
+ props: {
104
+ placeholder: '请输入用户名'
105
+ }
106
+ },
107
+ {
108
+ label: '密码',
109
+ component: 'Password',
110
+ name: 'password',
111
+ required: true,
112
+ props: {
113
+ placeholder: '请输入密码'
114
+ }
115
+ }
116
+ ]
117
+ }
118
+
119
+ const handleSubmit = async () => {
120
+ await formRef.value?.validate()
121
+ alert(JSON.stringify(formValues.value,null,2))
122
+ }
123
+ </script>
124
+ ```
125
+
126
+ ## 捐赠 vue-form-craft 的开发
127
+
128
+ `vue-form-craft` 的文档和代码完全开源,如果该项目有帮助到你的开发工作,你可以捐赠`vue-form-craft`的研发工作,捐赠无门槛,哪怕是一杯可乐也好。
129
+
130
+ <div style="display:flex;gap:15px">
131
+ <img src="./docs/assets/wechat.png" style="height:400px" />
132
+ <img src="./docs/assets/zhifubao.png" style="height:400px" />
133
+ </div>
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as o, resolveComponent as t, openBlock as n, createBlock as a, normalizeProps as p, guardReactiveProps as s, withCtx as l, createVNode as c, unref as i } from "vue";
2
- import { _ as m } from "./index-C3H1n8kj.js";
2
+ import { _ as m } from "./index-EwHmlOuJ.js";
3
3
  import "element-plus";
4
4
  const h = /* @__PURE__ */ o({
5
5
  __name: "Card",
@@ -1,9 +1,9 @@
1
- import { defineComponent as m, useModel as i, resolveComponent as c, openBlock as f, createBlock as g, mergeProps as v, unref as l, mergeModels as y } from "vue";
1
+ import { defineComponent as m, mergeModels as i, useModel as c, resolveComponent as f, openBlock as g, createBlock as v, mergeProps as y, unref as l } from "vue";
2
2
  import "element-plus";
3
- import { u as C } from "./useSelect-CR7iTrnS.js";
3
+ import { u as C } from "./useSelect-B9KCdR90.js";
4
4
  const B = /* @__PURE__ */ m({
5
5
  __name: "Cascader",
6
- props: /* @__PURE__ */ y({
6
+ props: /* @__PURE__ */ i({
7
7
  options: { default: () => [] },
8
8
  multiple: { type: Boolean, default: !1 },
9
9
  mode: { default: "static" },
@@ -18,10 +18,10 @@ const B = /* @__PURE__ */ m({
18
18
  }),
19
19
  emits: ["update:modelValue"],
20
20
  setup(o) {
21
- const n = o, a = i(o, "modelValue"), { currentOptions: u, selectChange: s, loading: d } = C(n);
21
+ const n = o, a = c(o, "modelValue"), { currentOptions: u, selectChange: s, loading: d } = C(n);
22
22
  return (e, t) => {
23
- const p = c("el-cascader");
24
- return f(), g(p, v({
23
+ const p = f("el-cascader");
24
+ return g(), v(p, y({
25
25
  modelValue: a.value,
26
26
  "onUpdate:modelValue": t[0] || (t[0] = (r) => a.value = r),
27
27
  options: l(u),
@@ -1,13 +1,13 @@
1
- import { defineComponent as w, useModel as B, watch as D, resolveComponent as u, resolveDirective as M, unref as a, openBlock as l, createElementBlock as t, toDisplayString as F, Fragment as d, createCommentVNode as i, withDirectives as I, createBlock as s, mergeProps as S, withCtx as f, renderList as k, mergeModels as j } from "vue";
1
+ import { defineComponent as w, mergeModels as B, useModel as D, watch as M, resolveComponent as u, resolveDirective as F, unref as a, openBlock as l, createElementBlock as t, toDisplayString as I, Fragment as d, createCommentVNode as i, withDirectives as S, createBlock as s, mergeProps as j, withCtx as f, renderList as k } from "vue";
2
2
  import "element-plus";
3
- import { u as E } from "./index-C3H1n8kj.js";
4
- import { u as L } from "./useSelect-CR7iTrnS.js";
3
+ import { u as E } from "./index-EwHmlOuJ.js";
4
+ import { u as L } from "./useSelect-B9KCdR90.js";
5
5
  const N = { key: 0 }, O = {
6
6
  key: 0,
7
7
  style: { "font-size": "12px" }
8
8
  }, A = /* @__PURE__ */ w({
9
9
  __name: "Checkbox",
10
- props: /* @__PURE__ */ j({
10
+ props: /* @__PURE__ */ B({
11
11
  options: { default: () => [] },
12
12
  mode: { default: "static" },
13
13
  labelKey: { default: "label" },
@@ -24,16 +24,16 @@ const N = { key: 0 }, O = {
24
24
  }),
25
25
  emits: ["update:modelValue"],
26
26
  setup(p) {
27
- const h = p, n = B(p, "modelValue"), g = E(), { currentOptions: r, selectChange: c, loading: m } = L(h);
28
- return D(n, c), (e, y) => {
27
+ const h = p, n = D(p, "modelValue"), g = E(), { currentOptions: r, selectChange: c, loading: m } = L(h);
28
+ return M(n, c), (e, y) => {
29
29
  var b;
30
- const K = u("el-checkbox"), _ = u("el-checkbox-button"), C = u("el-space"), V = u("el-checkbox-group"), z = M("loading");
31
- return a(g).read ? (l(), t("div", N, F((b = n.value) == null ? void 0 : b.map((o) => {
30
+ const K = u("el-checkbox"), _ = u("el-checkbox-button"), C = u("el-space"), V = u("el-checkbox-group"), z = F("loading");
31
+ return a(g).read ? (l(), t("div", N, I((b = n.value) == null ? void 0 : b.map((o) => {
32
32
  var v;
33
33
  return (v = a(r).find((T) => T[e.valueKey] === o)) == null ? void 0 : v[e.labelKey];
34
34
  }).join("、")), 1)) : (l(), t(d, { key: 1 }, [
35
35
  !a(r).length && !a(m) ? (l(), t("div", O, "暂无选项")) : i("", !0),
36
- I((l(), s(V, S(e.$attrs, {
36
+ S((l(), s(V, j(e.$attrs, {
37
37
  modelValue: n.value,
38
38
  "onUpdate:modelValue": y[0] || (y[0] = (o) => n.value = o),
39
39
  onChange: a(c)
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as u, ref as f, onMounted as _, watch as h, resolveComponent as c, openBlock as o, createBlock as i, mergeProps as C, withCtx as r, createElementBlock as E, Fragment as k, renderList as v, createVNode as m, unref as V } from "vue";
2
- import { _ as y } from "./index-C3H1n8kj.js";
2
+ import { _ as y } from "./index-EwHmlOuJ.js";
3
3
  import "element-plus";
4
4
  import { _ as B } from "./Title.vue_vue_type_script_setup_true_lang-Ceco_9-w.js";
5
5
  const x = /* @__PURE__ */ u({
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as a, useModel as s, resolveComponent as p, unref as d, openBlock as n, createElementBlock as i, toDisplayString as c, createBlock as _, mergeProps as f } from "vue";
2
- import { u as v } from "./index-C3H1n8kj.js";
2
+ import { u as v } from "./index-EwHmlOuJ.js";
3
3
  const V = { key: 0 }, B = /* @__PURE__ */ a({
4
4
  __name: "Component",
5
5
  props: {
@@ -1,8 +1,8 @@
1
1
  var u = Object.defineProperty;
2
2
  var m = (o, e, t) => e in o ? u(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
3
  var a = (o, e, t) => m(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as g, useModel as v, ref as c, onMounted as I, resolveComponent as w, openBlock as C, createElementBlock as y, createVNode as _, createElementVNode as V, mergeModels as M } from "vue";
5
- import { u as b, a as x } from "./index-C3H1n8kj.js";
4
+ import { defineComponent as g, mergeModels as v, useModel as I, ref as c, onMounted as w, resolveComponent as C, openBlock as y, createElementBlock as _, createVNode as V, createElementVNode as M } from "vue";
5
+ import { u as b, a as x } from "./index-EwHmlOuJ.js";
6
6
  function S() {
7
7
  return "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z".split(",");
8
8
  }
@@ -76,7 +76,7 @@ class A {
76
76
  }
77
77
  const P = { class: "vfc-verify-code" }, k = /* @__PURE__ */ g({
78
78
  __name: "Component",
79
- props: /* @__PURE__ */ M({
79
+ props: /* @__PURE__ */ v({
80
80
  placeholder: {}
81
81
  }, {
82
82
  modelValue: {},
@@ -84,25 +84,25 @@ const P = { class: "vfc-verify-code" }, k = /* @__PURE__ */ g({
84
84
  }),
85
85
  emits: ["update:modelValue"],
86
86
  setup(o) {
87
- const e = v(o, "modelValue"), t = c(null), i = c(null), n = b(), h = () => {
87
+ const e = I(o, "modelValue"), t = c(null), i = c(null), n = b(), h = () => {
88
88
  var r;
89
89
  if (!e.value) return;
90
90
  const l = (r = i.value) == null ? void 0 : r.validate(e.value);
91
91
  console.log("res", l), l ? n.updateVCodePass(!0) : n.updateVCodePass(!1);
92
92
  };
93
- return I(() => {
93
+ return w(() => {
94
94
  i.value = new A(t.value);
95
95
  }), (l, r) => {
96
- const p = w("el-input");
97
- return C(), y("div", P, [
98
- _(p, {
96
+ const p = C("el-input");
97
+ return y(), _("div", P, [
98
+ V(p, {
99
99
  modelValue: e.value,
100
100
  "onUpdate:modelValue": r[0] || (r[0] = (f) => e.value = f),
101
101
  class: "verify-input",
102
102
  placeholder: l.placeholder,
103
103
  onBlur: h
104
104
  }, null, 8, ["modelValue", "placeholder"]),
105
- V("div", {
105
+ M("div", {
106
106
  class: "verify-code",
107
107
  ref_key: "codeEl",
108
108
  ref: t
@@ -1,12 +1,12 @@
1
- import { defineComponent as b, useModel as V, resolveComponent as d, openBlock as l, createBlock as n, createSlots as B, withCtx as a, createElementBlock as m, Fragment as C, createVNode as w, unref as r, createElementVNode as o, createTextVNode as i, toDisplayString as p, createCommentVNode as u, mergeModels as E } from "vue";
1
+ import { defineComponent as b, mergeModels as V, useModel as B, resolveComponent as d, openBlock as l, createBlock as n, createSlots as C, withCtx as a, createElementBlock as m, Fragment as w, createVNode as E, unref as r, createElementVNode as o, createTextVNode as i, toDisplayString as p, createCommentVNode as u } from "vue";
2
2
  import { ElMessage as M, ElMessageBox as N } from "element-plus";
3
- import { f } from "./index-C3H1n8kj.js";
3
+ import { e as f } from "./index-EwHmlOuJ.js";
4
4
  const $ = {
5
5
  key: 0,
6
6
  style: { "min-width": "300px" }
7
7
  }, F = { class: "el-upload__tip" }, x = /* @__PURE__ */ b({
8
8
  __name: "Component",
9
- props: /* @__PURE__ */ E({
9
+ props: /* @__PURE__ */ V({
10
10
  action: {},
11
11
  multiple: { type: Boolean },
12
12
  btnText: { default: "点击上传" },
@@ -23,7 +23,7 @@ const $ = {
23
23
  }),
24
24
  emits: ["update:modelValue"],
25
25
  setup(c) {
26
- const s = V(c, "modelValue"), y = (e, t) => {
26
+ const s = B(c, "modelValue"), y = (e, t) => {
27
27
  console.log(e, t);
28
28
  }, g = (e) => {
29
29
  console.log(e);
@@ -50,11 +50,11 @@ const $ = {
50
50
  "on-remove": y,
51
51
  "before-remove": h,
52
52
  "on-exceed": v
53
- }, B({
53
+ }, C({
54
54
  default: a(() => [
55
- e.listType === "text" ? (l(), m(C, { key: 0 }, [
55
+ e.listType === "text" ? (l(), m(w, { key: 0 }, [
56
56
  e.drag ? (l(), m("div", $, [
57
- w(r(f), {
57
+ E(r(f), {
58
58
  class: "el-icon--upload",
59
59
  name: "upload"
60
60
  }),
@@ -1,5 +1,5 @@
1
- import { defineComponent as $, ref as v, computed as P, watch as L, onMounted as x, onBeforeUnmount as A, openBlock as T, createElementBlock as N, useModel as F, resolveComponent as J, unref as W, createElementVNode as E, createBlock as X, withCtx as D, createTextVNode as I, createCommentVNode as Y, createVNode as R, mergeModels as G } from "vue";
2
- import { a as H, u as K, b as Q } from "./index-C3H1n8kj.js";
1
+ import { defineComponent as $, ref as v, computed as P, watch as L, onMounted as x, onBeforeUnmount as A, openBlock as T, createElementBlock as N, mergeModels as F, useModel as J, resolveComponent as G, unref as W, createElementVNode as E, createBlock as X, withCtx as D, createTextVNode as I, createCommentVNode as Y, createVNode as R } from "vue";
2
+ import { a as H, u as K, b as Q } from "./index-EwHmlOuJ.js";
3
3
  const Z = $({
4
4
  props: {
5
5
  width: {
@@ -176,7 +176,7 @@ const _ = /* @__PURE__ */ H(Z, [["render", j], ["__scopeId", "data-v-0e272b28"]]
176
176
  class: "vfc-esign"
177
177
  }, ue = /* @__PURE__ */ $({
178
178
  __name: "Component",
179
- props: /* @__PURE__ */ G({
179
+ props: /* @__PURE__ */ F({
180
180
  lineWidth: { default: 6 },
181
181
  lineColor: { default: "#000000" },
182
182
  bgColor: { default: "#f6f6f6" },
@@ -191,7 +191,7 @@ const _ = /* @__PURE__ */ H(Z, [["render", j], ["__scopeId", "data-v-0e272b28"]]
191
191
  }),
192
192
  emits: ["update:modelValue"],
193
193
  setup(a) {
194
- const n = a, g = v(), d = K(), t = F(a, "modelValue"), c = {
194
+ const n = a, g = v(), d = K(), t = J(a, "modelValue"), c = {
195
195
  size: "small",
196
196
  labelAlign: "right",
197
197
  items: [
@@ -238,7 +238,7 @@ const _ = /* @__PURE__ */ H(Z, [["render", j], ["__scopeId", "data-v-0e272b28"]]
238
238
  return x(() => {
239
239
  Object.assign(o.value, n);
240
240
  }), (u, s) => {
241
- const m = J("el-button");
241
+ const m = G("el-button");
242
242
  return W(d).read || t.value ? (T(), N("div", ee, [
243
243
  E("div", te, [
244
244
  E("img", {
@@ -1,7 +1,7 @@
1
- import { defineComponent as f, useModel as V, ref as _, computed as b, watch as w, onMounted as g, resolveComponent as n, openBlock as s, createBlock as p, mergeProps as h, withCtx as m, createVNode as k, normalizeStyle as y, createElementBlock as C, Fragment as M, renderList as B, mergeModels as I } from "vue";
1
+ import { defineComponent as f, mergeModels as V, useModel as _, ref as b, computed as w, watch as g, onMounted as h, resolveComponent as n, openBlock as s, createBlock as p, mergeProps as k, withCtx as m, createVNode as y, normalizeStyle as C, createElementBlock as M, Fragment as B, renderList as I } from "vue";
2
2
  const A = /* @__PURE__ */ f({
3
3
  __name: "Component",
4
- props: /* @__PURE__ */ I({
4
+ props: /* @__PURE__ */ V({
5
5
  selectPosition: { default: "append" },
6
6
  selectWidth: { default: 70 },
7
7
  selectInitialValue: {},
@@ -15,7 +15,7 @@ const A = /* @__PURE__ */ f({
15
15
  }),
16
16
  emits: ["update:modelValue"],
17
17
  setup(d) {
18
- const i = d, t = V(d, "modelValue"), o = _(""), r = b({
18
+ const i = d, t = _(d, "modelValue"), o = b(""), r = w({
19
19
  get() {
20
20
  var e;
21
21
  return (e = t.value) == null ? void 0 : e.replaceAll(o.value, "");
@@ -24,14 +24,14 @@ const A = /* @__PURE__ */ f({
24
24
  e ? t.value = e + o.value : t.value = e;
25
25
  }
26
26
  });
27
- return w(o, (e, a) => {
27
+ return g(o, (e, a) => {
28
28
  var u;
29
29
  t.value && (t.value = ((u = t.value) == null ? void 0 : u.replaceAll(a, "")) + e);
30
- }), g(() => {
30
+ }), h(() => {
31
31
  i.selectInitialValue && (o.value = i.selectInitialValue);
32
32
  }), (e, a) => {
33
33
  const u = n("el-option"), c = n("el-select"), v = n("el-input");
34
- return s(), p(v, h({
34
+ return s(), p(v, k({
35
35
  "show-word-limit": "",
36
36
  autocomplete: "off"
37
37
  }, e.$attrs, {
@@ -39,14 +39,14 @@ const A = /* @__PURE__ */ f({
39
39
  "onUpdate:modelValue": a[1] || (a[1] = (l) => r.value = l)
40
40
  }), {
41
41
  [e.selectPosition]: m(() => [
42
- k(c, {
42
+ y(c, {
43
43
  modelValue: o.value,
44
44
  "onUpdate:modelValue": a[0] || (a[0] = (l) => o.value = l),
45
- style: y({ width: e.selectWidth + "px" }),
45
+ style: C({ width: e.selectWidth + "px" }),
46
46
  placeholder: " "
47
47
  }, {
48
48
  default: m(() => [
49
- (s(!0), C(M, null, B(e.options, (l) => (s(), p(u, {
49
+ (s(!0), M(B, null, I(e.options, (l) => (s(), p(u, {
50
50
  label: l.label,
51
51
  value: l.value,
52
52
  disabled: l.disabled,
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, useModel as m, resolveComponent as r, openBlock as u, createBlock as p, mergeProps as i, unref as c, mergeModels as f } from "vue";
2
- import { u as V } from "./index-C3H1n8kj.js";
1
+ import { defineComponent as d, mergeModels as m, useModel as r, resolveComponent as u, openBlock as p, createBlock as i, mergeProps as c, unref as f } from "vue";
2
+ import { u as V } from "./index-EwHmlOuJ.js";
3
3
  const v = /* @__PURE__ */ d({
4
4
  __name: "Component",
5
- props: /* @__PURE__ */ f({
5
+ props: /* @__PURE__ */ m({
6
6
  disabled: { type: Boolean }
7
7
  }, {
8
8
  modelValue: {},
@@ -10,13 +10,13 @@ const v = /* @__PURE__ */ d({
10
10
  }),
11
11
  emits: ["update:modelValue"],
12
12
  setup(n) {
13
- const a = V(), e = m(n, "modelValue");
13
+ const a = V(), e = r(n, "modelValue");
14
14
  return (o, l) => {
15
- const s = r("el-switch");
16
- return u(), p(s, i(o.$attrs, {
15
+ const s = u("el-switch");
16
+ return p(), i(s, c(o.$attrs, {
17
17
  modelValue: e.value,
18
18
  "onUpdate:modelValue": l[0] || (l[0] = (t) => e.value = t),
19
- disabled: c(a).read || o.disabled
19
+ disabled: f(a).read || o.disabled
20
20
  }), null, 16, ["modelValue", "disabled"]);
21
21
  };
22
22
  }
@@ -1,11 +1,11 @@
1
- import { defineComponent as n, useModel as s, openBlock as t, createElementBlock as p, createBlock as r, resolveDynamicComponent as d, mergeProps as u, mergeModels as c } from "vue";
2
- import { a as i } from "./index-C3H1n8kj.js";
1
+ import { defineComponent as n, mergeModels as s, useModel as p, openBlock as t, createElementBlock as r, createBlock as d, resolveDynamicComponent as u, mergeProps as c } from "vue";
2
+ import { a as i } from "./index-EwHmlOuJ.js";
3
3
  const f = {
4
4
  key: 0,
5
5
  class: "empty"
6
6
  }, _ = /* @__PURE__ */ n({
7
7
  __name: "Custom",
8
- props: /* @__PURE__ */ c({
8
+ props: /* @__PURE__ */ s({
9
9
  componentName: {}
10
10
  }, {
11
11
  modelValue: {},
@@ -13,12 +13,12 @@ const f = {
13
13
  }),
14
14
  emits: ["update:modelValue"],
15
15
  setup(a) {
16
- const o = s(a, "modelValue");
17
- return (e, m) => e.componentName ? (t(), r(d(e.componentName), u({
16
+ const o = p(a, "modelValue");
17
+ return (e, m) => e.componentName ? (t(), d(u(e.componentName), c({
18
18
  key: 1,
19
19
  modelValue: o.value,
20
20
  "onUpdate:modelValue": m[0] || (m[0] = (l) => o.value = l)
21
- }, e.$attrs), null, 16, ["modelValue"])) : (t(), p("span", f, "请输入全局注册得组件名"));
21
+ }, e.$attrs), null, 16, ["modelValue"])) : (t(), r("span", f, "请输入全局注册得组件名"));
22
22
  }
23
23
  }), v = /* @__PURE__ */ i(_, [["__scopeId", "data-v-2250b7d1"]]);
24
24
  export {
@@ -1,9 +1,9 @@
1
- import { defineComponent as A, useModel as q, computed as P, watch as S, resolveComponent as y, openBlock as l, createElementBlock as h, unref as u, createBlock as s, Fragment as g, renderList as $, withCtx as r, createElementVNode as C, createVNode as b, mergeProps as L, createCommentVNode as _, toDisplayString as F, h as T, createTextVNode as j, mergeModels as G } from "vue";
2
- import { u as H, l as B, d as J, c as K, e as D, f as I } from "./index-C3H1n8kj.js";
1
+ import { defineComponent as A, mergeModels as q, useModel as P, computed as S, watch as T, resolveComponent as y, openBlock as l, createElementBlock as h, unref as u, createBlock as s, Fragment as g, renderList as $, withCtx as r, createElementVNode as C, createVNode as b, mergeProps as L, createCommentVNode as _, toDisplayString as F, createTextVNode as j, h as G } from "vue";
2
+ import { u as H, l as B, c as J, d as D, e as I, f as K } from "./index-EwHmlOuJ.js";
3
3
  import "element-plus";
4
4
  const O = { class: "vfc-formList" }, Q = { key: 1 }, U = { class: "list-item-content" }, W = { class: "card-header" }, X = { style: { "margin-top": "5px" } }, ee = /* @__PURE__ */ A({
5
5
  __name: "FormList",
6
- props: /* @__PURE__ */ G({
6
+ props: /* @__PURE__ */ q({
7
7
  children: { default: () => [] },
8
8
  allowAdd: { type: Boolean, default: !0 },
9
9
  allowReduce: { type: Boolean, default: !0 },
@@ -19,21 +19,21 @@ const O = { class: "vfc-formList" }, Q = { key: 1 }, U = { class: "list-item-con
19
19
  }),
20
20
  emits: ["update:modelValue"],
21
21
  setup(R) {
22
- const k = R, t = q(R, "modelValue"), z = H(), w = (e) => J(k.children, { $item: t.value[e], $index: e }), V = P(() => t.value.length >= k.maxLines), M = () => {
22
+ const k = R, t = P(R, "modelValue"), z = H(), w = (e) => K(k.children, { $item: t.value[e], $index: e }), V = S(() => t.value.length >= k.maxLines), M = () => {
23
23
  V.value || (t.value = [...t.value, k.newItemDefaults(t.value.length)]);
24
24
  }, E = (e) => {
25
25
  const f = t.value.filter((m, o) => o !== e);
26
26
  t.value = f;
27
27
  }, N = (e, f, m, o) => {
28
28
  const v = f.no, p = w(o)[v];
29
- return T(D, {
29
+ return G(D, {
30
30
  ...p,
31
31
  hideLabel: !0,
32
32
  style: { marginBottom: 0 },
33
33
  name: `${k.name}.${o}.${p.name}`
34
34
  });
35
35
  };
36
- return S(t, (e, f) => {
36
+ return T(t, (e, f) => {
37
37
  if (!k.children.some((n) => n.change)) return;
38
38
  const m = e.reduce((n, d, a) => (B.isEqual(d, f[a]) || (n = a), n), 0), o = w(m), v = e[m], p = f[m];
39
39
  o.forEach((n) => {
@@ -48,7 +48,7 @@ const O = { class: "vfc-formList" }, Q = { key: 1 }, U = { class: "list-item-con
48
48
  }), (e, f) => {
49
49
  const m = y("el-space"), o = y("el-button"), v = y("el-form-item"), p = y("el-card"), n = y("el-table-column"), d = y("el-table");
50
50
  return l(), h("div", O, [
51
- u(z).design ? (l(), s(u(K), {
51
+ u(z).design ? (l(), s(u(J), {
52
52
  key: 0,
53
53
  list: e.children,
54
54
  class: "layoutRender"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as t, computed as n, openBlock as p, createBlock as a, unref as c, normalizeStyle as m } from "vue";
2
- import { _ as s } from "./index-C3H1n8kj.js";
2
+ import { _ as s } from "./index-EwHmlOuJ.js";
3
3
  import "element-plus";
4
4
  const _ = /* @__PURE__ */ t({
5
5
  __name: "Grid",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as o, computed as l, openBlock as p, createBlock as r, unref as i, normalizeStyle as s } from "vue";
2
- import { _ as c, a as f } from "./index-C3H1n8kj.js";
2
+ import { _ as c, a as f } from "./index-EwHmlOuJ.js";
3
3
  import "element-plus";
4
4
  const m = /* @__PURE__ */ o({
5
5
  __name: "Inline",