form-imagining 0.0.9 → 0.0.11

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 (46) hide show
  1. package/README.md +3 -2
  2. package/dist/App-342ebe5b.js +19 -0
  3. package/dist/Code-42906fb7.js +5 -0
  4. package/dist/Col-d6d4283b.js +5 -0
  5. package/dist/Demo-78945af6.js +110 -0
  6. package/dist/Demo-7bc657a5.js +45 -0
  7. package/dist/Form-02b8b977.js +5 -0
  8. package/dist/Form-40f53810.js +37 -0
  9. package/dist/FormPublic-0d652297.js +5 -0
  10. package/dist/GenerateForm-e0379bdd.js +5 -0
  11. package/dist/Grid-f1dd1742.js +5 -0
  12. package/dist/Input-/345/210/240/351/231/244-cbdb1971.js +87 -0
  13. package/dist/Label-/345/210/240/351/231/244-fcdc62bb.js +92 -0
  14. package/dist/Login-7d7554b2.js +10 -0
  15. package/dist/Preview0925-28ad4211.js +62 -0
  16. package/dist/PreviewDemo-cf0530e2.js +6 -0
  17. package/dist/PreviewDemo.vue_vue_type_script_setup_true_lang-80d6e20c.js +284 -0
  18. package/dist/PreviewDemo2-c8d773bd.js +6 -0
  19. package/dist/PreviewDemo2.vue_vue_type_script_setup_true_lang-5143e14e.js +88 -0
  20. package/dist/PreviewDemo3-e6dc665a.js +82 -0
  21. package/dist/Properties-6f2d8bbe.js +5 -0
  22. package/dist/SqlModule-0c666aaa.js +5 -0
  23. package/dist/Table-8016c228.js +5 -0
  24. package/dist/cTable-64767ff9.js +5 -0
  25. package/dist/{cssMode-258e5ba7.js → cssMode-774b89e0.js} +1 -1
  26. package/dist/form-imagining.js +1 -1
  27. package/dist/form-imagining.umd.cjs +248 -241
  28. package/dist/{freemarker2-12493398.js → freemarker2-8dfbb9fb.js} +1 -1
  29. package/dist/{handlebars-def84c12.js → handlebars-921ae2a7.js} +1 -1
  30. package/dist/{html-280a7ed3.js → html-91382788.js} +1 -1
  31. package/dist/{htmlMode-b76e0bdc.js → htmlMode-07f09f47.js} +1 -1
  32. package/dist/index-a47aecd5.js +10 -0
  33. package/dist/{index-4404fc7a.js → index-e7099870.js} +46448 -16993
  34. package/dist/{javascript-3df96c77.js → javascript-1e406713.js} +2 -2
  35. package/dist/{jsonMode-09c5cef8.js → jsonMode-e6502f8c.js} +1 -1
  36. package/dist/{liquid-c70595aa.js → liquid-875879f0.js} +1 -1
  37. package/dist/{mdx-1a6f1fd5.js → mdx-8c5e3b99.js} +1 -1
  38. package/dist/modalDemo-fd638bf1.js +53 -0
  39. package/dist/{python-3b635c55.js → python-6ee28edf.js} +1 -1
  40. package/dist/{razor-eb9ede61.js → razor-8499c1c3.js} +1 -1
  41. package/dist/style.css +1 -1
  42. package/dist/{tsMode-57e6691d.js → tsMode-40828325.js} +1 -1
  43. package/dist/{typescript-a7a35ee2.js → typescript-70585b01.js} +1 -1
  44. package/dist/{xml-8871547f.js → xml-15ae0c1c.js} +1 -1
  45. package/dist/{yaml-bba498d2.js → yaml-7da7fa12.js} +1 -1
  46. package/package.json +1 -1
package/README.md CHANGED
@@ -11,6 +11,7 @@ CImaginForm 表单设计工具
11
11
  0.0.8
12
12
  1. 表单设计器增加id参数
13
13
 
