qmw-form-design 0.0.1
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 +7 -0
- package/lib/cascaderWidget-C4dPsqu5.js +35 -0
- package/lib/cascaderWidget-CZXbv3tO.cjs +1 -0
- package/lib/checkboxWidget-BaFz4odQ.cjs +1 -0
- package/lib/checkboxWidget-CU0seXqA.js +39 -0
- package/lib/datetimeWidget-BRI1k9lz.cjs +1 -0
- package/lib/datetimeWidget-DXuUUSdH.js +32 -0
- package/lib/dyTableWidget-B9g29K4R.cjs +1 -0
- package/lib/dyTableWidget-gQzE59m3.js +66 -0
- package/lib/formDesign-B7SQJxxh.cjs +157750 -0
- package/lib/formDesign-DTFgobCL.js +273574 -0
- package/lib/groupWidget-VmZtc9Bs.js +74 -0
- package/lib/groupWidget-y9fvpsYp.cjs +1 -0
- package/lib/labelWidget-S3O3hW-n.js +28 -0
- package/lib/labelWidget-mp6MkWZ4.cjs +1 -0
- package/lib/numberWidget-C3bkkH0P.js +32 -0
- package/lib/numberWidget-ok9nP1sB.cjs +1 -0
- package/lib/qmw-form-design.cjs +1 -0
- package/lib/qmw-form-design.css +1 -0
- package/lib/qmw-form-design.js +4 -0
- package/lib/radioWidget-Bj9O6GMx.js +39 -0
- package/lib/radioWidget-ClJWGKCx.cjs +1 -0
- package/lib/richEditorWidget-CW_rXEl7.js +20878 -0
- package/lib/richEditorWidget-D4LHcpPx.cjs +186 -0
- package/lib/rowColWidget-B3c6NEpV.cjs +1 -0
- package/lib/rowColWidget-DpxxCDFU.js +85 -0
- package/lib/selectWidget-2a60eLQg.cjs +1 -0
- package/lib/selectWidget-BbLn1CnV.js +35 -0
- package/lib/switchWidget-Dq8pR_eI.js +31 -0
- package/lib/switchWidget-H424ausN.cjs +1 -0
- package/lib/tableWidget-CdLLoEqJ.cjs +1 -0
- package/lib/tableWidget-QyvH8FlO.js +100 -0
- package/lib/textWidget-BYYSe1Ad.cjs +1 -0
- package/lib/textWidget-CGDnbqCG.js +31 -0
- package/lib/textareaWidget-BU6qvVd6.js +31 -0
- package/lib/textareaWidget-CwWBNrZR.cjs +1 -0
- package/lib/treeWidget-D4GFodhm.cjs +1 -0
- package/lib/treeWidget-MJEuA8BS.js +35 -0
- package/lib/uploadWidget-B18wnHTt.js +31 -0
- package/lib/uploadWidget-D_4p14VX.cjs +1 -0
- package/lib/vite.svg +1 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Vue 3 + Vite
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
+
|
|
5
|
+
## Recommended IDE Setup
|
|
6
|
+
|
|
7
|
+
- [VS Code](https://code.visualstudio.com/) + [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (previously Volar) and disable Vetur
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { computed as n, onMounted as d, createElementBlock as i, openBlock as o, Fragment as r, createElementVNode as s, normalizeStyle as a, toDisplayString as y } from "vue";
|
|
2
|
+
const p = {
|
|
3
|
+
__name: "cascaderWidget",
|
|
4
|
+
props: {
|
|
5
|
+
//组件对象
|
|
6
|
+
widget: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default: () => ({})
|
|
9
|
+
},
|
|
10
|
+
style: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => ({})
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(t) {
|
|
16
|
+
const e = t, c = n(() => {
|
|
17
|
+
let l = { ...e.style };
|
|
18
|
+
return e.style && e.style.width && e.style.width != "" || (l.width = "100px"), l;
|
|
19
|
+
});
|
|
20
|
+
return d(() => {
|
|
21
|
+
}), (l, u) => (o(), i(r, null, [
|
|
22
|
+
s("label", {
|
|
23
|
+
style: a(t.widget.labelStyle),
|
|
24
|
+
class: "widget-label"
|
|
25
|
+
}, y(t.widget.config.label), 5),
|
|
26
|
+
s("select", {
|
|
27
|
+
style: a(c.value),
|
|
28
|
+
disabled: ""
|
|
29
|
+
}, null, 4)
|
|
30
|
+
], 64));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
p as default
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n={__name:"cascaderWidget",props:{widget:{type:Object,default:()=>({})},style:{type:Object,default:()=>({})}},setup(l){const t=l,c=e.computed(()=>{let a={...t.style};return t.style&&t.style.width&&t.style.width!=""||(a.width="100px"),a});return e.onMounted(()=>{}),(a,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("label",{style:e.normalizeStyle(l.widget.labelStyle),class:"widget-label"},e.toDisplayString(l.widget.config.label),5),e.createElementVNode("select",{style:e.normalizeStyle(c.value),disabled:""},null,4)],64))}};exports.default=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n={__name:"checkboxWidget",props:{widget:{type:Object,default:()=>({})},style:{type:Object,default:()=>({})}},setup(t){return e.onMounted(()=>{}),(c,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("label",{style:e.normalizeStyle(t.widget.labelStyle),class:"widget-label"},e.toDisplayString(t.widget.config.label),5),e.createElementVNode("span",null,[l[0]||(l[0]=e.createElementVNode("input",{type:"checkbox",id:"checkbox",value:"checkbox",disabled:""},null,-1)),e.createElementVNode("label",{for:"checkbox",style:e.normalizeStyle(t.style)},"复选框",4)])],64))}};exports.default=n;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { onMounted as c, createElementBlock as n, openBlock as o, Fragment as i, createElementVNode as e, normalizeStyle as a, toDisplayString as b } from "vue";
|
|
2
|
+
const s = {
|
|
3
|
+
__name: "checkboxWidget",
|
|
4
|
+
props: {
|
|
5
|
+
//组件对象
|
|
6
|
+
widget: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default: () => ({})
|
|
9
|
+
},
|
|
10
|
+
style: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => ({})
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(t) {
|
|
16
|
+
return c(() => {
|
|
17
|
+
}), (d, l) => (o(), n(i, null, [
|
|
18
|
+
e("label", {
|
|
19
|
+
style: a(t.widget.labelStyle),
|
|
20
|
+
class: "widget-label"
|
|
21
|
+
}, b(t.widget.config.label), 5),
|
|
22
|
+
e("span", null, [
|
|
23
|
+
l[0] || (l[0] = e("input", {
|
|
24
|
+
type: "checkbox",
|
|
25
|
+
id: "checkbox",
|
|
26
|
+
value: "checkbox",
|
|
27
|
+
disabled: ""
|
|
28
|
+
}, null, -1)),
|
|
29
|
+
e("label", {
|
|
30
|
+
for: "checkbox",
|
|
31
|
+
style: a(t.style)
|
|
32
|
+
}, "复选框", 4)
|
|
33
|
+
])
|
|
34
|
+
], 64));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
s as default
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l={__name:"datetimeWidget",props:{widget:{type:Object,default:()=>({})},style:{type:Object,default:()=>({})}},setup(t){return e.onMounted(()=>{}),(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("label",{style:e.normalizeStyle(t.widget.labelStyle),class:"widget-label"},e.toDisplayString(t.widget.config.label),5),e.createElementVNode("input",{style:e.normalizeStyle(t.style),disabled:"",type:"date"},null,4)],64))}};exports.default=l;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { onMounted as a, createElementBlock as n, openBlock as d, Fragment as i, createElementVNode as t, normalizeStyle as l, toDisplayString as c } from "vue";
|
|
2
|
+
const u = {
|
|
3
|
+
__name: "datetimeWidget",
|
|
4
|
+
props: {
|
|
5
|
+
//组件对象
|
|
6
|
+
widget: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default: () => ({})
|
|
9
|
+
},
|
|
10
|
+
style: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => ({})
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(e) {
|
|
16
|
+
return a(() => {
|
|
17
|
+
}), (o, r) => (d(), n(i, null, [
|
|
18
|
+
t("label", {
|
|
19
|
+
style: l(e.widget.labelStyle),
|
|
20
|
+
class: "widget-label"
|
|
21
|
+
}, c(e.widget.config.label), 5),
|
|
22
|
+
t("input", {
|
|
23
|
+
style: l(e.style),
|
|
24
|
+
disabled: "",
|
|
25
|
+
type: "date"
|
|
26
|
+
}, null, 4)
|
|
27
|
+
], 64));
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
u as default
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./formDesign-B7SQJxxh.cjs"),a={style:{"min-height":"60px",border:"1px solid #e8eaec","border-style":"dashed","border-radius":"4px"}},c=["onClick"],u={__name:"dyTableWidget",props:e.mergeModels({style:{type:Object,default:()=>({})}},{widget:{},widgetModifiers:{}}),emits:["update:widget"],setup(r){const l=e.useModel(r,"widget"),n=window.$formDesignerStore;return e.onMounted(()=>{}),(m,o)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(r.style),class:"dyTable-widget"},[e.createElementVNode("div",{style:e.normalizeStyle(l.value.labelStyle)},e.toDisplayString(l.value.config.label),5),e.createElementVNode("div",a,[e.createVNode(e.unref(i.lo),{modelValue:l.value.children,"onUpdate:modelValue":o[0]||(o[0]=t=>l.value.children=t),animation:"150",group:"formContainer",onAdd:o[1]||(o[1]=t=>{e.unref(n).addWidget(t,l.value.children,l.value)}),onEnd:e.unref(n).saveHistoryStep,style:{"min-height":"30px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value.children,(t,d)=>(e.openBlock(),e.createElementBlock("div",{key:t.type,onClick:e.withModifiers(s=>{e.unref(n).onClickFormWidget(s,t)},["stop"]),class:e.normalizeClass(["widget-div",e.unref(n).setAreaClass(t)])},[e.createVNode(i._sfc_main,{widget:t},null,8,["widget"]),e.createVNode(i._sfc_main$1,{widget:t,widgetList:t.children,widgetIndex:d,pWidget:t},null,8,["widget","widgetList","widgetIndex","pWidget"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{widget:t,style:e.normalizeStyle(t.style)},null,8,["widget","style"]))],10,c))),128))]),_:1},8,["modelValue","onEnd"])])],4))}};exports.default=u;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { mergeModels as g, useModel as p, onMounted as y, createElementBlock as n, openBlock as o, normalizeStyle as s, createElementVNode as u, toDisplayString as f, createVNode as r, unref as l, withCtx as v, Fragment as w, renderList as h, normalizeClass as _, withModifiers as x, createBlock as b, resolveDynamicComponent as C } from "vue";
|
|
2
|
+
import { l as k, _ as S, a as M } from "./formDesign-DTFgobCL.js";
|
|
3
|
+
const V = { style: { "min-height": "60px", border: "1px solid #e8eaec", "border-style": "dashed", "border-radius": "4px" } }, W = ["onClick"], L = {
|
|
4
|
+
__name: "dyTableWidget",
|
|
5
|
+
props: /* @__PURE__ */ g({
|
|
6
|
+
style: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default: () => ({})
|
|
9
|
+
}
|
|
10
|
+
}, {
|
|
11
|
+
widget: {},
|
|
12
|
+
widgetModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: ["update:widget"],
|
|
15
|
+
setup(a) {
|
|
16
|
+
const t = p(a, "widget"), i = window.$formDesignerStore;
|
|
17
|
+
return y(() => {
|
|
18
|
+
}), (D, d) => (o(), n("div", {
|
|
19
|
+
style: s(a.style),
|
|
20
|
+
class: "dyTable-widget"
|
|
21
|
+
}, [
|
|
22
|
+
u("div", {
|
|
23
|
+
style: s(t.value.labelStyle)
|
|
24
|
+
}, f(t.value.config.label), 5),
|
|
25
|
+
u("div", V, [
|
|
26
|
+
r(l(k), {
|
|
27
|
+
modelValue: t.value.children,
|
|
28
|
+
"onUpdate:modelValue": d[0] || (d[0] = (e) => t.value.children = e),
|
|
29
|
+
animation: "150",
|
|
30
|
+
group: "formContainer",
|
|
31
|
+
onAdd: d[1] || (d[1] = (e) => {
|
|
32
|
+
l(i).addWidget(e, t.value.children, t.value);
|
|
33
|
+
}),
|
|
34
|
+
onEnd: l(i).saveHistoryStep,
|
|
35
|
+
style: { "min-height": "30px" }
|
|
36
|
+
}, {
|
|
37
|
+
default: v(() => [
|
|
38
|
+
(o(!0), n(w, null, h(t.value.children, (e, m) => (o(), n("div", {
|
|
39
|
+
key: e.type,
|
|
40
|
+
onClick: x((c) => {
|
|
41
|
+
l(i).onClickFormWidget(c, e);
|
|
42
|
+
}, ["stop"]),
|
|
43
|
+
class: _(["widget-div", l(i).setAreaClass(e)])
|
|
44
|
+
}, [
|
|
45
|
+
r(S, { widget: e }, null, 8, ["widget"]),
|
|
46
|
+
r(M, {
|
|
47
|
+
widget: e,
|
|
48
|
+
widgetList: e.children,
|
|
49
|
+
widgetIndex: m,
|
|
50
|
+
pWidget: e
|
|
51
|
+
}, null, 8, ["widget", "widgetList", "widgetIndex", "pWidget"]),
|
|
52
|
+
(o(), b(C(e.widgetType), {
|
|
53
|
+
widget: e,
|
|
54
|
+
style: s(e.style)
|
|
55
|
+
}, null, 8, ["widget", "style"]))
|
|
56
|
+
], 10, W))), 128))
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
}, 8, ["modelValue", "onEnd"])
|
|
60
|
+
])
|
|
61
|
+
], 4));
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
L as default
|
|
66
|
+
};
|