@duxweb/dvha-pro 1.0.33 → 1.0.35
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 -1
- package/dist/cjs/components/designEditor/editor/hook.cjs +1 -1
- package/dist/cjs/components/designEditor/editor.cjs +1 -1
- package/dist/cjs/components/form/pageForm.cjs +1 -1
- package/dist/cjs/components/form/pageTabForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/formEditor/base/base.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascader.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascaderAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/checkbox.cjs +1 -1
- package/dist/cjs/components/formEditor/components/color.cjs +1 -1
- package/dist/cjs/components/formEditor/components/date.cjs +1 -1
- package/dist/cjs/components/formEditor/components/dynamicInput.cjs +1 -1
- package/dist/cjs/components/formEditor/components/dynamicTags.cjs +1 -1
- package/dist/cjs/components/formEditor/components/editor.cjs +1 -1
- package/dist/cjs/components/formEditor/components/fileUpload.cjs +1 -0
- package/dist/cjs/components/formEditor/components/imageUpload.cjs +1 -0
- package/dist/cjs/components/formEditor/components/input.cjs +1 -1
- package/dist/cjs/components/formEditor/components/inputNumber.cjs +1 -1
- package/dist/cjs/components/formEditor/components/mentionAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/radio.cjs +1 -1
- package/dist/cjs/components/formEditor/components/region.cjs +1 -1
- package/dist/cjs/components/formEditor/components/select.cjs +1 -1
- package/dist/cjs/components/formEditor/components/selectAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/sider.cjs +1 -1
- package/dist/cjs/components/formEditor/components/switch.cjs +1 -1
- package/dist/cjs/components/formEditor/components/time.cjs +1 -1
- package/dist/cjs/components/formEditor/components/transferAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/treeSelect.cjs +1 -1
- package/dist/cjs/components/formEditor/components/treeSelectAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/editor.cjs +1 -1
- package/dist/cjs/components/formEditor/renderer.cjs +1 -1
- package/dist/cjs/components/icon/icon.cjs +1 -1
- 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/table/table.cjs +1 -1
- package/dist/cjs/components/upload/config.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/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/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/theme/uno.css.cjs +2 -1
- package/dist/esm/component.js +11 -11
- package/dist/esm/components/chart/echart.js +1 -1
- package/dist/esm/components/crop/imageCrop.js +1 -1
- package/dist/esm/components/data/dynamicSelect.js +1 -1
- package/dist/esm/components/data/selectModal.js +1 -1
- package/dist/esm/components/designEditor/components/grid.js +1 -1
- package/dist/esm/components/designEditor/editor/hook.js +17 -17
- package/dist/esm/components/designEditor/editor.js +6 -6
- package/dist/esm/components/form/pageForm.js +1 -1
- package/dist/esm/components/form/pageTabForm.js +1 -1
- package/dist/esm/components/form/settingForm.js +1 -1
- package/dist/esm/components/formEditor/base/base.js +1 -1
- package/dist/esm/components/formEditor/components/cascader.js +1 -1
- package/dist/esm/components/formEditor/components/cascaderAsync.js +1 -1
- package/dist/esm/components/formEditor/components/checkbox.js +1 -1
- package/dist/esm/components/formEditor/components/color.js +1 -1
- package/dist/esm/components/formEditor/components/date.js +1 -1
- package/dist/esm/components/formEditor/components/dynamicInput.js +1 -1
- package/dist/esm/components/formEditor/components/dynamicTags.js +1 -1
- package/dist/esm/components/formEditor/components/editor.js +1 -1
- package/dist/esm/components/formEditor/components/fileUpload.js +191 -0
- package/dist/esm/components/formEditor/components/imageUpload.js +182 -0
- package/dist/esm/components/formEditor/components/input.js +1 -1
- package/dist/esm/components/formEditor/components/inputNumber.js +1 -1
- package/dist/esm/components/formEditor/components/mentionAsync.js +1 -1
- package/dist/esm/components/formEditor/components/radio.js +1 -1
- package/dist/esm/components/formEditor/components/region.js +1 -1
- package/dist/esm/components/formEditor/components/select.js +1 -1
- package/dist/esm/components/formEditor/components/selectAsync.js +1 -1
- package/dist/esm/components/formEditor/components/sider.js +1 -1
- package/dist/esm/components/formEditor/components/switch.js +1 -1
- package/dist/esm/components/formEditor/components/time.js +1 -1
- package/dist/esm/components/formEditor/components/transferAsync.js +1 -1
- package/dist/esm/components/formEditor/components/treeSelect.js +1 -1
- package/dist/esm/components/formEditor/components/treeSelectAsync.js +1 -1
- package/dist/esm/components/formEditor/editor.js +26 -24
- package/dist/esm/components/formEditor/renderer.js +32 -30
- package/dist/esm/components/icon/icon.js +1 -1
- package/dist/esm/components/layout/list.js +1 -1
- package/dist/esm/components/layout/table.js +1 -1
- package/dist/esm/components/level/level.js +1 -1
- package/dist/esm/components/table/table.js +1 -1
- package/dist/esm/components/upload/config.js +13 -12
- package/dist/esm/components/upload/file.js +62 -57
- package/dist/esm/components/upload/image.js +51 -47
- package/dist/esm/components/upload/manage/item.js +3 -3
- package/dist/esm/components/upload/manager.js +92 -89
- package/dist/esm/langs/en-US.json.js +5 -5
- package/dist/esm/langs/zh-CN.json.js +6 -6
- package/dist/esm/pages/authLayout.js +1 -1
- package/dist/esm/pages/layout/page.js +1 -1
- package/dist/esm/pages/menu/button.js +1 -1
- package/dist/esm/pages/menu/cmd.js +1 -1
- package/dist/esm/pages/menu/main.js +1 -1
- package/dist/esm/pages/menu/mobile.js +1 -1
- package/dist/esm/theme/uno.css.js +2 -1
- package/dist/types/components/formEditor/components/fileUpload.d.ts +2 -0
- package/dist/types/components/formEditor/components/imageUpload.d.ts +2 -0
- package/dist/types/components/formEditor/components/index.d.ts +4 -2
- package/dist/types/components/upload/config.d.ts +4 -2
- package/dist/types/components/upload/file.d.ts +1 -0
- package/dist/types/components/upload/image.d.ts +2 -3
- package/dist/types/components/upload/manager.d.ts +1 -0
- package/dist/types/main.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { createVNode as o, defineComponent as n } from "vue";
|
|
2
|
+
import { useI18n as u } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as d } from "@vueuse/core";
|
|
4
|
+
import { NInput as c, NInputNumber as a, NCheckbox as p } 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 i } from "../../form/formItem.js";
|
|
26
|
+
import "@vee-validate/i18n";
|
|
27
|
+
import "colorizr";
|
|
28
|
+
import "echarts";
|
|
29
|
+
import "highlight.js/lib/core";
|
|
30
|
+
import "highlight.js/lib/languages/bash";
|
|
31
|
+
import "highlight.js/lib/languages/css";
|
|
32
|
+
import "highlight.js/lib/languages/go";
|
|
33
|
+
import "highlight.js/lib/languages/java";
|
|
34
|
+
import "highlight.js/lib/languages/javascript";
|
|
35
|
+
import "highlight.js/lib/languages/json";
|
|
36
|
+
import "highlight.js/lib/languages/markdown";
|
|
37
|
+
import "highlight.js/lib/languages/php";
|
|
38
|
+
import "highlight.js/lib/languages/python";
|
|
39
|
+
import "highlight.js/lib/languages/shell";
|
|
40
|
+
import "highlight.js/lib/languages/sql";
|
|
41
|
+
import "highlight.js/lib/languages/typescript";
|
|
42
|
+
import "highlight.js/lib/languages/xml";
|
|
43
|
+
import "@ant-design/colors";
|
|
44
|
+
import "@unocss/preset-icons/browser";
|
|
45
|
+
import "@unocss/preset-typography";
|
|
46
|
+
import "unocss/preset-wind4";
|
|
47
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
48
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
49
|
+
import "vee-validate";
|
|
50
|
+
import "vue-command-palette";
|
|
51
|
+
import "@duxweb/dvha-naiveui";
|
|
52
|
+
import "../../../pages/page404.js";
|
|
53
|
+
import { DuxFormEditorItem as f, DuxFormEditorRule as s } from "../base/base.js";
|
|
54
|
+
import { WidgetEditorSettingCard as v } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import { DuxFileUpload as b } from "../../upload/file.js";
|
|
56
|
+
import "@iconify-json/tabler/icons.json";
|
|
57
|
+
import "../../posterEditor/elements/index.js";
|
|
58
|
+
import "fabric";
|
|
59
|
+
import "dayjs";
|
|
60
|
+
import "mime";
|
|
61
|
+
import "@tanstack/vue-query";
|
|
62
|
+
import "pinia";
|
|
63
|
+
import "short-unique-id";
|
|
64
|
+
const x = /* @__PURE__ */ n({
|
|
65
|
+
name: "FormEditorFileUpload",
|
|
66
|
+
props: {
|
|
67
|
+
options: Object
|
|
68
|
+
},
|
|
69
|
+
setup(r) {
|
|
70
|
+
return () => o(i, {
|
|
71
|
+
label: r.options?.label,
|
|
72
|
+
description: r.options?.desc
|
|
73
|
+
}, {
|
|
74
|
+
default: () => [o(b, r.options?.attr, null)]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
function U(r) {
|
|
79
|
+
const {
|
|
80
|
+
options: l,
|
|
81
|
+
model: t
|
|
82
|
+
} = r || {};
|
|
83
|
+
return {
|
|
84
|
+
tag: "dux-form-item",
|
|
85
|
+
attrs: {
|
|
86
|
+
label: l?.label,
|
|
87
|
+
description: l?.desc
|
|
88
|
+
},
|
|
89
|
+
children: [{
|
|
90
|
+
tag: "dux-file-upload",
|
|
91
|
+
attrs: {
|
|
92
|
+
...l?.attr,
|
|
93
|
+
"v-model:value": [t, l?.name]
|
|
94
|
+
}
|
|
95
|
+
}]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
const E = /* @__PURE__ */ n({
|
|
99
|
+
name: "FormEditorFileUploadSetting",
|
|
100
|
+
props: {
|
|
101
|
+
value: {
|
|
102
|
+
type: Object,
|
|
103
|
+
default: {}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
setup(r, {
|
|
107
|
+
emit: l
|
|
108
|
+
}) {
|
|
109
|
+
const t = d(r, "value", l), {
|
|
110
|
+
t: m
|
|
111
|
+
} = u();
|
|
112
|
+
return () => o("div", {
|
|
113
|
+
class: ""
|
|
114
|
+
}, [o(f, {
|
|
115
|
+
value: r.value,
|
|
116
|
+
"onUpdate:value": (e) => r.value = e
|
|
117
|
+
}, null), o(v, {
|
|
118
|
+
title: m("components.formEditor.common.componentConfig")
|
|
119
|
+
}, {
|
|
120
|
+
default: () => [o(i, {
|
|
121
|
+
label: m("components.formEditor.fileUpload.accept")
|
|
122
|
+
}, {
|
|
123
|
+
default: () => [o(c, {
|
|
124
|
+
value: t.value.attr.accept,
|
|
125
|
+
"onUpdate:value": (e) => t.value.attr.accept = e,
|
|
126
|
+
placeholder: m("components.formEditor.fileUpload.acceptPlaceholder")
|
|
127
|
+
}, null)]
|
|
128
|
+
}), o(i, {
|
|
129
|
+
label: m("components.formEditor.common.maxCount")
|
|
130
|
+
}, {
|
|
131
|
+
default: () => [o(a, {
|
|
132
|
+
value: t.value.attr.maxNum,
|
|
133
|
+
"onUpdate:value": (e) => t.value.attr.maxNum = e,
|
|
134
|
+
min: 1,
|
|
135
|
+
placeholder: m("components.formEditor.fileUpload.maxNumPlaceholder")
|
|
136
|
+
}, null)]
|
|
137
|
+
}), o(i, {
|
|
138
|
+
label: m("components.formEditor.fileUpload.maxSize")
|
|
139
|
+
}, {
|
|
140
|
+
default: () => [o(a, {
|
|
141
|
+
value: t.value.attr.maxSize,
|
|
142
|
+
"onUpdate:value": (e) => t.value.attr.maxSize = e,
|
|
143
|
+
min: 0,
|
|
144
|
+
placeholder: m("components.formEditor.fileUpload.maxSizePlaceholder")
|
|
145
|
+
}, null)]
|
|
146
|
+
}), o(i, {
|
|
147
|
+
label: m("components.formEditor.common.status")
|
|
148
|
+
}, {
|
|
149
|
+
default: () => [o("div", {
|
|
150
|
+
class: "w-full grid grid-cols-2"
|
|
151
|
+
}, [o(p, {
|
|
152
|
+
label: m("components.formEditor.common.multiple"),
|
|
153
|
+
checked: t.value.attr.multiple,
|
|
154
|
+
"onUpdate:checked": (e) => t.value.attr.multiple = e
|
|
155
|
+
}, null), o(p, {
|
|
156
|
+
label: m("components.formEditor.fileUpload.manager"),
|
|
157
|
+
checked: t.value.attr.manager,
|
|
158
|
+
"onUpdate:checked": (e) => t.value.attr.manager = e
|
|
159
|
+
}, null)])]
|
|
160
|
+
})]
|
|
161
|
+
}), o(s, {
|
|
162
|
+
value: t.value.rule,
|
|
163
|
+
"onUpdate:value": (e) => t.value.rule = e
|
|
164
|
+
}, null)]);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
function jo(r) {
|
|
168
|
+
return {
|
|
169
|
+
name: "dux-file-upload",
|
|
170
|
+
icon: "i-tabler:file-upload",
|
|
171
|
+
label: r("components.formEditor.fileUpload.label"),
|
|
172
|
+
group: "form",
|
|
173
|
+
component: (l) => o(x, l, null),
|
|
174
|
+
setting: (l) => o(E, l, null),
|
|
175
|
+
settingDefault: {
|
|
176
|
+
label: r("components.formEditor.fileUpload.label"),
|
|
177
|
+
name: "files",
|
|
178
|
+
attr: {
|
|
179
|
+
maxSize: 10,
|
|
180
|
+
multiple: !1,
|
|
181
|
+
manager: !1,
|
|
182
|
+
accept: "*/*"
|
|
183
|
+
},
|
|
184
|
+
rule: []
|
|
185
|
+
},
|
|
186
|
+
json: U
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
export {
|
|
190
|
+
jo as duxFormEditorFileUpload
|
|
191
|
+
};
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { createVNode as o, defineComponent as n } from "vue";
|
|
2
|
+
import { useI18n as u } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as d } from "@vueuse/core";
|
|
4
|
+
import { NInputNumber as l, NCheckbox as p } 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 "highlight.js/lib/core";
|
|
30
|
+
import "highlight.js/lib/languages/bash";
|
|
31
|
+
import "highlight.js/lib/languages/css";
|
|
32
|
+
import "highlight.js/lib/languages/go";
|
|
33
|
+
import "highlight.js/lib/languages/java";
|
|
34
|
+
import "highlight.js/lib/languages/javascript";
|
|
35
|
+
import "highlight.js/lib/languages/json";
|
|
36
|
+
import "highlight.js/lib/languages/markdown";
|
|
37
|
+
import "highlight.js/lib/languages/php";
|
|
38
|
+
import "highlight.js/lib/languages/python";
|
|
39
|
+
import "highlight.js/lib/languages/shell";
|
|
40
|
+
import "highlight.js/lib/languages/sql";
|
|
41
|
+
import "highlight.js/lib/languages/typescript";
|
|
42
|
+
import "highlight.js/lib/languages/xml";
|
|
43
|
+
import "@ant-design/colors";
|
|
44
|
+
import "@unocss/preset-icons/browser";
|
|
45
|
+
import "@unocss/preset-typography";
|
|
46
|
+
import "unocss/preset-wind4";
|
|
47
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
48
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
49
|
+
import "vee-validate";
|
|
50
|
+
import "vue-command-palette";
|
|
51
|
+
import "@duxweb/dvha-naiveui";
|
|
52
|
+
import "../../../pages/page404.js";
|
|
53
|
+
import { DuxFormEditorItem as c, DuxFormEditorRule as s } from "../base/base.js";
|
|
54
|
+
import { WidgetEditorSettingCard as f } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
56
|
+
import { DuxImageUpload as g } from "../../upload/image.js";
|
|
57
|
+
import "@iconify-json/tabler/icons.json";
|
|
58
|
+
import "../../posterEditor/elements/index.js";
|
|
59
|
+
import "fabric";
|
|
60
|
+
import "dayjs";
|
|
61
|
+
import "@tanstack/vue-query";
|
|
62
|
+
import "pinia";
|
|
63
|
+
import "short-unique-id";
|
|
64
|
+
const v = /* @__PURE__ */ n({
|
|
65
|
+
name: "FormEditorImageUpload",
|
|
66
|
+
props: {
|
|
67
|
+
options: Object
|
|
68
|
+
},
|
|
69
|
+
setup(t) {
|
|
70
|
+
return () => o(a, {
|
|
71
|
+
label: t.options?.label,
|
|
72
|
+
description: t.options?.desc
|
|
73
|
+
}, {
|
|
74
|
+
default: () => [o(g, t.options?.attr, null)]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
function x(t) {
|
|
79
|
+
const {
|
|
80
|
+
options: r,
|
|
81
|
+
model: m
|
|
82
|
+
} = t || {};
|
|
83
|
+
return {
|
|
84
|
+
tag: "dux-form-item",
|
|
85
|
+
attrs: {
|
|
86
|
+
label: r?.label,
|
|
87
|
+
description: r?.desc
|
|
88
|
+
},
|
|
89
|
+
children: [{
|
|
90
|
+
tag: "dux-image-upload",
|
|
91
|
+
attrs: {
|
|
92
|
+
...r?.attr,
|
|
93
|
+
"v-model:value": [m, r?.name]
|
|
94
|
+
}
|
|
95
|
+
}]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
const b = /* @__PURE__ */ n({
|
|
99
|
+
name: "FormEditorImageUploadSetting",
|
|
100
|
+
props: {
|
|
101
|
+
value: {
|
|
102
|
+
type: Object,
|
|
103
|
+
default: {}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
setup(t, {
|
|
107
|
+
emit: r
|
|
108
|
+
}) {
|
|
109
|
+
const m = d(t, "value", r), {
|
|
110
|
+
t: i
|
|
111
|
+
} = u();
|
|
112
|
+
return () => o("div", {
|
|
113
|
+
class: ""
|
|
114
|
+
}, [o(c, {
|
|
115
|
+
value: t.value,
|
|
116
|
+
"onUpdate:value": (e) => t.value = e
|
|
117
|
+
}, null), o(f, {
|
|
118
|
+
title: i("components.formEditor.common.componentConfig")
|
|
119
|
+
}, {
|
|
120
|
+
default: () => [o(a, {
|
|
121
|
+
label: i("components.formEditor.common.maxCount")
|
|
122
|
+
}, {
|
|
123
|
+
default: () => [o(l, {
|
|
124
|
+
value: m.value.attr.maxNum,
|
|
125
|
+
"onUpdate:value": (e) => m.value.attr.maxNum = e,
|
|
126
|
+
min: 1,
|
|
127
|
+
placeholder: i("components.formEditor.imageUpload.maxNumPlaceholder")
|
|
128
|
+
}, null)]
|
|
129
|
+
}), o(a, {
|
|
130
|
+
label: i("components.formEditor.imageUpload.maxSize")
|
|
131
|
+
}, {
|
|
132
|
+
default: () => [o(l, {
|
|
133
|
+
value: m.value.attr.maxSize,
|
|
134
|
+
"onUpdate:value": (e) => m.value.attr.maxSize = e,
|
|
135
|
+
min: 0,
|
|
136
|
+
placeholder: i("components.formEditor.imageUpload.maxSizePlaceholder")
|
|
137
|
+
}, null)]
|
|
138
|
+
}), o(a, {
|
|
139
|
+
label: i("components.formEditor.common.status")
|
|
140
|
+
}, {
|
|
141
|
+
default: () => [o("div", {
|
|
142
|
+
class: "w-full grid grid-cols-2"
|
|
143
|
+
}, [o(p, {
|
|
144
|
+
label: i("components.formEditor.common.multiple"),
|
|
145
|
+
checked: m.value.attr.multiple,
|
|
146
|
+
"onUpdate:checked": (e) => m.value.attr.multiple = e
|
|
147
|
+
}, null), o(p, {
|
|
148
|
+
label: i("components.formEditor.imageUpload.manager"),
|
|
149
|
+
checked: m.value.attr.manager,
|
|
150
|
+
"onUpdate:checked": (e) => m.value.attr.manager = e
|
|
151
|
+
}, null)])]
|
|
152
|
+
})]
|
|
153
|
+
}), o(s, {
|
|
154
|
+
value: m.value.rule,
|
|
155
|
+
"onUpdate:value": (e) => m.value.rule = e
|
|
156
|
+
}, null)]);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
function Do(t) {
|
|
160
|
+
return {
|
|
161
|
+
name: "dux-image-upload",
|
|
162
|
+
icon: "i-tabler:photo",
|
|
163
|
+
label: t("components.formEditor.imageUpload.label"),
|
|
164
|
+
group: "form",
|
|
165
|
+
component: (r) => o(v, r, null),
|
|
166
|
+
setting: (r) => o(b, r, null),
|
|
167
|
+
settingDefault: {
|
|
168
|
+
label: t("components.formEditor.imageUpload.label"),
|
|
169
|
+
name: "images",
|
|
170
|
+
attr: {
|
|
171
|
+
maxSize: 5,
|
|
172
|
+
multiple: !1,
|
|
173
|
+
manager: !1
|
|
174
|
+
},
|
|
175
|
+
rule: []
|
|
176
|
+
},
|
|
177
|
+
json: x
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
export {
|
|
181
|
+
Do as duxFormEditorImageUpload
|
|
182
|
+
};
|
|
@@ -52,10 +52,10 @@ import "@duxweb/dvha-naiveui";
|
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
53
|
import { DuxFormEditorItem as f, DuxFormEditorRule as b } from "../base/base.js";
|
|
54
54
|
import { WidgetEditorSettingCard as x } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
55
56
|
import "@iconify-json/tabler/icons.json";
|
|
56
57
|
import "../../posterEditor/elements/index.js";
|
|
57
58
|
import "fabric";
|
|
58
|
-
import "mime";
|
|
59
59
|
import "dayjs";
|
|
60
60
|
import "@tanstack/vue-query";
|
|
61
61
|
import "pinia";
|
|
@@ -52,10 +52,10 @@ import "@duxweb/dvha-naiveui";
|
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
53
|
import { DuxFormEditorItem as s, DuxFormEditorRule as f } from "../base/base.js";
|
|
54
54
|
import { WidgetEditorSettingCard as v } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
55
56
|
import "@iconify-json/tabler/icons.json";
|
|
56
57
|
import "../../posterEditor/elements/index.js";
|
|
57
58
|
import "fabric";
|
|
58
|
-
import "mime";
|
|
59
59
|
import "dayjs";
|
|
60
60
|
import "@tanstack/vue-query";
|
|
61
61
|
import "pinia";
|
|
@@ -52,10 +52,10 @@ import "vue-command-palette";
|
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
53
|
import { DuxFormEditorItem as f, DuxFormEditorRule as v } from "../base/base.js";
|
|
54
54
|
import { WidgetEditorSettingCard as p } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
55
56
|
import "@iconify-json/tabler/icons.json";
|
|
56
57
|
import "../../posterEditor/elements/index.js";
|
|
57
58
|
import "fabric";
|
|
58
|
-
import "mime";
|
|
59
59
|
import "dayjs";
|
|
60
60
|
import "@tanstack/vue-query";
|
|
61
61
|
import "pinia";
|
|
@@ -53,10 +53,10 @@ import "@duxweb/dvha-naiveui";
|
|
|
53
53
|
import "../../../pages/page404.js";
|
|
54
54
|
import { DuxFormEditorItem as V, DuxFormEditorRule as h } from "../base/base.js";
|
|
55
55
|
import { WidgetEditorSettingCard as p } from "../../designEditor/editor/setting.js";
|
|
56
|
+
import "mime";
|
|
56
57
|
import "@iconify-json/tabler/icons.json";
|
|
57
58
|
import "../../posterEditor/elements/index.js";
|
|
58
59
|
import "fabric";
|
|
59
|
-
import "mime";
|
|
60
60
|
import "dayjs";
|
|
61
61
|
import "@tanstack/vue-query";
|
|
62
62
|
import "pinia";
|
|
@@ -52,11 +52,11 @@ import "@duxweb/dvha-naiveui";
|
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
53
|
import { DuxFormEditorItem as s, DuxFormEditorRule as c } from "../base/base.js";
|
|
54
54
|
import { WidgetEditorSettingCard as v } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
55
56
|
import { DuxLevel as f } from "../../level/level.js";
|
|
56
57
|
import "@iconify-json/tabler/icons.json";
|
|
57
58
|
import "../../posterEditor/elements/index.js";
|
|
58
59
|
import "fabric";
|
|
59
|
-
import "mime";
|
|
60
60
|
import "dayjs";
|
|
61
61
|
import "@tanstack/vue-query";
|
|
62
62
|
import "pinia";
|
|
@@ -53,10 +53,10 @@ import "@duxweb/dvha-naiveui";
|
|
|
53
53
|
import "../../../pages/page404.js";
|
|
54
54
|
import { DuxFormEditorItem as g, DuxFormEditorRule as x } from "../base/base.js";
|
|
55
55
|
import { WidgetEditorSettingCard as p } from "../../designEditor/editor/setting.js";
|
|
56
|
+
import "mime";
|
|
56
57
|
import "@iconify-json/tabler/icons.json";
|
|
57
58
|
import "../../posterEditor/elements/index.js";
|
|
58
59
|
import "fabric";
|
|
59
|
-
import "mime";
|
|
60
60
|
import "dayjs";
|
|
61
61
|
import "@tanstack/vue-query";
|
|
62
62
|
import "pinia";
|
|
@@ -52,10 +52,10 @@ import "vue-command-palette";
|
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
53
|
import { DuxFormEditorItem as v, DuxFormEditorRule as f } from "../base/base.js";
|
|
54
54
|
import { WidgetEditorSettingCard as u } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
55
56
|
import "@iconify-json/tabler/icons.json";
|
|
56
57
|
import "../../posterEditor/elements/index.js";
|
|
57
58
|
import "fabric";
|
|
58
|
-
import "mime";
|
|
59
59
|
import "dayjs";
|
|
60
60
|
import "@tanstack/vue-query";
|
|
61
61
|
import "pinia";
|
|
@@ -52,10 +52,10 @@ import "@duxweb/dvha-naiveui";
|
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
53
|
import { DuxFormEditorItem as c, DuxFormEditorRule as v } from "../base/base.js";
|
|
54
54
|
import { WidgetEditorSettingCard as a } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
55
56
|
import "@iconify-json/tabler/icons.json";
|
|
56
57
|
import "../../posterEditor/elements/index.js";
|
|
57
58
|
import "fabric";
|
|
58
|
-
import "mime";
|
|
59
59
|
import "dayjs";
|
|
60
60
|
import "@tanstack/vue-query";
|
|
61
61
|
import "pinia";
|
|
@@ -52,10 +52,10 @@ import "@duxweb/dvha-naiveui";
|
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
53
|
import { DuxFormEditorItem as d, DuxFormEditorRule as s } from "../base/base.js";
|
|
54
54
|
import { WidgetEditorSettingCard as c } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
55
56
|
import "@iconify-json/tabler/icons.json";
|
|
56
57
|
import "../../posterEditor/elements/index.js";
|
|
57
58
|
import "fabric";
|
|
58
|
-
import "mime";
|
|
59
59
|
import "dayjs";
|
|
60
60
|
import "@tanstack/vue-query";
|
|
61
61
|
import "pinia";
|
|
@@ -52,10 +52,10 @@ import "@duxweb/dvha-naiveui";
|
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
53
|
import { DuxFormEditorItem as c, DuxFormEditorRule as f } from "../base/base.js";
|
|
54
54
|
import { WidgetEditorSettingCard as v } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
55
56
|
import "@iconify-json/tabler/icons.json";
|
|
56
57
|
import "../../posterEditor/elements/index.js";
|
|
57
58
|
import "fabric";
|
|
58
|
-
import "mime";
|
|
59
59
|
import "dayjs";
|
|
60
60
|
import "@tanstack/vue-query";
|
|
61
61
|
import "pinia";
|
|
@@ -52,10 +52,10 @@ import "vue-command-palette";
|
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
53
|
import { DuxFormEditorItem as f, DuxFormEditorRule as v } from "../base/base.js";
|
|
54
54
|
import { WidgetEditorSettingCard as p } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
55
56
|
import "@iconify-json/tabler/icons.json";
|
|
56
57
|
import "../../posterEditor/elements/index.js";
|
|
57
58
|
import "fabric";
|
|
58
|
-
import "mime";
|
|
59
59
|
import "dayjs";
|
|
60
60
|
import "@tanstack/vue-query";
|
|
61
61
|
import "pinia";
|
|
@@ -53,10 +53,10 @@ import "@duxweb/dvha-naiveui";
|
|
|
53
53
|
import "../../../pages/page404.js";
|
|
54
54
|
import { DuxFormEditorItem as x, DuxFormEditorRule as g } from "../base/base.js";
|
|
55
55
|
import { WidgetEditorSettingCard as p } from "../../designEditor/editor/setting.js";
|
|
56
|
+
import "mime";
|
|
56
57
|
import "@iconify-json/tabler/icons.json";
|
|
57
58
|
import "../../posterEditor/elements/index.js";
|
|
58
59
|
import "fabric";
|
|
59
|
-
import "mime";
|
|
60
60
|
import "dayjs";
|
|
61
61
|
import "@tanstack/vue-query";
|
|
62
62
|
import "pinia";
|
|
@@ -52,10 +52,10 @@ import "vue-command-palette";
|
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
53
|
import { DuxFormEditorItem as f, DuxFormEditorRule as v } from "../base/base.js";
|
|
54
54
|
import { WidgetEditorSettingCard as n } from "../../designEditor/editor/setting.js";
|
|
55
|
+
import "mime";
|
|
55
56
|
import "@iconify-json/tabler/icons.json";
|
|
56
57
|
import "../../posterEditor/elements/index.js";
|
|
57
58
|
import "fabric";
|
|
58
|
-
import "mime";
|
|
59
59
|
import "dayjs";
|
|
60
60
|
import "@tanstack/vue-query";
|
|
61
61
|
import "pinia";
|
|
@@ -48,7 +48,7 @@ import "vee-validate";
|
|
|
48
48
|
import "vue-command-palette";
|
|
49
49
|
import "@duxweb/dvha-naiveui";
|
|
50
50
|
import "../../pages/page404.js";
|
|
51
|
-
import { DuxDesignEditor as
|
|
51
|
+
import { DuxDesignEditor as l } from "../designEditor/editor.js";
|
|
52
52
|
import "short-unique-id";
|
|
53
53
|
import "aieditor";
|
|
54
54
|
import { DuxFormLayout as g } from "../form/formLayout.js";
|
|
@@ -61,40 +61,42 @@ import { duxFormEditorDate as C } from "./components/date.js";
|
|
|
61
61
|
import { duxFormEditorDynamicInput as P } from "./components/dynamicInput.js";
|
|
62
62
|
import { duxFormEditorDynamicTags as k } from "./components/dynamicTags.js";
|
|
63
63
|
import { duxFormEditorAIEditor as A } from "./components/editor.js";
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
64
|
+
import { duxFormEditorFileUpload as I } from "./components/fileUpload.js";
|
|
65
|
+
import { duxFormEditorImageUpload as h } from "./components/imageUpload.js";
|
|
66
|
+
import { duxFormEditorInput as j } from "./components/input.js";
|
|
67
|
+
import { duxFormEditorInputNumber as T } from "./components/inputNumber.js";
|
|
68
|
+
import { duxFormEditorMentionAsync as w } from "./components/mentionAsync.js";
|
|
69
|
+
import { duxFormEditorRadio as N } from "./components/radio.js";
|
|
70
|
+
import { duxFormEditorRegion as O } from "./components/region.js";
|
|
71
|
+
import { duxFormEditorSelect as _ } from "./components/select.js";
|
|
72
|
+
import { duxFormEditorSelectAsync as R } from "./components/selectAsync.js";
|
|
73
|
+
import { duxFormEditorSider as M } from "./components/sider.js";
|
|
74
|
+
import { duxFormEditorSwitch as U } from "./components/switch.js";
|
|
75
|
+
import { duxFormEditorTime as V } from "./components/time.js";
|
|
76
|
+
import { duxFormEditorTransferAsync as B } from "./components/transferAsync.js";
|
|
77
|
+
import { duxFormEditorTreeSelect as L } from "./components/treeSelect.js";
|
|
78
|
+
import { duxFormEditorTreeSelectAsync as W } from "./components/treeSelectAsync.js";
|
|
77
79
|
import "@iconify-json/tabler/icons.json";
|
|
78
80
|
import "../posterEditor/elements/index.js";
|
|
79
81
|
import "fabric";
|
|
80
82
|
import "mime";
|
|
81
|
-
import { useModal as
|
|
83
|
+
import { useModal as q } from "../../hooks/modal.js";
|
|
82
84
|
import "dayjs";
|
|
83
85
|
import "@tanstack/vue-query";
|
|
84
86
|
import "pinia";
|
|
85
87
|
function p(m) {
|
|
86
88
|
return typeof m == "function" || Object.prototype.toString.call(m) === "[object Object]" && !x(m);
|
|
87
89
|
}
|
|
88
|
-
const
|
|
90
|
+
const Dr = /* @__PURE__ */ f({
|
|
89
91
|
name: "DuxFormEditor",
|
|
90
92
|
props: {
|
|
91
93
|
onSave: Function
|
|
92
94
|
},
|
|
93
|
-
extends:
|
|
95
|
+
extends: l,
|
|
94
96
|
setup(m) {
|
|
95
97
|
const {
|
|
96
98
|
t: o
|
|
97
|
-
} = F(),
|
|
99
|
+
} = F(), d = q(), c = u(() => [{
|
|
98
100
|
name: "form",
|
|
99
101
|
label: o("components.formEditor.groups.form"),
|
|
100
102
|
icon: "i-tabler:forms"
|
|
@@ -106,9 +108,9 @@ const vr = /* @__PURE__ */ f({
|
|
|
106
108
|
name: "async",
|
|
107
109
|
label: o("components.formEditor.groups.async"),
|
|
108
110
|
icon: "i-tabler:loader"
|
|
109
|
-
}]), s = u(() => [
|
|
110
|
-
return () => t(
|
|
111
|
-
groups:
|
|
111
|
+
}]), s = u(() => [j(o), T(o), A(o), M(o), C(o), V(o), D(o), S(o), N(o), U(o), P(o), k(o), h(o), I(o), _(o), y(o), L(o), O(o), R(o), b(o), W(o), B(o), w(o)]);
|
|
112
|
+
return () => t(l, E(m, {
|
|
113
|
+
groups: c.value,
|
|
112
114
|
components: s.value,
|
|
113
115
|
settingPage: {
|
|
114
116
|
component: (r) => t(v, r, null),
|
|
@@ -134,7 +136,7 @@ const vr = /* @__PURE__ */ f({
|
|
|
134
136
|
secondary: !0,
|
|
135
137
|
block: !0,
|
|
136
138
|
onClick: () => {
|
|
137
|
-
|
|
139
|
+
d.show({
|
|
138
140
|
title: o("components.formEditor.main.actions.jsonOutput"),
|
|
139
141
|
component: () => import("./json.js"),
|
|
140
142
|
componentProps: {
|
|
@@ -149,7 +151,7 @@ const vr = /* @__PURE__ */ f({
|
|
|
149
151
|
secondary: !0,
|
|
150
152
|
block: !0,
|
|
151
153
|
onClick: () => {
|
|
152
|
-
|
|
154
|
+
d.show({
|
|
153
155
|
title: o("common.preview"),
|
|
154
156
|
component: () => import("./preview.js"),
|
|
155
157
|
componentProps: {
|
|
@@ -174,5 +176,5 @@ const vr = /* @__PURE__ */ f({
|
|
|
174
176
|
}
|
|
175
177
|
});
|
|
176
178
|
export {
|
|
177
|
-
|
|
179
|
+
Dr as DuxFormEditor
|
|
178
180
|
};
|