@duxweb/dvha-pro 1.0.25 → 1.0.26
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/dist/cjs/component.cjs +1 -1
- package/dist/cjs/components/chart/echart.cjs +1 -1
- package/dist/cjs/components/crop/imageCrop.cjs +1 -1
- package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
- package/dist/cjs/components/data/selectModal.cjs +1 -1
- package/dist/cjs/components/designEditor/components/grid.cjs +1 -0
- package/dist/cjs/components/designEditor/editor/hook.cjs +1 -0
- package/dist/cjs/components/designEditor/editor/preview.cjs +1 -0
- package/dist/cjs/components/designEditor/editor/setting.cjs +1 -0
- package/dist/cjs/components/designEditor/editor.cjs +1 -0
- package/dist/cjs/components/form/drawerForm.cjs +1 -1
- package/dist/cjs/components/form/formItem.cjs +1 -1
- package/dist/cjs/components/form/formLayout.cjs +1 -1
- package/dist/cjs/components/form/modalForm.cjs +1 -1
- package/dist/cjs/components/form/pageForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/formEditor/base/base.cjs +1 -0
- package/dist/cjs/components/formEditor/base/json.cjs +1 -0
- package/dist/cjs/components/formEditor/base/options.cjs +1 -0
- package/dist/cjs/components/formEditor/base/setting.cjs +1 -0
- package/dist/cjs/components/formEditor/components/cascader.cjs +1 -0
- package/dist/cjs/components/formEditor/components/cascaderAsync.cjs +1 -0
- package/dist/cjs/components/formEditor/components/checkbox.cjs +1 -0
- package/dist/cjs/components/formEditor/components/color.cjs +1 -0
- package/dist/cjs/components/formEditor/components/date.cjs +1 -0
- package/dist/cjs/components/formEditor/components/dynamicInput.cjs +1 -0
- package/dist/cjs/components/formEditor/components/dynamicTags.cjs +1 -0
- package/dist/cjs/components/formEditor/components/editor.cjs +1 -0
- package/dist/cjs/components/formEditor/components/input.cjs +1 -0
- package/dist/cjs/components/formEditor/components/inputNumber.cjs +1 -0
- package/dist/cjs/components/formEditor/components/mentionAsync.cjs +1 -0
- package/dist/cjs/components/formEditor/components/radio.cjs +1 -0
- package/dist/cjs/components/formEditor/components/region.cjs +1 -0
- package/dist/cjs/components/formEditor/components/select.cjs +1 -0
- package/dist/cjs/components/formEditor/components/selectAsync.cjs +1 -0
- package/dist/cjs/components/formEditor/components/sider.cjs +1 -0
- package/dist/cjs/components/formEditor/components/switch.cjs +1 -0
- package/dist/cjs/components/formEditor/components/time.cjs +1 -0
- package/dist/cjs/components/formEditor/components/transferAsync.cjs +1 -0
- package/dist/cjs/components/formEditor/components/treeSelect.cjs +1 -0
- package/dist/cjs/components/formEditor/components/treeSelectAsync.cjs +1 -0
- package/dist/cjs/components/formEditor/editor.cjs +1 -0
- package/dist/cjs/components/formEditor/json.cjs +1 -0
- package/dist/cjs/components/formEditor/preview.cjs +1 -0
- package/dist/cjs/components/formEditor/renderer.cjs +1 -0
- package/dist/cjs/components/icon/icon.cjs +1 -1
- package/dist/cjs/components/layout/grid.cjs +1 -0
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/level/level.cjs +1 -1
- package/dist/cjs/components/posterEditor/pages/RightPanel.cjs +1 -0
- package/dist/cjs/components/posterEditor/posterEditor.cjs +1 -0
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/cjs/components/upload/file.cjs +1 -1
- package/dist/cjs/components/upload/image.cjs +1 -1
- package/dist/cjs/components/upload/manage/item.cjs +1 -1
- package/dist/cjs/components/upload/manager.cjs +1 -1
- package/dist/cjs/hooks/dialog.cjs +1 -1
- package/dist/cjs/hooks/drawer.cjs +1 -1
- package/dist/cjs/hooks/modal.cjs +1 -1
- package/dist/cjs/hooks/table/image.cjs +1 -1
- package/dist/cjs/hooks/table/media.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/langs/en-US.json.cjs +1 -1
- package/dist/cjs/langs/zh-CN.json.cjs +1 -1
- package/dist/cjs/pages/authLayout.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/pages/login.cjs +1 -1
- package/dist/cjs/pages/menu/avatar.cjs +1 -1
- package/dist/cjs/pages/menu/button.cjs +1 -1
- package/dist/cjs/pages/menu/cmd.cjs +1 -1
- package/dist/cjs/pages/menu/main.cjs +1 -1
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/pages/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +34 -2
- package/dist/esm/component.js +33 -31
- package/dist/esm/components/chart/echart.js +6 -5
- package/dist/esm/components/crop/imageCrop.js +7 -6
- package/dist/esm/components/data/dynamicSelect.js +8 -7
- package/dist/esm/components/data/selectModal.js +6 -5
- package/dist/esm/components/designEditor/components/grid.js +175 -0
- package/dist/esm/components/designEditor/editor/hook.js +87 -0
- package/dist/esm/components/designEditor/editor/preview.js +65 -0
- package/dist/esm/components/designEditor/editor/setting.js +98 -0
- package/dist/esm/components/designEditor/editor.js +161 -0
- package/dist/esm/components/form/drawerForm.js +8 -7
- package/dist/esm/components/form/formItem.js +33 -33
- package/dist/esm/components/form/formLayout.js +11 -11
- package/dist/esm/components/form/modalForm.js +18 -17
- package/dist/esm/components/form/pageForm.js +11 -10
- package/dist/esm/components/form/settingForm.js +5 -4
- package/dist/esm/components/formEditor/base/base.js +117 -0
- package/dist/esm/components/formEditor/base/json.js +39 -0
- package/dist/esm/components/formEditor/base/options.js +48 -0
- package/dist/esm/components/formEditor/base/setting.js +108 -0
- package/dist/esm/components/formEditor/components/cascader.js +219 -0
- package/dist/esm/components/formEditor/components/cascaderAsync.js +213 -0
- package/dist/esm/components/formEditor/components/checkbox.js +212 -0
- package/dist/esm/components/formEditor/components/color.js +156 -0
- package/dist/esm/components/formEditor/components/date.js +197 -0
- package/dist/esm/components/formEditor/components/dynamicInput.js +227 -0
- package/dist/esm/components/formEditor/components/dynamicTags.js +150 -0
- package/dist/esm/components/formEditor/components/editor.js +139 -0
- package/dist/esm/components/formEditor/components/input.js +211 -0
- package/dist/esm/components/formEditor/components/inputNumber.js +188 -0
- package/dist/esm/components/formEditor/components/mentionAsync.js +180 -0
- package/dist/esm/components/formEditor/components/radio.js +212 -0
- package/dist/esm/components/formEditor/components/region.js +167 -0
- package/dist/esm/components/formEditor/components/select.js +203 -0
- package/dist/esm/components/formEditor/components/selectAsync.js +214 -0
- package/dist/esm/components/formEditor/components/sider.js +168 -0
- package/dist/esm/components/formEditor/components/switch.js +153 -0
- package/dist/esm/components/formEditor/components/time.js +171 -0
- package/dist/esm/components/formEditor/components/transferAsync.js +193 -0
- package/dist/esm/components/formEditor/components/treeSelect.js +207 -0
- package/dist/esm/components/formEditor/components/treeSelectAsync.js +179 -0
- package/dist/esm/components/formEditor/editor.js +162 -0
- package/dist/esm/components/formEditor/json.js +24 -0
- package/dist/esm/components/formEditor/preview.js +38 -0
- package/dist/esm/components/formEditor/renderer.js +151 -0
- package/dist/esm/components/icon/icon.js +7 -6
- package/dist/esm/components/layout/grid.js +24 -0
- package/dist/esm/components/layout/list.js +17 -16
- package/dist/esm/components/layout/table.js +15 -14
- package/dist/esm/components/level/level.js +6 -5
- package/dist/esm/components/{image → posterEditor}/pages/RightPanel.js +5 -4
- package/dist/esm/components/{image → posterEditor}/posterEditor.js +5 -4
- package/dist/esm/components/table/table.js +6 -5
- package/dist/esm/components/upload/file.js +10 -9
- package/dist/esm/components/upload/image.js +16 -15
- package/dist/esm/components/upload/manage/item.js +6 -5
- package/dist/esm/components/upload/manager.js +6 -5
- package/dist/esm/hooks/dialog.js +7 -6
- package/dist/esm/hooks/drawer.js +7 -6
- package/dist/esm/hooks/modal.js +6 -5
- package/dist/esm/hooks/table/image.js +6 -5
- package/dist/esm/hooks/table/media.js +6 -5
- package/dist/esm/index.js +218 -201
- package/dist/esm/langs/en-US.json.js +10 -10
- package/dist/esm/langs/zh-CN.json.js +8 -8
- package/dist/esm/pages/authLayout.js +7 -6
- package/dist/esm/pages/layout/page.js +6 -5
- package/dist/esm/pages/login.js +6 -5
- package/dist/esm/pages/menu/avatar.js +11 -10
- package/dist/esm/pages/menu/button.js +6 -5
- package/dist/esm/pages/menu/cmd.js +6 -5
- package/dist/esm/pages/menu/main.js +6 -5
- package/dist/esm/pages/menu/mobile.js +6 -5
- package/dist/esm/pages/page404.js +4 -3
- package/dist/esm/pages/pageStatus.js +9 -8
- package/dist/esm/theme/uno.css.js +34 -2
- package/dist/types/components/designEditor/components/grid.d.ts +2 -0
- package/dist/types/components/designEditor/components/index.d.ts +1 -0
- package/dist/types/components/designEditor/editor/hook.d.ts +57 -0
- package/dist/types/components/designEditor/editor/index.d.ts +3 -0
- package/dist/types/components/designEditor/editor/preview.d.ts +15 -0
- package/dist/types/components/designEditor/editor/setting.d.ts +14 -0
- package/dist/types/components/designEditor/editor.d.ts +19 -0
- package/dist/types/components/designEditor/index.d.ts +3 -0
- package/dist/types/components/form/drawerForm.d.ts +2 -2
- package/dist/types/components/form/formLayout.d.ts +2 -2
- package/dist/types/components/form/modalForm.d.ts +2 -2
- package/dist/types/components/formEditor/base/base.d.ts +26 -0
- package/dist/types/components/formEditor/base/index.d.ts +4 -0
- package/dist/types/components/formEditor/base/json.d.ts +18 -0
- package/dist/types/components/formEditor/base/options.d.ts +23 -0
- package/dist/types/components/formEditor/base/setting.d.ts +13 -0
- package/dist/types/components/formEditor/components/cascader.d.ts +2 -0
- package/dist/types/components/formEditor/components/cascaderAsync.d.ts +2 -0
- package/dist/types/components/formEditor/components/checkbox.d.ts +2 -0
- package/dist/types/components/formEditor/components/color.d.ts +2 -0
- package/dist/types/components/formEditor/components/date.d.ts +2 -0
- package/dist/types/components/formEditor/components/dynamicInput.d.ts +2 -0
- package/dist/types/components/formEditor/components/dynamicTags.d.ts +2 -0
- package/dist/types/components/formEditor/components/editor.d.ts +2 -0
- package/dist/types/components/formEditor/components/index.d.ts +21 -0
- package/dist/types/components/formEditor/components/input.d.ts +2 -0
- package/dist/types/components/formEditor/components/inputNumber.d.ts +2 -0
- package/dist/types/components/formEditor/components/mentionAsync.d.ts +2 -0
- package/dist/types/components/formEditor/components/radio.d.ts +2 -0
- package/dist/types/components/formEditor/components/region.d.ts +2 -0
- package/dist/types/components/formEditor/components/select.d.ts +2 -0
- package/dist/types/components/formEditor/components/selectAsync.d.ts +2 -0
- package/dist/types/components/formEditor/components/sider.d.ts +2 -0
- package/dist/types/components/formEditor/components/switch.d.ts +2 -0
- package/dist/types/components/formEditor/components/time.d.ts +2 -0
- package/dist/types/components/formEditor/components/transferAsync.d.ts +2 -0
- package/dist/types/components/formEditor/components/treeSelect.d.ts +2 -0
- package/dist/types/components/formEditor/components/treeSelectAsync.d.ts +2 -0
- package/dist/types/components/formEditor/editor.d.ts +22 -0
- package/dist/types/components/formEditor/index.d.ts +2 -0
- package/dist/types/components/formEditor/json.d.ts +14 -0
- package/dist/types/components/formEditor/preview.d.ts +25 -0
- package/dist/types/components/formEditor/renderer.d.ts +58 -0
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/layout/filterLayout.d.ts +1 -1
- package/dist/types/components/layout/grid.d.ts +22 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/package.json +4 -3
- package/dist/cjs/components/image/pages/RightPanel.cjs +0 -1
- package/dist/cjs/components/image/posterEditor.cjs +0 -1
- /package/dist/cjs/components/{image → posterEditor}/components/CanvasRuler.cjs +0 -0
- /package/dist/cjs/components/{image → posterEditor}/elements/circle.cjs +0 -0
- /package/dist/cjs/components/{image → posterEditor}/elements/image.cjs +0 -0
- /package/dist/cjs/components/{image → posterEditor}/elements/index.cjs +0 -0
- /package/dist/cjs/components/{image → posterEditor}/elements/rect.cjs +0 -0
- /package/dist/cjs/components/{image → posterEditor}/elements/text.cjs +0 -0
- /package/dist/cjs/components/{image → posterEditor}/hooks/usePosterEditor.cjs +0 -0
- /package/dist/cjs/components/{image → posterEditor}/pages/LeftToolbar.cjs +0 -0
- /package/dist/cjs/components/{image → posterEditor}/pages/Panel.cjs +0 -0
- /package/dist/cjs/components/{image → posterEditor}/pages/PanelItem.cjs +0 -0
- /package/dist/esm/components/{image → posterEditor}/components/CanvasRuler.js +0 -0
- /package/dist/esm/components/{image → posterEditor}/elements/circle.js +0 -0
- /package/dist/esm/components/{image → posterEditor}/elements/image.js +0 -0
- /package/dist/esm/components/{image → posterEditor}/elements/index.js +0 -0
- /package/dist/esm/components/{image → posterEditor}/elements/rect.js +0 -0
- /package/dist/esm/components/{image → posterEditor}/elements/text.js +0 -0
- /package/dist/esm/components/{image → posterEditor}/hooks/usePosterEditor.js +0 -0
- /package/dist/esm/components/{image → posterEditor}/pages/LeftToolbar.js +0 -0
- /package/dist/esm/components/{image → posterEditor}/pages/Panel.js +0 -0
- /package/dist/esm/components/{image → posterEditor}/pages/PanelItem.js +0 -0
- /package/dist/types/components/{image → posterEditor}/components/CanvasRuler.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/components/index.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/elements/circle.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/elements/image.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/elements/index.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/elements/rect.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/elements/text.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/elements/types.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/hooks/index.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/hooks/usePosterEditor.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/index.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/pages/LeftToolbar.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/pages/Panel.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/pages/PanelItem.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/pages/RightPanel.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/pages/index.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/posterEditor.d.ts +0 -0
- /package/dist/types/components/{image → posterEditor}/types/editor.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { watchThrottled as
|
|
3
|
-
import { useField as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as h, toRef as y, computed as a, watch as q, inject as j, ref as u, createVNode as l, createTextVNode as S } from "vue";
|
|
2
|
+
import { watchThrottled as w } from "@vueuse/core";
|
|
3
|
+
import { useField as P } from "vee-validate";
|
|
4
|
+
const N = /* @__PURE__ */ h({
|
|
5
5
|
name: "DuxFormItem",
|
|
6
6
|
props: {
|
|
7
7
|
label: String,
|
|
@@ -24,64 +24,64 @@ const F = /* @__PURE__ */ b({
|
|
|
24
24
|
message: [String, Object]
|
|
25
25
|
},
|
|
26
26
|
setup(e, {
|
|
27
|
-
slots:
|
|
27
|
+
slots: s
|
|
28
28
|
}) {
|
|
29
|
-
const
|
|
29
|
+
const c = y(e.message), f = a(() => typeof e.rule == "object" ? {
|
|
30
30
|
...e.rule,
|
|
31
31
|
required: !!e.required
|
|
32
32
|
} : typeof e.rule == "string" ? e.rule?.includes("required") ? e.rule : e.rule ? `${e.rule}|required` : "required" : e.rule), {
|
|
33
|
-
errorMessage:
|
|
34
|
-
value:
|
|
35
|
-
setErrors:
|
|
33
|
+
errorMessage: d,
|
|
34
|
+
value: m,
|
|
35
|
+
setErrors: v,
|
|
36
36
|
validate: g
|
|
37
|
-
} =
|
|
37
|
+
} = P(e.path || "", f.value || {}, {
|
|
38
38
|
label: e.label
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
r &&
|
|
39
|
+
}), o = a(() => e.required ? !0 : e.rule ? typeof e.rule == "string" ? e.rule.includes("required") : typeof e.rule == "object" ? "required" in e.rule : !1 : !1), n = a(() => d.value && (c.value || d.value));
|
|
40
|
+
q(n, (r) => {
|
|
41
|
+
r && v(r);
|
|
42
42
|
}, {
|
|
43
43
|
immediate: !0
|
|
44
|
-
}),
|
|
44
|
+
}), w(m, (r) => {
|
|
45
45
|
r && g();
|
|
46
46
|
}, {
|
|
47
47
|
throttle: 300,
|
|
48
48
|
deep: !0
|
|
49
49
|
});
|
|
50
|
-
const i =
|
|
51
|
-
labelPlacement: "left",
|
|
52
|
-
labelAlign: "left",
|
|
53
|
-
labelWidth: 70,
|
|
54
|
-
divider: !1
|
|
55
|
-
}), t = a(() => e.labelPlacement || i.labelPlacement),
|
|
56
|
-
let r = e.labelWidth || i.labelWidth || 70;
|
|
50
|
+
const i = j("dux.form", {
|
|
51
|
+
labelPlacement: u("left"),
|
|
52
|
+
labelAlign: u("left"),
|
|
53
|
+
labelWidth: u(70),
|
|
54
|
+
divider: u(!1)
|
|
55
|
+
}), t = a(() => e.labelPlacement || i.labelPlacement.value), x = a(() => {
|
|
56
|
+
let r = e.labelWidth || i.labelWidth.value || 70;
|
|
57
57
|
return typeof r == "number" && (r = `${r}px`), t.value !== "left" ? "auto" : r;
|
|
58
|
-
}),
|
|
58
|
+
}), b = a(() => i.divider.value || t.value === "page");
|
|
59
59
|
return () => l("div", {
|
|
60
|
-
class: [t.value !== "top" ? "md:flex-row gap-2 lg:items-center" : "gap-1",
|
|
61
|
-
}, [l("div", {
|
|
62
|
-
class: [t.value === "left" ? "flex lg:items-center" : "", t.value === "left" && i.labelAlign === "right" ? "justify-end" : ""],
|
|
60
|
+
class: [t.value !== "top" ? "md:flex-row gap-2 lg:items-center" : "gap-1", b.value ? "py-6" : "", t.value === "setting" ? "md:justify-between md:items-start md:gap-4" : "", t.value === "page" ? "grid grid-cols-1 lg:grid-cols-4 px-4" : "flex flex-col"]
|
|
61
|
+
}, [e.label && l("div", {
|
|
62
|
+
class: [t.value === "left" ? "flex lg:items-center" : "md:mb-1", t.value === "left" && i.labelAlign.value === "right" ? "justify-end" : ""],
|
|
63
63
|
style: {
|
|
64
|
-
width:
|
|
64
|
+
width: x.value
|
|
65
65
|
}
|
|
66
66
|
}, [l("div", {
|
|
67
67
|
class: "flex flex-col"
|
|
68
68
|
}, [l("div", null, [l("span", {
|
|
69
69
|
class: "relative flex items-center gap-1"
|
|
70
|
-
}, [e.label,
|
|
70
|
+
}, [e.label, o.value && l("span", {
|
|
71
71
|
class: "text-error font-mono text-xs"
|
|
72
|
-
}, [
|
|
72
|
+
}, [S("*")])])]), e.description && (t.value === "setting" || t.value === "page") && l("div", {
|
|
73
73
|
class: "text-sm text-muted"
|
|
74
74
|
}, [e.description])])]), l("div", {
|
|
75
|
-
class: ["flex flex-col gap-1", t.value
|
|
75
|
+
class: ["flex flex-col gap-1", t.value === "setting" ? "flex-none md:w-40%" : "flex-1", t.value === "page" ? "col-span-3" : ""]
|
|
76
76
|
}, [l("div", {
|
|
77
77
|
class: t.value === "setting" ? "flex-1 lg:flex lg:justify-end" : ""
|
|
78
|
-
}, [
|
|
78
|
+
}, [s?.default?.()]), e.description && t.value === "left" && l("div", {
|
|
79
79
|
class: "text-sm text-muted"
|
|
80
|
-
}, [e.description]),
|
|
80
|
+
}, [e.description]), n.value && l("div", {
|
|
81
81
|
class: "text-error"
|
|
82
|
-
}, [
|
|
82
|
+
}, [n.value])])]);
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
export {
|
|
86
|
-
|
|
86
|
+
N as DuxFormItem
|
|
87
87
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as t, provide as i, toRef as l, createVNode as d } from "vue";
|
|
2
|
+
const f = /* @__PURE__ */ t({
|
|
3
3
|
name: "DuxFormLayout",
|
|
4
4
|
props: {
|
|
5
5
|
labelPlacement: {
|
|
@@ -23,18 +23,18 @@ const n = /* @__PURE__ */ a({
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
setup(e, {
|
|
26
|
-
slots:
|
|
26
|
+
slots: a
|
|
27
27
|
}) {
|
|
28
|
-
return
|
|
29
|
-
labelPlacement: e
|
|
30
|
-
labelAlign: e
|
|
31
|
-
labelWidth: e
|
|
32
|
-
divider: e
|
|
33
|
-
}), () =>
|
|
28
|
+
return i("dux.form", {
|
|
29
|
+
labelPlacement: l(e, "labelPlacement"),
|
|
30
|
+
labelAlign: l(e, "labelAlign"),
|
|
31
|
+
labelWidth: l(e, "labelWidth"),
|
|
32
|
+
divider: l(e, "divider")
|
|
33
|
+
}), () => d("div", {
|
|
34
34
|
class: ["flex ", e.divider || e.labelPlacement === "page" ? " divide-y divide-default dark:divide-gray-800" : "", e.inline ? "flex-row" : "flex-col", e.labelPlacement === "page" || e.labelPlacement === "setting" ? "container mx-auto" : "gap-4"]
|
|
35
|
-
}, [
|
|
35
|
+
}, [a?.default?.()]);
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
f as DuxFormLayout
|
|
40
40
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, computed as v, toRef as C, createVNode as
|
|
1
|
+
import { defineComponent as b, computed as v, toRef as C, createVNode as e, Fragment as F, isVNode as x } from "vue";
|
|
2
2
|
import { useI18n as E, useInvalidate as h, useExtendForm as j } from "@duxweb/dvha-core";
|
|
3
3
|
import { useMessage as D, NButton as p } from "naive-ui";
|
|
4
4
|
import "clsx";
|
|
@@ -27,9 +27,6 @@ import "vue-cropper";
|
|
|
27
27
|
import M from "../modal/modalPage.js";
|
|
28
28
|
import "jinrishici";
|
|
29
29
|
import "vue-draggable-plus";
|
|
30
|
-
import "aieditor";
|
|
31
|
-
import { DuxFormLayout as a } from "./formLayout.js";
|
|
32
|
-
import "vee-validate";
|
|
33
30
|
import "@vee-validate/i18n";
|
|
34
31
|
import "colorizr";
|
|
35
32
|
import "echarts";
|
|
@@ -39,15 +36,19 @@ import "@unocss/preset-typography";
|
|
|
39
36
|
import "unocss/preset-wind4";
|
|
40
37
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
41
38
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
39
|
+
import "vee-validate";
|
|
42
40
|
import "vue-command-palette";
|
|
43
41
|
import "../../pages/page404.js";
|
|
42
|
+
import "short-unique-id";
|
|
43
|
+
import "aieditor";
|
|
44
|
+
import { DuxFormLayout as a } from "./formLayout.js";
|
|
44
45
|
import "@iconify-json/tabler/icons.json";
|
|
45
|
-
import "../
|
|
46
|
+
import "../posterEditor/elements/index.js";
|
|
46
47
|
import "fabric";
|
|
47
48
|
function c(t) {
|
|
48
49
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !x(t);
|
|
49
50
|
}
|
|
50
|
-
const
|
|
51
|
+
const Mt = /* @__PURE__ */ b({
|
|
51
52
|
name: "DuxModalForm",
|
|
52
53
|
props: {
|
|
53
54
|
id: {
|
|
@@ -83,7 +84,7 @@ const Dt = /* @__PURE__ */ b({
|
|
|
83
84
|
slots: s
|
|
84
85
|
}) {
|
|
85
86
|
const {
|
|
86
|
-
t:
|
|
87
|
+
t: i
|
|
87
88
|
} = E(), u = v(() => {
|
|
88
89
|
const {
|
|
89
90
|
onClose: o,
|
|
@@ -110,31 +111,31 @@ const Dt = /* @__PURE__ */ b({
|
|
|
110
111
|
form: l,
|
|
111
112
|
action: t.action,
|
|
112
113
|
onError: (o) => {
|
|
113
|
-
n.error(o.message ||
|
|
114
|
+
n.error(o.message || i("components.form.error")), t.onError?.(o);
|
|
114
115
|
},
|
|
115
116
|
onSuccess: (o) => {
|
|
116
|
-
t.invalidate && d(t.invalidate), n.success(
|
|
117
|
+
t.invalidate && d(t.invalidate), n.success(i("components.form.success")), t.onSuccess?.(o), t.onClose?.();
|
|
117
118
|
}
|
|
118
119
|
});
|
|
119
|
-
return () =>
|
|
120
|
-
title: t?.title || (y.value ?
|
|
120
|
+
return () => e(M, {
|
|
121
|
+
title: t?.title || (y.value ? i("components.form.edit") : i("components.form.create")),
|
|
121
122
|
onClose: t?.onClose
|
|
122
123
|
}, {
|
|
123
|
-
default: () =>
|
|
124
|
+
default: () => e(a, u.value, {
|
|
124
125
|
default: () => [s?.default?.()]
|
|
125
126
|
}),
|
|
126
127
|
footer: () => {
|
|
127
128
|
let o, r;
|
|
128
|
-
return
|
|
129
|
+
return e(F, null, [e(p, {
|
|
129
130
|
onClick: g,
|
|
130
131
|
loading: m.value
|
|
131
|
-
}, c(o =
|
|
132
|
+
}, c(o = i("components.button.reset")) ? o : {
|
|
132
133
|
default: () => [o]
|
|
133
|
-
}),
|
|
134
|
+
}), e(p, {
|
|
134
135
|
type: "primary",
|
|
135
136
|
loading: m.value,
|
|
136
137
|
onClick: () => f()
|
|
137
|
-
}, c(r =
|
|
138
|
+
}, c(r = i("components.button.submit")) ? r : {
|
|
138
139
|
default: () => [r]
|
|
139
140
|
})]);
|
|
140
141
|
}
|
|
@@ -142,5 +143,5 @@ const Dt = /* @__PURE__ */ b({
|
|
|
142
143
|
}
|
|
143
144
|
});
|
|
144
145
|
export {
|
|
145
|
-
|
|
146
|
+
Mt as DuxModalForm
|
|
146
147
|
};
|
|
@@ -22,16 +22,17 @@ import "vue-cropper";
|
|
|
22
22
|
import "jinrishici";
|
|
23
23
|
import "lodash-es";
|
|
24
24
|
import "vue-draggable-plus";
|
|
25
|
+
import "short-unique-id";
|
|
25
26
|
import "aieditor";
|
|
26
27
|
import { DuxFormLayout as C } from "./formLayout.js";
|
|
27
28
|
import "vee-validate";
|
|
29
|
+
import "@duxweb/dvha-naiveui";
|
|
28
30
|
import "@iconify-json/tabler/icons.json";
|
|
29
|
-
import "../
|
|
31
|
+
import "../posterEditor/elements/index.js";
|
|
30
32
|
import "fabric";
|
|
31
33
|
import "mime";
|
|
32
34
|
import "dayjs";
|
|
33
35
|
import "@tanstack/vue-query";
|
|
34
|
-
import "@duxweb/dvha-naiveui";
|
|
35
36
|
import "pinia";
|
|
36
37
|
import "@vee-validate/i18n";
|
|
37
38
|
import "colorizr";
|
|
@@ -45,7 +46,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
45
46
|
import "vue-command-palette";
|
|
46
47
|
import { DuxPage as D } from "../../pages/page.js";
|
|
47
48
|
import "../../pages/page404.js";
|
|
48
|
-
const
|
|
49
|
+
const ht = /* @__PURE__ */ f({
|
|
49
50
|
name: "DuxPageForm",
|
|
50
51
|
props: {
|
|
51
52
|
id: {
|
|
@@ -81,11 +82,11 @@ const xt = /* @__PURE__ */ f({
|
|
|
81
82
|
}
|
|
82
83
|
},
|
|
83
84
|
setup(t, {
|
|
84
|
-
slots:
|
|
85
|
+
slots: n
|
|
85
86
|
}) {
|
|
86
87
|
const {
|
|
87
88
|
t: o
|
|
88
|
-
} = g(), s = b(t, "data", {}), a = h(), c = E(),
|
|
89
|
+
} = g(), s = b(t, "data", {}), a = h(), c = E(), m = y(), {
|
|
89
90
|
invalidate: l
|
|
90
91
|
} = S(), r = x({
|
|
91
92
|
id: t.id,
|
|
@@ -96,9 +97,9 @@ const xt = /* @__PURE__ */ f({
|
|
|
96
97
|
a.error(i.message || o("components.form.error")), t.onError?.(i);
|
|
97
98
|
},
|
|
98
99
|
onSuccess: (i) => {
|
|
99
|
-
a.success(o("components.form.success")), t.onSuccess?.(i), !r.isEdit.value &&
|
|
100
|
+
a.success(o("components.form.success")), t.onSuccess?.(i), !r.isEdit.value && m.current && m.delTab(m.current, (d) => c.push(d.path || "")), t.invalidate && l(t.invalidate);
|
|
100
101
|
}
|
|
101
|
-
}), u =
|
|
102
|
+
}), u = m.tabs.find((i) => i.path === m.current);
|
|
102
103
|
return () => e(D, {
|
|
103
104
|
card: !1,
|
|
104
105
|
scrollbar: !1
|
|
@@ -115,12 +116,12 @@ const xt = /* @__PURE__ */ f({
|
|
|
115
116
|
default: () => [e(C, {
|
|
116
117
|
"label-placement": "page"
|
|
117
118
|
}, {
|
|
118
|
-
default: () => [
|
|
119
|
+
default: () => [n?.default?.(r)]
|
|
119
120
|
})]
|
|
120
121
|
}),
|
|
121
122
|
headerExtra: () => e("div", {
|
|
122
123
|
class: "flex gap-6 items-center"
|
|
123
|
-
}, [
|
|
124
|
+
}, [n?.actions?.(r), e("div", {
|
|
124
125
|
class: "flex gap-2"
|
|
125
126
|
}, [e(p, {
|
|
126
127
|
onClick: () => r.onReset()
|
|
@@ -143,5 +144,5 @@ const xt = /* @__PURE__ */ f({
|
|
|
143
144
|
}
|
|
144
145
|
});
|
|
145
146
|
export {
|
|
146
|
-
|
|
147
|
+
ht as DuxPageForm
|
|
147
148
|
};
|
|
@@ -21,15 +21,16 @@ import "vue-cropper";
|
|
|
21
21
|
import "jinrishici";
|
|
22
22
|
import "lodash-es";
|
|
23
23
|
import "vue-draggable-plus";
|
|
24
|
+
import "short-unique-id";
|
|
24
25
|
import "aieditor";
|
|
25
26
|
import "vee-validate";
|
|
27
|
+
import "@duxweb/dvha-naiveui";
|
|
26
28
|
import "@iconify-json/tabler/icons.json";
|
|
27
|
-
import "../
|
|
29
|
+
import "../posterEditor/elements/index.js";
|
|
28
30
|
import "fabric";
|
|
29
31
|
import "mime";
|
|
30
32
|
import "dayjs";
|
|
31
33
|
import "@tanstack/vue-query";
|
|
32
|
-
import "@duxweb/dvha-naiveui";
|
|
33
34
|
import "pinia";
|
|
34
35
|
import "@vee-validate/i18n";
|
|
35
36
|
import "colorizr";
|
|
@@ -43,7 +44,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
43
44
|
import "vue-command-palette";
|
|
44
45
|
import { DuxPage as b } from "../../pages/page.js";
|
|
45
46
|
import "../../pages/page404.js";
|
|
46
|
-
const
|
|
47
|
+
const dt = /* @__PURE__ */ s({
|
|
47
48
|
name: "DuxSettingForm",
|
|
48
49
|
props: {
|
|
49
50
|
id: {
|
|
@@ -126,5 +127,5 @@ const ct = /* @__PURE__ */ s({
|
|
|
126
127
|
}
|
|
127
128
|
});
|
|
128
129
|
export {
|
|
129
|
-
|
|
130
|
+
dt as DuxSettingForm
|
|
130
131
|
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { defineComponent as a, createVNode as t } from "vue";
|
|
2
|
+
import { useI18n as n } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as u } from "@vueuse/core";
|
|
4
|
+
import { NInput as e } from "naive-ui";
|
|
5
|
+
import "clsx";
|
|
6
|
+
import "vue-router";
|
|
7
|
+
import "@overlastic/vue";
|
|
8
|
+
import "vue-echarts";
|
|
9
|
+
import "vue3-ace-editor";
|
|
10
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
11
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
12
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
13
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
14
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
15
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
16
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
17
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
18
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
19
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
20
|
+
import "vue-cropper";
|
|
21
|
+
import "jinrishici";
|
|
22
|
+
import "lodash-es";
|
|
23
|
+
import "vue-draggable-plus";
|
|
24
|
+
import "aieditor";
|
|
25
|
+
import { DuxFormItem as l } from "../../form/formItem.js";
|
|
26
|
+
import "@vee-validate/i18n";
|
|
27
|
+
import "colorizr";
|
|
28
|
+
import "echarts";
|
|
29
|
+
import "@ant-design/colors";
|
|
30
|
+
import "@unocss/preset-icons/browser";
|
|
31
|
+
import "@unocss/preset-typography";
|
|
32
|
+
import "unocss/preset-wind4";
|
|
33
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
34
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
35
|
+
import "vee-validate";
|
|
36
|
+
import "vue-command-palette";
|
|
37
|
+
import "@duxweb/dvha-naiveui";
|
|
38
|
+
import "../../../pages/page404.js";
|
|
39
|
+
import { WidgetEditorSettingCard as d } from "../../designEditor/editor/setting.js";
|
|
40
|
+
import "@iconify-json/tabler/icons.json";
|
|
41
|
+
import "../../posterEditor/elements/index.js";
|
|
42
|
+
import "fabric";
|
|
43
|
+
import "mime";
|
|
44
|
+
import "dayjs";
|
|
45
|
+
import "@tanstack/vue-query";
|
|
46
|
+
import "pinia";
|
|
47
|
+
import "short-unique-id";
|
|
48
|
+
const po = /* @__PURE__ */ a({
|
|
49
|
+
name: "DuxFormEditorItem",
|
|
50
|
+
props: {
|
|
51
|
+
value: {
|
|
52
|
+
type: Object,
|
|
53
|
+
default: []
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
setup(p, {
|
|
57
|
+
emit: i
|
|
58
|
+
}) {
|
|
59
|
+
const {
|
|
60
|
+
t: r
|
|
61
|
+
} = n(), o = u(p, "value", i);
|
|
62
|
+
return () => t(d, {
|
|
63
|
+
title: r("components.formEditor.componentConfig")
|
|
64
|
+
}, {
|
|
65
|
+
default: () => [t(l, {
|
|
66
|
+
label: r("components.formEditor.common.label"),
|
|
67
|
+
path: "label"
|
|
68
|
+
}, {
|
|
69
|
+
default: () => [t(e, {
|
|
70
|
+
value: o.value.label,
|
|
71
|
+
"onUpdate:value": (m) => o.value.label = m
|
|
72
|
+
}, null)]
|
|
73
|
+
}), t(l, {
|
|
74
|
+
label: r("components.formEditor.common.name")
|
|
75
|
+
}, {
|
|
76
|
+
default: () => [t(e, {
|
|
77
|
+
value: o.value.name,
|
|
78
|
+
"onUpdate:value": (m) => o.value.name = m
|
|
79
|
+
}, null)]
|
|
80
|
+
}), t(l, {
|
|
81
|
+
label: r("components.formEditor.common.desc")
|
|
82
|
+
}, {
|
|
83
|
+
default: () => [t(e, {
|
|
84
|
+
value: o.value.desc,
|
|
85
|
+
"onUpdate:value": (m) => o.value.desc = m
|
|
86
|
+
}, null)]
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}), io = /* @__PURE__ */ a({
|
|
91
|
+
name: "FormEditorInput",
|
|
92
|
+
props: {
|
|
93
|
+
value: {
|
|
94
|
+
type: Array,
|
|
95
|
+
default: []
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
setup(p, {
|
|
99
|
+
emit: i
|
|
100
|
+
}) {
|
|
101
|
+
const {
|
|
102
|
+
t: r
|
|
103
|
+
} = n(), o = u(p, "value", i);
|
|
104
|
+
return () => t(d, {
|
|
105
|
+
title: r("components.formEditor.validation")
|
|
106
|
+
}, {
|
|
107
|
+
default: () => [t(e, {
|
|
108
|
+
value: o.value,
|
|
109
|
+
"onUpdate:value": (m) => o.value = m
|
|
110
|
+
}, null)]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
export {
|
|
115
|
+
po as DuxFormEditorItem,
|
|
116
|
+
io as DuxFormEditorRule
|
|
117
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as u, createVNode as r } from "vue";
|
|
2
|
+
import { useVModel as d } from "@vueuse/core";
|
|
3
|
+
import "@overlastic/vue";
|
|
4
|
+
import "naive-ui";
|
|
5
|
+
import l from "../../modal/modalPage.js";
|
|
6
|
+
import { DuxCodeEditor as n } from "../../code/code.js";
|
|
7
|
+
const x = /* @__PURE__ */ u({
|
|
8
|
+
name: "DuxFormEditorJson",
|
|
9
|
+
props: {
|
|
10
|
+
value: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: []
|
|
13
|
+
},
|
|
14
|
+
onChange: Function,
|
|
15
|
+
desc: String
|
|
16
|
+
},
|
|
17
|
+
setup(e, {
|
|
18
|
+
emit: a
|
|
19
|
+
}) {
|
|
20
|
+
const o = d(e, "value", a, {
|
|
21
|
+
passive: !0,
|
|
22
|
+
defaultValue: "",
|
|
23
|
+
shouldEmit: (t) => (e.onChange?.(t), !0)
|
|
24
|
+
});
|
|
25
|
+
return () => r(l, null, {
|
|
26
|
+
default: () => [r("div", {
|
|
27
|
+
class: "flex flex-col gap-4"
|
|
28
|
+
}, [e.desc && r("div", {
|
|
29
|
+
class: "px-4 py-3 border border-primary-5 bg-primary/10 rounded-sm text-primary text-sm"
|
|
30
|
+
}, [e.desc]), r(n, {
|
|
31
|
+
value: o.value,
|
|
32
|
+
"onUpdate:value": (t) => o.value = t
|
|
33
|
+
}, null)])]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
x as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as d, createVNode as a } from "vue";
|
|
2
|
+
import { useVModel as i } from "@vueuse/core";
|
|
3
|
+
import { NDynamicInput as p, NInput as m } from "naive-ui";
|
|
4
|
+
import "@overlastic/vue";
|
|
5
|
+
import s from "../../modal/modalPage.js";
|
|
6
|
+
const x = /* @__PURE__ */ d({
|
|
7
|
+
name: "DuxFormEditorOptions",
|
|
8
|
+
props: {
|
|
9
|
+
value: {
|
|
10
|
+
type: Array,
|
|
11
|
+
default: []
|
|
12
|
+
},
|
|
13
|
+
onChange: Function,
|
|
14
|
+
options: Array
|
|
15
|
+
},
|
|
16
|
+
setup(t, {
|
|
17
|
+
emit: n
|
|
18
|
+
}) {
|
|
19
|
+
const o = i(t, "value", n, {
|
|
20
|
+
passive: !0,
|
|
21
|
+
defaultValue: [],
|
|
22
|
+
shouldEmit: (e) => (t.onChange?.(e), !0)
|
|
23
|
+
});
|
|
24
|
+
return () => a(s, null, {
|
|
25
|
+
default: () => [a(p, {
|
|
26
|
+
value: o.value,
|
|
27
|
+
"onUpdate:value": (e) => o.value = e,
|
|
28
|
+
onCreate: () => ({
|
|
29
|
+
label: "",
|
|
30
|
+
value: void 0
|
|
31
|
+
})
|
|
32
|
+
}, {
|
|
33
|
+
default: ({
|
|
34
|
+
value: e
|
|
35
|
+
}) => a("div", {
|
|
36
|
+
class: "grid grid-cols-2 gap-2"
|
|
37
|
+
}, [t.options?.map((u, r) => a(m, {
|
|
38
|
+
key: r,
|
|
39
|
+
value: e[u.value],
|
|
40
|
+
"onUpdate:value": (l) => e[u.value] = l
|
|
41
|
+
}, null))])
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
x as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { defineComponent as f, createVNode as t, isVNode as u } from "vue";
|
|
2
|
+
import { useI18n as s } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as g } from "@vueuse/core";
|
|
4
|
+
import { NRadioGroup as v, NRadio as m } from "naive-ui";
|
|
5
|
+
import { WidgetEditorSettingCard as E } from "../../designEditor/editor/setting.js";
|
|
6
|
+
import "clsx";
|
|
7
|
+
import "vue-echarts";
|
|
8
|
+
import "vue-router";
|
|
9
|
+
import "@overlastic/vue";
|
|
10
|
+
import "dayjs";
|
|
11
|
+
import "mime";
|
|
12
|
+
import "lodash-es";
|
|
13
|
+
import "@tanstack/vue-query";
|
|
14
|
+
import "@duxweb/dvha-naiveui";
|
|
15
|
+
import "pinia";
|
|
16
|
+
import "vue3-ace-editor";
|
|
17
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
18
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
19
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
20
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
21
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
22
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
23
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
24
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
25
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
26
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
27
|
+
import "vue-cropper";
|
|
28
|
+
import "jinrishici";
|
|
29
|
+
import "vue-draggable-plus";
|
|
30
|
+
import "@vee-validate/i18n";
|
|
31
|
+
import "colorizr";
|
|
32
|
+
import "echarts";
|
|
33
|
+
import "@ant-design/colors";
|
|
34
|
+
import "@unocss/preset-icons/browser";
|
|
35
|
+
import "@unocss/preset-typography";
|
|
36
|
+
import "unocss/preset-wind4";
|
|
37
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
38
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
39
|
+
import "vee-validate";
|
|
40
|
+
import "vue-command-palette";
|
|
41
|
+
import "../../../pages/page404.js";
|
|
42
|
+
import "short-unique-id";
|
|
43
|
+
import "aieditor";
|
|
44
|
+
import { DuxFormItem as b } from "../../form/formItem.js";
|
|
45
|
+
import "@iconify-json/tabler/icons.json";
|
|
46
|
+
import "../../posterEditor/elements/index.js";
|
|
47
|
+
import "fabric";
|
|
48
|
+
function i(r) {
|
|
49
|
+
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !u(r);
|
|
50
|
+
}
|
|
51
|
+
const ft = /* @__PURE__ */ f({
|
|
52
|
+
name: "DuxFormEditorSettingPage",
|
|
53
|
+
inheritAttrs: !1,
|
|
54
|
+
props: {
|
|
55
|
+
value: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: () => ({})
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
setup(r, {
|
|
61
|
+
emit: d
|
|
62
|
+
}) {
|
|
63
|
+
const {
|
|
64
|
+
t: o
|
|
65
|
+
} = s(), a = g(r, "value", d);
|
|
66
|
+
return () => {
|
|
67
|
+
let e, p, l, n;
|
|
68
|
+
return t("div", {
|
|
69
|
+
class: "flex flex-col gap-2"
|
|
70
|
+
}, [t(E, {
|
|
71
|
+
title: o("components.formEditor.setting.title")
|
|
72
|
+
}, {
|
|
73
|
+
default: () => [t(b, {
|
|
74
|
+
label: o("components.formEditor.common.formDirection"),
|
|
75
|
+
path: "labelPlacement"
|
|
76
|
+
}, {
|
|
77
|
+
default: () => [t(v, {
|
|
78
|
+
value: a.value.labelPlacement,
|
|
79
|
+
"onUpdate:value": (c) => a.value.labelPlacement = c
|
|
80
|
+
}, {
|
|
81
|
+
default: () => [t("div", {
|
|
82
|
+
class: "grid grid-cols-2 gap-2"
|
|
83
|
+
}, [t(m, {
|
|
84
|
+
value: "left"
|
|
85
|
+
}, i(e = o("components.formEditor.common.leftAlign")) ? e : {
|
|
86
|
+
default: () => [e]
|
|
87
|
+
}), t(m, {
|
|
88
|
+
value: "top"
|
|
89
|
+
}, i(p = o("components.formEditor.common.topAlign")) ? p : {
|
|
90
|
+
default: () => [p]
|
|
91
|
+
}), t(m, {
|
|
92
|
+
value: "setting"
|
|
93
|
+
}, i(l = o("components.formEditor.common.settingAlign")) ? l : {
|
|
94
|
+
default: () => [l]
|
|
95
|
+
}), t(m, {
|
|
96
|
+
value: "page"
|
|
97
|
+
}, i(n = o("components.formEditor.common.pageAlign")) ? n : {
|
|
98
|
+
default: () => [n]
|
|
99
|
+
})])]
|
|
100
|
+
})]
|
|
101
|
+
})]
|
|
102
|
+
})]);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
export {
|
|
107
|
+
ft as DuxFormEditorSettingPage
|
|
108
|
+
};
|