14
- 0.0.9
14
+ 0.0.10
15
15
  1. 栅格组件增加删除
16
-
16
+ 2. 日期组件增加 value-format属性
17
+ 3. 代码生成模板增加下拉框、单选按钮、复选框、下拉树等;优化文本域模块;
@@ -0,0 +1,19 @@
1
+ import { defineComponent as o, resolveComponent as r, openBlock as t, createBlock as n, unref as a, withCtx as c, createVNode as p } from "vue";
2
+ import { z as _, F as m } from "./index-e7099870.js";
3
+ const u = /* @__PURE__ */ o({
4
+ __name: "App",
5
+ setup(f) {
6
+ return (i, l) => {
7
+ const e = r("a-config-provider");
8
+ return t(), n(e, { locale: a(_) }, {
9
+ default: c(() => [
10
+ p(m)
11
+ ]),
12
+ _: 1
13
+ }, 8, ["locale"]);
14
+ };
15
+ }
16
+ });
17
+ export {
18
+ u as default
19
+ };
@@ -0,0 +1,5 @@
1
+ import { r as a } from "./index-e7099870.js";
2
+ import "vue";
3
+ export {
4
+ a as default
5
+ };
@@ -0,0 +1,5 @@
1
+ import { d as m } from "./index-e7099870.js";
2
+ import "vue";
3
+ export {
4
+ m as default
5
+ };
@@ -0,0 +1,110 @@
1
+ import { defineComponent as b, ref as _, reactive as c, onMounted as p, resolveComponent as i, openBlock as v, createElementBlock as g, createVNode as o, withCtx as s, createTextVNode as w } from "vue";
2
+ import { k as j, m } from "./index-e7099870.js";
3
+ const y = { class: "cici-form-css" }, C = /* @__PURE__ */ b({
4
+ __name: "Demo",
5
+ setup(z) {
6
+ j(), _([]), _([]);
7
+ const a = c({
8
+ bdc_djzb: {
9
+ 业务号: "",
10
+ age: 20
11
+ },
12
+ bdc_ywfw: {
13
+ name: "2",
14
+ title: "我是yefw"
15
+ }
16
+ });
17
+ p(() => {
18
+ console.info("我是预览页面");
19
+ });
20
+ function f(n) {
21
+ const e = n.target.value, l = n.target.__vnode.props.rules;
22
+ if (l != null) {
23
+ const r = l.length;
24
+ if (r > 0)
25
+ for (let u = 0; u < r; u++) {
26
+ const d = l[u];
27
+ if (d.required) {
28
+ if (e == "") {
29
+ m.error(d.message), n.target.focus();
30
+ return;
31
+ }
32
+ } else if (!/^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(e)) {
33
+ m.error(d.message), n.target.focus();
34
+ return;
35
+ }
36
+ }
37
+ }
38
+ }
39
+ return (n, e) => {
40
+ const l = i("a-input"), r = i("a-form-item"), u = i("a-button"), d = i("a-form");
41
+ return v(), g("div", y, [
42
+ o(d, {
43
+ "label-col": { style: { width: "100px" } },
44
+ labelWrap: !0
45
+ }, {
46
+ default: s(() => [
47
+ o(r, {
48
+ label: "受理编号",
49
+ "validate-status": "error"
50
+ }, {
51
+ default: s(() => [
52
+ o(l, {
53
+ status: "error",
54
+ value: a.bdc_djzb.业务号,
55
+ "onUpdate:value": e[0] || (e[0] = (t) => a.bdc_djzb.业务号 = t),
56
+ "write-field": "bdc_djzb.受理编号;bdc_ywfw.slbh",
57
+ rules: [{ required: !0, message: "必填项" }, { type: "number", message: "请输入数字" }],
58
+ onBlur: e[1] || (e[1] = (t) => f(t))
59
+ }, null, 8, ["value"])
60
+ ]),
61
+ _: 1
62
+ }),
63
+ o(r, {
64
+ label: "业务号",
65
+ name: "业务号",
66
+ rules: [{ required: !0, message: "请输入业务号" }]
67
+ }, {
68
+ default: s(() => [
69
+ o(l, {
70
+ value: a.bdc_djzb.业务号,
71
+ "onUpdate:value": e[2] || (e[2] = (t) => a.bdc_djzb.业务号 = t),
72
+ "write-field": "bdc_djzb.业务号;bdc_ywfw.ywh",
73
+ onBlur: e[3] || (e[3] = (t) => f(t))
74
+ }, null, 8, ["value"])
75
+ ]),
76
+ _: 1
77
+ }),
78
+ o(r, { label: "业务号1" }, {
79
+ default: s(() => [
80
+ o(l, {
81
+ value: a.bdc_djzb.业务号,
82
+ "onUpdate:value": e[4] || (e[4] = (t) => a.bdc_djzb.业务号 = t)
83
+ }, null, 8, ["value"])
84
+ ]),
85
+ _: 1
86
+ }),
87
+ o(r, { style: { "text-align": "left", "padding-left": "5px" } }, {
88
+ default: s(() => [
89
+ o(u, {
90
+ type: "Default",
91
+ onClick: n.onSubmit
92
+ }, {
93
+ default: s(() => [
94
+ w("保存")
95
+ ]),
96
+ _: 1
97
+ }, 8, ["onClick"])
98
+ ]),
99
+ _: 1
100
+ })
101
+ ]),
102
+ _: 1
103
+ })
104
+ ]);
105
+ };
106
+ }
107
+ });
108
+ export {
109
+ C as default
110
+ };
@@ -0,0 +1,45 @@
1
+ import { defineComponent as d, ref as t, onMounted as p, resolveComponent as m, openBlock as _, createElementBlock as c, createVNode as i, mergeProps as v, unref as o, withCtx as w } from "vue";
2
+ import { g as b, v as g, a as x, o as k } from "./index-e7099870.js";
3
+ const y = /* @__PURE__ */ d({
4
+ __name: "Demo",
5
+ setup(B, { expose: f }) {
6
+ t([]);
7
+ let r = t({});
8
+ r.value = b();
9
+ let a = t();
10
+ function u() {
11
+ return k(a.value);
12
+ }
13
+ return f({
14
+ onSubmit: u
15
+ }), p(() => {
16
+ console.info("new fun");
17
+ }), (C, e) => {
18
+ const l = m("a-input"), s = m("a-form-item");
19
+ return _(), c("div", {
20
+ ref_key: "formRef",
21
+ ref: a,
22
+ class: "cici-form-css"
23
+ }, [
24
+ i(s, v({
25
+ label: "单行文本",
26
+ required: ""
27
+ }, o(g)["wonder_from.id"]), {
28
+ default: w(() => [
29
+ i(l, {
30
+ value: o(r).wonder_from.id,
31
+ "onUpdate:value": e[0] || (e[0] = (n) => o(r).wonder_from.id = n),
32
+ "write-field": "wonder_from.id",
33
+ rules: [{ type: "required", msg: "不能为空" }],
34
+ onBlur: e[1] || (e[1] = (n) => o(x)(n, "blur"))
35
+ }, null, 8, ["value"])
36
+ ]),
37
+ _: 1
38
+ }, 16)
39
+ ], 512);
40
+ };
41
+ }
42
+ });
43
+ export {
44
+ y as default
45
+ };
@@ -0,0 +1,5 @@
1
+ import { e as m } from "./index-e7099870.js";
2
+ import "vue";
3
+ export {
4
+ m as default
5
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as d, resolveComponent as o, openBlock as l, createBlock as n, withCtx as c, createCommentVNode as u } from "vue";
2
+ const D = /* @__PURE__ */ d({
3
+ __name: "Form",
4
+ props: {
5
+ formData: {
6
+ type: Object,
7
+ default: null
8
+ }
9
+ },
10
+ setup(e) {
11
+ return (i, t) => {
12
+ const m = o("a-input"), r = o("a-textarea"), f = o("a-form-item");
13
+ return l(), n(f, {
14
+ label: e.formData.name
15
+ }, {
16
+ default: c(() => [
17
+ e.formData.type == "input" ? (l(), n(m, {
18
+ key: 0,
19
+ value: e.formData.defaultValue,
20
+ "onUpdate:value": t[0] || (t[0] = (a) => e.formData.defaultValue = a)
21
+ }, null, 8, ["value"])) : u("", !0),
22
+ e.formData.type == "textarea" ? (l(), n(r, {
23
+ key: 1,
24
+ value: e.formData.defaultValue,
25
+ "onUpdate:value": t[1] || (t[1] = (a) => e.formData.defaultValue = a),
26
+ placeholder: "",
27
+ rows: 2
28
+ }, null, 8, ["value"])) : u("", !0)
29
+ ]),
30
+ _: 1
31
+ }, 8, ["label"]);
32
+ };
33
+ }
34
+ });
35
+ export {
36
+ D as default
37
+ };
@@ -0,0 +1,5 @@
1
+ import { _ as m } from "./index-e7099870.js";
2
+ import "vue";
3
+ export {
4
+ m as default
5
+ };
@@ -0,0 +1,5 @@
1
+ import { b as m } from "./index-e7099870.js";
2
+ import "vue";
3
+ export {
4
+ m as default
5
+ };
@@ -0,0 +1,5 @@
1
+ import { f } from "./index-e7099870.js";
2
+ import "vue";
3
+ export {
4
+ f as default
5
+ };
@@ -0,0 +1,87 @@
1
+ import { defineComponent as i, resolveComponent as f, openBlock as m, createBlock as v, withCtx as u, createVNode as t } from "vue";
2
+ import { u as c } from "./index-e7099870.js";
3
+ const x = /* @__PURE__ */ i({
4
+ __name: "Input-删除",
5
+ props: {
6
+ configData: {
7
+ type: Object,
8
+ default: {}
9
+ }
10
+ },
11
+ setup(e) {
12
+ return c(), (g, a) => {
13
+ const o = f("a-input"), n = f("a-form-item"), d = f("a-textarea"), r = f("a-form");
14
+ return m(), v(r, {
15
+ layout: "vertical",
16
+ model: e.configData,
17
+ autocomplete: "off"
18
+ }, {
19
+ default: u(() => [
20
+ t(n, { label: "标题" }, {
21
+ default: u(() => [
22
+ t(o, {
23
+ value: e.configData.name,
24
+ "onUpdate:value": a[0] || (a[0] = (l) => e.configData.name = l)
25
+ }, null, 8, ["value"])
26
+ ]),
27
+ _: 1
28
+ }),
29
+ t(n, {
30
+ label: "数据绑定",
31
+ rules: [{ required: !0 }]
32
+ }, {
33
+ default: u(() => [
34
+ t(o, {
35
+ value: e.configData.model,
36
+ "onUpdate:value": a[1] || (a[1] = (l) => e.configData.model = l)
37
+ }, null, 8, ["value"])
38
+ ]),
39
+ _: 1
40
+ }),
41
+ t(n, {
42
+ label: "key",
43
+ rules: [{ required: !0 }]
44
+ }, {
45
+ default: u(() => [
46
+ t(o, {
47
+ value: e.configData.key,
48
+ "onUpdate:value": a[2] || (a[2] = (l) => e.configData.key = l)
49
+ }, null, 8, ["value"])
50
+ ]),
51
+ _: 1
52
+ }),
53
+ t(n, {
54
+ label: "默认值",
55
+ rules: [{ required: !0 }]
56
+ }, {
57
+ default: u(() => [
58
+ t(o, {
59
+ value: e.configData.defaultValue,
60
+ "onUpdate:value": a[3] || (a[3] = (l) => e.configData.defaultValue = l)
61
+ }, null, 8, ["value"])
62
+ ]),
63
+ _: 1
64
+ }),
65
+ t(n, {
66
+ label: "扩展",
67
+ rules: [{ required: !0 }]
68
+ }, {
69
+ default: u(() => [
70
+ t(d, {
71
+ value: e.configData.extended,
72
+ "onUpdate:value": a[4] || (a[4] = (l) => e.configData.extended = l),
73
+ placeholder: "",
74
+ rows: 5
75
+ }, null, 8, ["value"])
76
+ ]),
77
+ _: 1
78
+ })
79
+ ]),
80
+ _: 1
81
+ }, 8, ["model"]);
82
+ };
83
+ }
84
+ });
85
+ export {
86
+ x as default
87
+ };
@@ -0,0 +1,92 @@
1
+ import { defineComponent as _, resolveComponent as o, openBlock as n, createBlock as l, withCtx as i, createElementBlock as u, Fragment as d, renderList as r, createVNode as k, createTextVNode as x, toDisplayString as D, createCommentVNode as w } from "vue";
2
+ import { u as U } from "./index-e7099870.js";
3
+ const L = /* @__PURE__ */ _({
4
+ __name: "Label-删除",
5
+ props: {
6
+ configData: {
7
+ type: Object,
8
+ default: {}
9
+ }
10
+ },
11
+ setup(a) {
12
+ U();
13
+ const p = [
14
+ { title: "标题", bind: "name", type: "input", placeholder: "" },
15
+ { title: "key", bind: "key", type: "input", placeholder: "" },
16
+ { title: "是否必填", bind: "required", type: "switch", placeholder: "" },
17
+ { title: "大小", bind: "font", type: "inputnumber", placeholder: "" },
18
+ { title: "颜色", bind: "color", type: "input", placeholder: "" },
19
+ {
20
+ title: "位置",
21
+ bind: "align",
22
+ type: "radiogroup",
23
+ children: [
24
+ { title: "居左", value: "left" },
25
+ { title: "居中", value: "center" },
26
+ { title: "居右", value: "right" }
27
+ ]
28
+ },
29
+ { title: "样式扩展", bind: "cssextended", type: "textarea", placeholder: "" },
30
+ { title: "扩展", bind: "extended", type: "textarea", placeholder: "", rows: "5" }
31
+ ];
32
+ return (C, c) => {
33
+ const f = o("a-input"), b = o("a-textarea"), v = o("a-input-number"), y = o("a-radio-button"), g = o("a-radio-group"), m = o("a-switch"), s = o("a-form-item"), h = o("a-form");
34
+ return n(), l(h, {
35
+ layout: "vertical",
36
+ model: a.configData,
37
+ autocomplete: "off"
38
+ }, {
39
+ default: i(() => [
40
+ (n(), u(d, null, r(p, (e, B) => k(s, {
41
+ label: e.title
42
+ }, {
43
+ default: i(() => [
44
+ e.type == "input" ? (n(), l(f, {
45
+ key: 0,
46
+ value: a.configData[e.bind],
47
+ "onUpdate:value": (t) => a.configData[e.bind] = t
48
+ }, null, 8, ["value", "onUpdate:value"])) : e.type == "textarea" ? (n(), l(b, {
49
+ key: 1,
50
+ value: a.configData[e.bind],
51
+ "onUpdate:value": (t) => a.configData[e.bind] = t,
52
+ placeholder: "",
53
+ rows: e.rows
54
+ }, null, 8, ["value", "onUpdate:value", "rows"])) : e.type == "inputnumber" ? (n(), l(v, {
55
+ key: 2,
56
+ value: a.configData[e.bind],
57
+ "onUpdate:value": (t) => a.configData[e.bind] = t,
58
+ min: 12,
59
+ max: 80
60
+ }, null, 8, ["value", "onUpdate:value"])) : e.type == "radiogroup" ? (n(), l(g, {
61
+ key: 3,
62
+ value: a.configData.align,
63
+ "onUpdate:value": c[0] || (c[0] = (t) => a.configData.align = t)
64
+ }, {
65
+ default: i(() => [
66
+ (n(!0), u(d, null, r(e.children, (t, N) => (n(), l(y, {
67
+ value: t.value
68
+ }, {
69
+ default: i(() => [
70
+ x(D(t.title), 1)
71
+ ]),
72
+ _: 2
73
+ }, 1032, ["value"]))), 256))
74
+ ]),
75
+ _: 2
76
+ }, 1032, ["value"])) : e.type == "switch" ? (n(), l(m, {
77
+ key: 4,
78
+ checked: a.configData[e.bind],
79
+ "onUpdate:checked": (t) => a.configData[e.bind] = t
80
+ }, null, 8, ["checked", "onUpdate:checked"])) : w("", !0)
81
+ ]),
82
+ _: 2
83
+ }, 1032, ["label"])), 64))
84
+ ]),
85
+ _: 1
86
+ }, 8, ["model"]);
87
+ };
88
+ }
89
+ });
90
+ export {
91
+ L as default
92
+ };
@@ -0,0 +1,10 @@
1
+ import { p as r } from "./index-e7099870.js";
2
+ import "vue";
3
+ const t = {};
4
+ function c(e, n) {
5
+ return "我是登录页";
6
+ }
7
+ const s = /* @__PURE__ */ r(t, [["render", c]]);
8
+ export {
9
+ s as default
10
+ };
@@ -0,0 +1,62 @@
1
+ import { defineComponent, ref, openBlock, createBlock, unref } from "vue";
2
+ import { u as useFormStore, k as useDataStore, l as generateHtml, g as getData, n as defHttp, p as _export_sfc } from "./index-e7099870.js";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "Preview0925",
5
+ setup(__props) {
6
+ const formStore = useFormStore(), dataStore = useDataStore();
7
+ dataStore.getSelectData;
8
+ let list = ref(formStore.formData.config.eventScript);
9
+ const generateData = generateHtml(formStore.formData.list), columns = [...generateData.columns];
10
+ let viewData = ref({});
11
+ const generateForm = defineComponent({
12
+ template: generateData.html,
13
+ props: {
14
+ message: String
15
+ },
16
+ setup(props) {
17
+ let formData = ref([]), datalist = ref([]);
18
+ debugger;
19
+ viewData.value = getData();
20
+ const tableData = formStore.formData.list.filter((e) => e.type == "table"), ilength = tableData.length;
21
+ let pagination;
22
+ ilength > 0 && tableData[0].options.pagination && (pagination = ref({
23
+ total: 0,
24
+ current: 1,
25
+ pageSize: tableData[0].options.pageSize
26
+ }));
27
+ const events = {};
28
+ return generateTs(), {
29
+ formData,
30
+ pagination,
31
+ datalist,
32
+ columns,
33
+ viewData,
34
+ // bdc_djzb1,
35
+ ...events,
36
+ defHttp,
37
+ onChange
38
+ };
39
+ function onChange(e, t) {
40
+ pagination.value = e, t();
41
+ }
42
+ function generateTs() {
43
+ for (let e = 0; e < list.value.length; e++) {
44
+ const t = list.value[e];
45
+ events[t.name] = newFunction(t);
46
+ }
47
+ }
48
+ function newFunction(_data) {
49
+ return _data.param != "" ? (params) => {
50
+ eval(_data.func);
51
+ } : () => {
52
+ eval(_data.func);
53
+ };
54
+ }
55
+ }
56
+ });
57
+ return (e, t) => (openBlock(), createBlock(unref(generateForm)));
58
+ }
59
+ }), Preview0925_vue_vue_type_style_index_0_scoped_5efa836a_lang = "", Preview0925 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5efa836a"]]);
60
+ export {
61
+ Preview0925 as default
62
+ };
@@ -0,0 +1,6 @@
1
+ import { _ as o } from "./PreviewDemo.vue_vue_type_script_setup_true_lang-80d6e20c.js";
2
+ import "vue";
3
+ import "./index-e7099870.js";
4
+ export {
5
+ o as default
6
+ };