form-imagining 0.0.8 → 0.0.10

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 +14 -10
  2. package/dist/App-582d222a.js +19 -0
  3. package/dist/Code-00aafa9e.js +5 -0
  4. package/dist/Col-5be36e54.js +5 -0
  5. package/dist/Demo-2a569109.js +110 -0
  6. package/dist/Demo-db5db15e.js +45 -0
  7. package/dist/Form-40f53810.js +37 -0
  8. package/dist/Form-7d97e68c.js +5 -0
  9. package/dist/FormPublic-145abd9c.js +5 -0
  10. package/dist/GenerateForm-5b9d698f.js +5 -0
  11. package/dist/Grid-66caa91a.js +5 -0
  12. package/dist/Input-/345/210/240/351/231/244-981120fa.js +87 -0
  13. package/dist/Label-/345/210/240/351/231/244-8e5c3221.js +92 -0
  14. package/dist/Login-e3500f10.js +10 -0
  15. package/dist/Preview0925-26b91216.js +62 -0
  16. package/dist/PreviewDemo-f30a04fb.js +6 -0
  17. package/dist/PreviewDemo.vue_vue_type_script_setup_true_lang-f2a6a58f.js +284 -0
  18. package/dist/PreviewDemo2-c6a79bd8.js +6 -0
  19. package/dist/PreviewDemo2.vue_vue_type_script_setup_true_lang-1b01db1f.js +88 -0
  20. package/dist/PreviewDemo3-fc5a464d.js +82 -0
  21. package/dist/Properties-d06bae9c.js +5 -0
  22. package/dist/SqlModule-e8122c06.js +5 -0
  23. package/dist/Table-56848a04.js +5 -0
  24. package/dist/cTable-2b06f230.js +5 -0
  25. package/dist/{cssMode-0bcb1554.js → cssMode-64c38559.js} +1 -1
  26. package/dist/form-imagining.js +1 -1
  27. package/dist/form-imagining.umd.cjs +248 -241
  28. package/dist/{freemarker2-4d8e8e55.js → freemarker2-e29ac05c.js} +1 -1
  29. package/dist/{handlebars-c43672f7.js → handlebars-3a69964b.js} +1 -1
  30. package/dist/{html-c6099a2e.js → html-7e6b5080.js} +1 -1
  31. package/dist/{htmlMode-31c10440.js → htmlMode-91ec4732.js} +1 -1
  32. package/dist/index-4951ecdd.js +10 -0
  33. package/dist/{index-a3197e12.js → index-63ec87eb.js} +46931 -17472
  34. package/dist/{javascript-ac2b4ae2.js → javascript-cb2c1f0f.js} +2 -2
  35. package/dist/{jsonMode-36333022.js → jsonMode-175a8345.js} +1 -1
  36. package/dist/{liquid-b5021331.js → liquid-c7803709.js} +1 -1
  37. package/dist/{mdx-bbae5f86.js → mdx-83e04ffb.js} +1 -1
  38. package/dist/modalDemo-75711c3e.js +53 -0
  39. package/dist/{python-fc373d9f.js → python-ffb873a6.js} +1 -1
  40. package/dist/{razor-1e9d135a.js → razor-8e0247c8.js} +1 -1
  41. package/dist/style.css +1 -1
  42. package/dist/{tsMode-ea3b05db.js → tsMode-b179d0a8.js} +1 -1
  43. package/dist/{typescript-b2ef5e0f.js → typescript-f905a417.js} +1 -1
  44. package/dist/{xml-579a5775.js → xml-47e97e4c.js} +1 -1
  45. package/dist/{yaml-c31c56b7.js → yaml-be1cdd02.js} +1 -1
  46. package/package.json +1 -1
package/README.md CHANGED
@@ -1,13 +1,17 @@
1
1
  # Vue 3 + TypeScript + Vite 基础框架
2
2
  `
3
3
  提供基础的前端开发框架、在线表单FormImagining、
4
- 组件列表
5
- --CImaginForm 表单设计工具
6
- 0.0.1
7
- 1、增加了isList 区别绑定的数据源类型
8
- 2、优化样式
9
- `
10
- ##
11
- 提供基础的框架
12
- 测试
13
- 代码编辑器:monaco-editor
4
+ CImaginForm 表单设计工具
5
+ ##更新日志
6
+ --
7
+ 0.0.7
8
+ 1. 增加了isList 区别绑定的数据源类型
9
+ 2. 优化样式
10
+
11
+ 0.0.8
12
+ 1. 表单设计器增加id参数
13
+
14
+ 0.0.10
15
+ 1. 栅格组件增加删除
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-63ec87eb.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-63ec87eb.js";
2
+ import "vue";
3
+ export {
4
+ a as default
5
+ };
@@ -0,0 +1,5 @@
1
+ import { d as m } from "./index-63ec87eb.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-63ec87eb.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-63ec87eb.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,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 { e as m } from "./index-63ec87eb.js";
2
+ import "vue";
3
+ export {
4
+ m as default
5
+ };
@@ -0,0 +1,5 @@
1
+ import { _ as m } from "./index-63ec87eb.js";
2
+ import "vue";
3
+ export {
4
+ m as default
5
+ };
@@ -0,0 +1,5 @@
1
+ import { b as m } from "./index-63ec87eb.js";
2
+ import "vue";
3
+ export {
4
+ m as default
5
+ };
@@ -0,0 +1,5 @@
1
+ import { f } from "./index-63ec87eb.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-63ec87eb.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-63ec87eb.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-63ec87eb.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-63ec87eb.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-f2a6a58f.js";
2
+ import "vue";
3
+ import "./index-63ec87eb.js";
4
+ export {
5
+ o as default
6
+ };