@duxweb/dvha-pro 1.0.24 → 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/components/CanvasRuler.cjs +1 -0
- package/dist/cjs/components/posterEditor/elements/circle.cjs +1 -0
- package/dist/cjs/components/posterEditor/elements/image.cjs +1 -0
- package/dist/cjs/components/posterEditor/elements/index.cjs +1 -0
- package/dist/cjs/components/posterEditor/elements/rect.cjs +1 -0
- package/dist/cjs/components/posterEditor/elements/text.cjs +1 -0
- package/dist/cjs/components/posterEditor/hooks/usePosterEditor.cjs +1 -0
- package/dist/cjs/components/posterEditor/pages/LeftToolbar.cjs +1 -0
- package/dist/cjs/components/posterEditor/pages/Panel.cjs +1 -0
- package/dist/cjs/components/posterEditor/pages/PanelItem.cjs +1 -0
- 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/layout.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 +58 -2
- package/dist/esm/component.js +52 -48
- package/dist/esm/components/chart/echart.js +18 -15
- package/dist/esm/components/crop/imageCrop.js +19 -16
- package/dist/esm/components/data/dynamicSelect.js +20 -17
- package/dist/esm/components/data/selectModal.js +23 -20
- 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 +25 -22
- 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 +30 -27
- package/dist/esm/components/form/pageForm.js +21 -18
- package/dist/esm/components/form/settingForm.js +14 -11
- 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 +19 -16
- package/dist/esm/components/layout/grid.js +24 -0
- package/dist/esm/components/layout/list.js +29 -26
- package/dist/esm/components/layout/table.js +27 -24
- package/dist/esm/components/level/level.js +18 -15
- package/dist/esm/components/posterEditor/components/CanvasRuler.js +113 -0
- package/dist/esm/components/posterEditor/elements/circle.js +127 -0
- package/dist/esm/components/posterEditor/elements/image.js +131 -0
- package/dist/esm/components/posterEditor/elements/index.js +46 -0
- package/dist/esm/components/posterEditor/elements/rect.js +171 -0
- package/dist/esm/components/posterEditor/elements/text.js +206 -0
- package/dist/esm/components/posterEditor/hooks/usePosterEditor.js +434 -0
- package/dist/esm/components/posterEditor/pages/LeftToolbar.js +40 -0
- package/dist/esm/components/posterEditor/pages/Panel.js +31 -0
- package/dist/esm/components/posterEditor/pages/PanelItem.js +22 -0
- package/dist/esm/components/posterEditor/pages/RightPanel.js +422 -0
- package/dist/esm/components/posterEditor/posterEditor.js +228 -0
- package/dist/esm/components/table/table.js +18 -15
- package/dist/esm/components/upload/file.js +101 -90
- package/dist/esm/components/upload/image.js +109 -96
- package/dist/esm/components/upload/manage/item.js +18 -15
- package/dist/esm/components/upload/manager.js +68 -65
- package/dist/esm/hooks/dialog.js +19 -16
- package/dist/esm/hooks/drawer.js +19 -16
- package/dist/esm/hooks/modal.js +18 -15
- package/dist/esm/hooks/table/image.js +18 -15
- package/dist/esm/hooks/table/media.js +18 -15
- package/dist/esm/index.js +230 -202
- 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 +19 -16
- package/dist/esm/pages/layout/page.js +18 -15
- package/dist/esm/pages/layout.js +7 -6
- package/dist/esm/pages/login.js +19 -17
- package/dist/esm/pages/menu/avatar.js +23 -20
- package/dist/esm/pages/menu/button.js +18 -15
- package/dist/esm/pages/menu/cmd.js +29 -26
- package/dist/esm/pages/menu/main.js +28 -25
- package/dist/esm/pages/menu/mobile.js +18 -15
- package/dist/esm/pages/page404.js +16 -13
- package/dist/esm/pages/pageStatus.js +21 -18
- package/dist/esm/theme/uno.css.js +58 -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 +4 -2
- 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/dist/types/components/posterEditor/components/CanvasRuler.d.ts +43 -0
- package/dist/types/components/posterEditor/components/index.d.ts +1 -0
- package/dist/types/components/posterEditor/elements/circle.d.ts +3 -0
- package/dist/types/components/posterEditor/elements/image.d.ts +3 -0
- package/dist/types/components/posterEditor/elements/index.d.ts +15 -0
- package/dist/types/components/posterEditor/elements/rect.d.ts +3 -0
- package/dist/types/components/posterEditor/elements/text.d.ts +3 -0
- package/dist/types/components/posterEditor/elements/types.d.ts +51 -0
- package/dist/types/components/posterEditor/hooks/index.d.ts +1 -0
- package/dist/types/components/posterEditor/hooks/usePosterEditor.d.ts +48 -0
- package/dist/types/components/posterEditor/index.d.ts +4 -0
- package/dist/types/components/posterEditor/pages/LeftToolbar.d.ts +33 -0
- package/dist/types/components/posterEditor/pages/Panel.d.ts +11 -0
- package/dist/types/components/posterEditor/pages/PanelItem.d.ts +11 -0
- package/dist/types/components/posterEditor/pages/RightPanel.d.ts +208 -0
- package/dist/types/components/posterEditor/pages/index.d.ts +4 -0
- package/dist/types/components/posterEditor/posterEditor.d.ts +61 -0
- package/dist/types/components/posterEditor/types/editor.d.ts +47 -0
- package/dist/types/components/stats/number.d.ts +1 -1
- package/dist/types/components/upload/file.d.ts +5 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/pages/layout/global.d.ts +0 -1
- package/package.json +7 -3
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { createVNode as t, defineComponent as i } from "vue";
|
|
2
|
+
import { useI18n as d } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as p } from "@vueuse/core";
|
|
4
|
+
import { NSelect as u, NSwitch as n, NDatePicker as s } 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 m } 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 { DuxFormEditorItem as c, DuxFormEditorRule as f } from "../base/base.js";
|
|
40
|
+
import { WidgetEditorSettingCard as v } from "../../designEditor/editor/setting.js";
|
|
41
|
+
import "@iconify-json/tabler/icons.json";
|
|
42
|
+
import "../../posterEditor/elements/index.js";
|
|
43
|
+
import "fabric";
|
|
44
|
+
import "mime";
|
|
45
|
+
import "dayjs";
|
|
46
|
+
import "@tanstack/vue-query";
|
|
47
|
+
import "pinia";
|
|
48
|
+
import "short-unique-id";
|
|
49
|
+
const b = /* @__PURE__ */ i({
|
|
50
|
+
name: "FormEditorDate",
|
|
51
|
+
props: {
|
|
52
|
+
options: Object
|
|
53
|
+
},
|
|
54
|
+
setup(o) {
|
|
55
|
+
const a = o.options?.attr;
|
|
56
|
+
return () => t(m, {
|
|
57
|
+
label: o.options?.label,
|
|
58
|
+
description: o.options?.desc
|
|
59
|
+
}, {
|
|
60
|
+
default: () => [t("div", {
|
|
61
|
+
class: "flex-1"
|
|
62
|
+
}, [t(s, a, null)])]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
function E(o) {
|
|
67
|
+
const {
|
|
68
|
+
options: a,
|
|
69
|
+
model: r
|
|
70
|
+
} = o || {};
|
|
71
|
+
return {
|
|
72
|
+
tag: "dux-form-item",
|
|
73
|
+
attrs: {
|
|
74
|
+
label: a?.label,
|
|
75
|
+
description: a?.desc
|
|
76
|
+
},
|
|
77
|
+
children: [{
|
|
78
|
+
tag: "n-date-picker",
|
|
79
|
+
attrs: {
|
|
80
|
+
...a?.attr,
|
|
81
|
+
"v-model:value": [r, a?.name]
|
|
82
|
+
}
|
|
83
|
+
}]
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const g = /* @__PURE__ */ i({
|
|
87
|
+
name: "FormEditorDateSetting",
|
|
88
|
+
props: {
|
|
89
|
+
value: {
|
|
90
|
+
type: Object,
|
|
91
|
+
default: {}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
setup(o, {
|
|
95
|
+
emit: a
|
|
96
|
+
}) {
|
|
97
|
+
const r = p(o, "value", a), {
|
|
98
|
+
t: e
|
|
99
|
+
} = d();
|
|
100
|
+
return () => t("div", {
|
|
101
|
+
class: ""
|
|
102
|
+
}, [t(c, {
|
|
103
|
+
value: o.value,
|
|
104
|
+
"onUpdate:value": (l) => o.value = l
|
|
105
|
+
}, null), t(v, {
|
|
106
|
+
title: e("components.formEditor.common.componentConfig")
|
|
107
|
+
}, {
|
|
108
|
+
default: () => [t(m, {
|
|
109
|
+
label: e("components.formEditor.date.dateType")
|
|
110
|
+
}, {
|
|
111
|
+
default: () => [t(u, {
|
|
112
|
+
value: r.value.attr.type,
|
|
113
|
+
"onUpdate:value": (l) => r.value.attr.type = l,
|
|
114
|
+
options: [{
|
|
115
|
+
label: e("components.formEditor.date.date"),
|
|
116
|
+
value: "date"
|
|
117
|
+
}, {
|
|
118
|
+
label: e("components.formEditor.date.daterange"),
|
|
119
|
+
value: "daterange"
|
|
120
|
+
}, {
|
|
121
|
+
label: e("components.formEditor.date.datetime"),
|
|
122
|
+
value: "datetime"
|
|
123
|
+
}, {
|
|
124
|
+
label: e("components.formEditor.date.datetimerange"),
|
|
125
|
+
value: "datetimerange"
|
|
126
|
+
}, {
|
|
127
|
+
label: e("components.formEditor.date.month"),
|
|
128
|
+
value: "month"
|
|
129
|
+
}, {
|
|
130
|
+
label: e("components.formEditor.date.monthrange"),
|
|
131
|
+
value: "monthrange"
|
|
132
|
+
}, {
|
|
133
|
+
label: e("components.formEditor.date.year"),
|
|
134
|
+
value: "year"
|
|
135
|
+
}, {
|
|
136
|
+
label: e("components.formEditor.date.yearrange"),
|
|
137
|
+
value: "yearrange"
|
|
138
|
+
}, {
|
|
139
|
+
label: e("components.formEditor.date.quarter"),
|
|
140
|
+
value: "quarter"
|
|
141
|
+
}, {
|
|
142
|
+
label: e("components.formEditor.date.quarterrange"),
|
|
143
|
+
value: "quarterrange"
|
|
144
|
+
}, {
|
|
145
|
+
label: e("components.formEditor.date.week"),
|
|
146
|
+
value: "week"
|
|
147
|
+
}]
|
|
148
|
+
}, null)]
|
|
149
|
+
}), t(m, {
|
|
150
|
+
label: e("components.formEditor.common.disabled"),
|
|
151
|
+
labelPlacement: "left"
|
|
152
|
+
}, {
|
|
153
|
+
default: () => [t("div", {
|
|
154
|
+
class: "flex flex-1 justify-end"
|
|
155
|
+
}, [t(n, {
|
|
156
|
+
value: r.value.attr.disabled,
|
|
157
|
+
"onUpdate:value": (l) => r.value.attr.disabled = l
|
|
158
|
+
}, null)])]
|
|
159
|
+
}), t(m, {
|
|
160
|
+
label: e("components.formEditor.common.clearable"),
|
|
161
|
+
labelPlacement: "left"
|
|
162
|
+
}, {
|
|
163
|
+
default: () => [t("div", {
|
|
164
|
+
class: "flex flex-1 justify-end"
|
|
165
|
+
}, [t(n, {
|
|
166
|
+
value: r.value.attr.clearable,
|
|
167
|
+
"onUpdate:value": (l) => r.value.attr.clearable = l
|
|
168
|
+
}, null)])]
|
|
169
|
+
})]
|
|
170
|
+
}), t(f, {
|
|
171
|
+
value: r.value.rule,
|
|
172
|
+
"onUpdate:value": (l) => r.value.rule = l
|
|
173
|
+
}, null)]);
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
function ct(o) {
|
|
177
|
+
return {
|
|
178
|
+
name: "dux-date",
|
|
179
|
+
icon: "i-tabler:calendar-due",
|
|
180
|
+
label: o("components.formEditor.date.label"),
|
|
181
|
+
group: "form",
|
|
182
|
+
component: (a) => t(b, a, null),
|
|
183
|
+
setting: (a) => t(g, a, null),
|
|
184
|
+
settingDefault: {
|
|
185
|
+
label: o("components.formEditor.date.label"),
|
|
186
|
+
name: "date",
|
|
187
|
+
attr: {
|
|
188
|
+
type: "date"
|
|
189
|
+
},
|
|
190
|
+
rule: []
|
|
191
|
+
},
|
|
192
|
+
json: E
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
export {
|
|
196
|
+
ct as duxFormEditorDate
|
|
197
|
+
};
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { createVNode as t, defineComponent as p, computed as i, mergeProps as f } from "vue";
|
|
2
|
+
import { useI18n as v } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as b } from "@vueuse/core";
|
|
4
|
+
import { NInputNumber as u, NSwitch as x, NDynamicInput as g } 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 n } 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 { DuxFormEditorItem as y, DuxFormEditorRule as E } from "../base/base.js";
|
|
40
|
+
import { WidgetEditorSettingCard as C } from "../../designEditor/editor/setting.js";
|
|
41
|
+
import "@iconify-json/tabler/icons.json";
|
|
42
|
+
import "../../posterEditor/elements/index.js";
|
|
43
|
+
import "fabric";
|
|
44
|
+
import "mime";
|
|
45
|
+
import "dayjs";
|
|
46
|
+
import "@tanstack/vue-query";
|
|
47
|
+
import "pinia";
|
|
48
|
+
import { DuxWidgetEditorPreview as I } from "../../designEditor/editor/preview.js";
|
|
49
|
+
import "short-unique-id";
|
|
50
|
+
const D = /* @__PURE__ */ p({
|
|
51
|
+
name: "FormEditorDynamicInput",
|
|
52
|
+
props: {
|
|
53
|
+
options: {
|
|
54
|
+
type: Object,
|
|
55
|
+
default: () => ({})
|
|
56
|
+
},
|
|
57
|
+
children: {
|
|
58
|
+
type: Array,
|
|
59
|
+
default: () => []
|
|
60
|
+
},
|
|
61
|
+
onChildren: Function
|
|
62
|
+
},
|
|
63
|
+
setup(e) {
|
|
64
|
+
const r = i(() => e.options?.attr || {}), o = i(() => e.options?.label);
|
|
65
|
+
return () => t(n, {
|
|
66
|
+
label: o.value,
|
|
67
|
+
description: e.options?.desc
|
|
68
|
+
}, {
|
|
69
|
+
default: () => [t("div", {
|
|
70
|
+
class: "flex-1 w-full"
|
|
71
|
+
}, [t(g, f(r.value, {
|
|
72
|
+
value: [{}]
|
|
73
|
+
}), {
|
|
74
|
+
default: () => t(I, {
|
|
75
|
+
class: "w-full flex gap-2 rounded-sm border border-dashed border-muted p-2",
|
|
76
|
+
modelValue: e.children,
|
|
77
|
+
onUpdate: e.onChildren
|
|
78
|
+
}, null)
|
|
79
|
+
})])]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
function h(e) {
|
|
84
|
+
const {
|
|
85
|
+
options: r,
|
|
86
|
+
children: o,
|
|
87
|
+
model: a,
|
|
88
|
+
convertToJsonSchema: m
|
|
89
|
+
} = e || {};
|
|
90
|
+
return {
|
|
91
|
+
tag: "dux-form-item",
|
|
92
|
+
attrs: {
|
|
93
|
+
label: r?.label,
|
|
94
|
+
description: r?.desc
|
|
95
|
+
},
|
|
96
|
+
children: [{
|
|
97
|
+
tag: "n-dynamic-input",
|
|
98
|
+
attrs: {
|
|
99
|
+
...r?.attr,
|
|
100
|
+
"v-model:value": [a, r?.name],
|
|
101
|
+
"@create": () => ({})
|
|
102
|
+
},
|
|
103
|
+
slots: {
|
|
104
|
+
default: ({
|
|
105
|
+
value: d,
|
|
106
|
+
index: s
|
|
107
|
+
}) => ({
|
|
108
|
+
tag: "div",
|
|
109
|
+
attrs: {
|
|
110
|
+
class: "flex-1 flex gap-2",
|
|
111
|
+
key: s
|
|
112
|
+
},
|
|
113
|
+
children: m ? m(o || [], d).map((l) => {
|
|
114
|
+
if (l && typeof l == "object" && "attrs" in l) {
|
|
115
|
+
const {
|
|
116
|
+
label: U,
|
|
117
|
+
...c
|
|
118
|
+
} = l.attrs || {};
|
|
119
|
+
return {
|
|
120
|
+
...l,
|
|
121
|
+
attrs: {
|
|
122
|
+
class: "w-full",
|
|
123
|
+
restAttrs: c
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
return l;
|
|
128
|
+
}) : []
|
|
129
|
+
})
|
|
130
|
+
}
|
|
131
|
+
}]
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
const F = /* @__PURE__ */ p({
|
|
135
|
+
name: "FormEditorDynamicInputSetting",
|
|
136
|
+
props: {
|
|
137
|
+
value: {
|
|
138
|
+
type: Object,
|
|
139
|
+
default: () => ({
|
|
140
|
+
attr: {
|
|
141
|
+
min: 0,
|
|
142
|
+
max: 10,
|
|
143
|
+
disabled: !1
|
|
144
|
+
},
|
|
145
|
+
rule: []
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
setup(e, {
|
|
150
|
+
emit: r
|
|
151
|
+
}) {
|
|
152
|
+
const o = b(e, "value", r), {
|
|
153
|
+
t: a
|
|
154
|
+
} = v();
|
|
155
|
+
return o.value.attr || (o.value.attr = {
|
|
156
|
+
min: 0,
|
|
157
|
+
max: 10,
|
|
158
|
+
disabled: !1
|
|
159
|
+
}), () => t("div", null, [t(y, {
|
|
160
|
+
value: o.value,
|
|
161
|
+
"onUpdate:value": (m) => o.value = m
|
|
162
|
+
}, null), t(C, {
|
|
163
|
+
title: a("components.formEditor.common.componentConfig")
|
|
164
|
+
}, {
|
|
165
|
+
default: () => [t(n, {
|
|
166
|
+
label: a("components.formEditor.common.minCount")
|
|
167
|
+
}, {
|
|
168
|
+
default: () => [t(u, {
|
|
169
|
+
value: o.value.attr.min,
|
|
170
|
+
"onUpdate:value": (m) => o.value.attr.min = m,
|
|
171
|
+
min: 0,
|
|
172
|
+
max: 50,
|
|
173
|
+
placeholder: a("components.formEditor.common.minCount")
|
|
174
|
+
}, null)]
|
|
175
|
+
}), t(n, {
|
|
176
|
+
label: a("components.formEditor.common.maxCount")
|
|
177
|
+
}, {
|
|
178
|
+
default: () => [t(u, {
|
|
179
|
+
value: o.value.attr.max,
|
|
180
|
+
"onUpdate:value": (m) => o.value.attr.max = m,
|
|
181
|
+
min: 1,
|
|
182
|
+
max: 100,
|
|
183
|
+
placeholder: a("components.formEditor.common.maxCount")
|
|
184
|
+
}, null)]
|
|
185
|
+
}), t(n, {
|
|
186
|
+
label: a("components.formEditor.common.disabled"),
|
|
187
|
+
labelPlacement: "left"
|
|
188
|
+
}, {
|
|
189
|
+
default: () => [t("div", {
|
|
190
|
+
class: "flex flex-1 justify-end"
|
|
191
|
+
}, [t(x, {
|
|
192
|
+
value: o.value.attr.disabled,
|
|
193
|
+
"onUpdate:value": (m) => o.value.attr.disabled = m
|
|
194
|
+
}, null)])]
|
|
195
|
+
})]
|
|
196
|
+
}), t(E, {
|
|
197
|
+
value: o.value.rule,
|
|
198
|
+
"onUpdate:value": (m) => o.value.rule = m
|
|
199
|
+
}, null)]);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
function It(e) {
|
|
203
|
+
return {
|
|
204
|
+
name: "dux-dynamic-input",
|
|
205
|
+
icon: "i-tabler:calendar-due",
|
|
206
|
+
label: e("components.formEditor.dynamicInput.label"),
|
|
207
|
+
group: "form",
|
|
208
|
+
component: (r) => t(D, r, null),
|
|
209
|
+
setting: (r) => t(F, r, null),
|
|
210
|
+
nested: !0,
|
|
211
|
+
settingDefault: {
|
|
212
|
+
label: e("components.formEditor.dynamicInput.label"),
|
|
213
|
+
name: "data",
|
|
214
|
+
attr: {
|
|
215
|
+
min: 0,
|
|
216
|
+
max: 10,
|
|
217
|
+
disabled: !1
|
|
218
|
+
},
|
|
219
|
+
rule: [],
|
|
220
|
+
defaultValue: []
|
|
221
|
+
},
|
|
222
|
+
json: h
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
export {
|
|
226
|
+
It as duxFormEditorDynamicInput
|
|
227
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { createVNode as t, defineComponent as n } from "vue";
|
|
2
|
+
import { useI18n as p } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as u } from "@vueuse/core";
|
|
4
|
+
import { NSwitch as d, NInputNumber as s, NDynamicTags as c } 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 a } 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 { DuxFormEditorItem as f, DuxFormEditorRule as v } from "../base/base.js";
|
|
40
|
+
import { WidgetEditorSettingCard as l } from "../../designEditor/editor/setting.js";
|
|
41
|
+
import "@iconify-json/tabler/icons.json";
|
|
42
|
+
import "../../posterEditor/elements/index.js";
|
|
43
|
+
import "fabric";
|
|
44
|
+
import "mime";
|
|
45
|
+
import "dayjs";
|
|
46
|
+
import "@tanstack/vue-query";
|
|
47
|
+
import "pinia";
|
|
48
|
+
import "short-unique-id";
|
|
49
|
+
const g = /* @__PURE__ */ n({
|
|
50
|
+
props: {
|
|
51
|
+
options: Object
|
|
52
|
+
},
|
|
53
|
+
setup(o) {
|
|
54
|
+
return () => t(a, {
|
|
55
|
+
label: o.options?.label,
|
|
56
|
+
description: o.options?.desc
|
|
57
|
+
}, {
|
|
58
|
+
default: () => [t(c, o.options?.attr, null)]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
function b(o) {
|
|
63
|
+
const {
|
|
64
|
+
options: r,
|
|
65
|
+
model: e
|
|
66
|
+
} = o || {};
|
|
67
|
+
return {
|
|
68
|
+
tag: "dux-form-item",
|
|
69
|
+
attrs: {
|
|
70
|
+
label: r?.label,
|
|
71
|
+
description: r?.desc
|
|
72
|
+
},
|
|
73
|
+
children: [{
|
|
74
|
+
tag: "n-dynamic-tags",
|
|
75
|
+
attrs: {
|
|
76
|
+
...r?.attr,
|
|
77
|
+
"v-model:value": [e, r?.name]
|
|
78
|
+
}
|
|
79
|
+
}]
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const x = /* @__PURE__ */ n({
|
|
83
|
+
props: {
|
|
84
|
+
value: {
|
|
85
|
+
type: Object,
|
|
86
|
+
default: {}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
setup(o, {
|
|
90
|
+
emit: r
|
|
91
|
+
}) {
|
|
92
|
+
const e = u(o, "value", r), {
|
|
93
|
+
t: i
|
|
94
|
+
} = p();
|
|
95
|
+
return () => t("div", {
|
|
96
|
+
class: ""
|
|
97
|
+
}, [t(f, {
|
|
98
|
+
value: o.value,
|
|
99
|
+
"onUpdate:value": (m) => o.value = m
|
|
100
|
+
}, null), t(l, {
|
|
101
|
+
title: i("components.formEditor.config")
|
|
102
|
+
}, {
|
|
103
|
+
default: () => [t(a, {
|
|
104
|
+
label: i("components.formEditor.common.disabled"),
|
|
105
|
+
labelPlacement: "left"
|
|
106
|
+
}, {
|
|
107
|
+
default: () => [t("div", {
|
|
108
|
+
class: "flex flex-1 justify-end"
|
|
109
|
+
}, [t(d, {
|
|
110
|
+
value: e.value.attr.disabled,
|
|
111
|
+
"onUpdate:value": (m) => e.value.attr.disabled = m
|
|
112
|
+
}, null)])]
|
|
113
|
+
})]
|
|
114
|
+
}), t(l, {
|
|
115
|
+
title: i("components.formEditor.options")
|
|
116
|
+
}, {
|
|
117
|
+
default: () => [t(a, {
|
|
118
|
+
label: i("components.formEditor.dynamicTags.max")
|
|
119
|
+
}, {
|
|
120
|
+
default: () => [t(s, {
|
|
121
|
+
value: e.value.attr.max,
|
|
122
|
+
"onUpdate:value": (m) => e.value.attr.max = m
|
|
123
|
+
}, null)]
|
|
124
|
+
})]
|
|
125
|
+
}), t(v, {
|
|
126
|
+
value: e.value.rule,
|
|
127
|
+
"onUpdate:value": (m) => e.value.rule = m
|
|
128
|
+
}, null)]);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
function ct(o) {
|
|
132
|
+
return {
|
|
133
|
+
name: "dynamic-tags",
|
|
134
|
+
icon: "i-tabler:tag",
|
|
135
|
+
label: o("components.formEditor.dynamicTags.name"),
|
|
136
|
+
group: "form",
|
|
137
|
+
component: (r) => t(g, r, null),
|
|
138
|
+
setting: (r) => t(x, r, null),
|
|
139
|
+
settingDefault: {
|
|
140
|
+
label: o("components.formEditor.dynamicTags.name"),
|
|
141
|
+
name: "dynamic-tags",
|
|
142
|
+
attr: {},
|
|
143
|
+
rule: []
|
|
144
|
+
},
|
|
145
|
+
json: b
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
ct as duxFormEditorDynamicTags
|
|
150
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { createVNode as r, defineComponent as p } from "vue";
|
|
2
|
+
import { useI18n as n } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as a } from "@vueuse/core";
|
|
4
|
+
import { NInput as u } 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 { DuxAiEditor as d } from "../../editor/aiEditor.js";
|
|
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 { DuxFormEditorItem as s, DuxFormEditorRule as c } from "../base/base.js";
|
|
40
|
+
import { WidgetEditorSettingCard as f } from "../../designEditor/editor/setting.js";
|
|
41
|
+
import "@iconify-json/tabler/icons.json";
|
|
42
|
+
import "../../posterEditor/elements/index.js";
|
|
43
|
+
import "fabric";
|
|
44
|
+
import "mime";
|
|
45
|
+
import "dayjs";
|
|
46
|
+
import "@tanstack/vue-query";
|
|
47
|
+
import "pinia";
|
|
48
|
+
import "short-unique-id";
|
|
49
|
+
const E = /* @__PURE__ */ p({
|
|
50
|
+
name: "FormEditorAIEditor",
|
|
51
|
+
props: {
|
|
52
|
+
options: Object
|
|
53
|
+
},
|
|
54
|
+
setup(t) {
|
|
55
|
+
return () => r(l, {
|
|
56
|
+
label: t.options?.label,
|
|
57
|
+
description: t.options?.desc
|
|
58
|
+
}, {
|
|
59
|
+
default: () => [r(d, t.options?.attr, null)]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
function v(t) {
|
|
64
|
+
const {
|
|
65
|
+
options: o,
|
|
66
|
+
model: i
|
|
67
|
+
} = t || {};
|
|
68
|
+
return {
|
|
69
|
+
tag: "dux-form-item",
|
|
70
|
+
attrs: {
|
|
71
|
+
label: o?.label,
|
|
72
|
+
description: o?.desc
|
|
73
|
+
},
|
|
74
|
+
children: [{
|
|
75
|
+
tag: "dux-ai-editor",
|
|
76
|
+
attrs: {
|
|
77
|
+
...o?.attr,
|
|
78
|
+
"v-model:value": [i, o?.name]
|
|
79
|
+
}
|
|
80
|
+
}]
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const b = /* @__PURE__ */ p({
|
|
84
|
+
name: "FormEditorAIEditorSetting",
|
|
85
|
+
props: {
|
|
86
|
+
value: {
|
|
87
|
+
type: Object,
|
|
88
|
+
default: {}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
setup(t, {
|
|
92
|
+
emit: o
|
|
93
|
+
}) {
|
|
94
|
+
const i = a(t, "value", o), {
|
|
95
|
+
t: m
|
|
96
|
+
} = n();
|
|
97
|
+
return () => r("div", {
|
|
98
|
+
class: ""
|
|
99
|
+
}, [r(s, {
|
|
100
|
+
value: t.value,
|
|
101
|
+
"onUpdate:value": (e) => t.value = e
|
|
102
|
+
}, null), r(f, {
|
|
103
|
+
title: m("components.formEditor.common.componentConfig")
|
|
104
|
+
}, {
|
|
105
|
+
default: () => [r(l, {
|
|
106
|
+
label: m("components.formEditor.aiEditor.uploadUrl"),
|
|
107
|
+
description: m("components.formEditor.aiEditor.uploadUrlFeedback")
|
|
108
|
+
}, {
|
|
109
|
+
default: () => [r(u, {
|
|
110
|
+
value: i.value.attr.uploadUrl,
|
|
111
|
+
"onUpdate:value": (e) => i.value.attr.uploadUrl = e
|
|
112
|
+
}, null)]
|
|
113
|
+
})]
|
|
114
|
+
}), r(c, {
|
|
115
|
+
value: i.value.rule,
|
|
116
|
+
"onUpdate:value": (e) => i.value.rule = e
|
|
117
|
+
}, null)]);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
function st(t) {
|
|
121
|
+
return {
|
|
122
|
+
name: "dux-editor",
|
|
123
|
+
icon: "i-tabler:pencil",
|
|
124
|
+
label: t("components.formEditor.aiEditor.label"),
|
|
125
|
+
group: "form",
|
|
126
|
+
component: (o) => r(E, o, null),
|
|
127
|
+
setting: (o) => r(b, o, null),
|
|
128
|
+
settingDefault: {
|
|
129
|
+
label: t("components.formEditor.aiEditor.label"),
|
|
130
|
+
name: "editor",
|
|
131
|
+
attr: {},
|
|
132
|
+
rule: []
|
|
133
|
+
},
|
|
134
|
+
json: v
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export {
|
|
138
|
+
st as duxFormEditorAIEditor
|
|
139
|
+
};
|