@duxweb/dvha-pro 1.0.25 → 1.0.27
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/dynamicData.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/action.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 +35 -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/dynamicData.js +49 -46
- 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 +38 -30
- 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 +164 -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/action.js +9 -9
- 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 +35 -2
- package/dist/types/components/data/dynamicData.d.ts +1 -1
- 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/form/pageForm.d.ts +9 -0
- 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
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { createVNode as t, defineComponent as u, mergeProps as c, isVNode as d } from "vue";
|
|
2
|
+
import { useI18n as s } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as f } from "@vueuse/core";
|
|
4
|
+
import { NDynamicInput as b, NSwitch as v, NButton as x, NCheckboxGroup as h, NCheckbox as g } from "naive-ui";
|
|
5
|
+
import { useModal as E } from "../../../hooks/modal.js";
|
|
6
|
+
import "clsx";
|
|
7
|
+
import "vue-router";
|
|
8
|
+
import "@overlastic/vue";
|
|
9
|
+
import "vue-echarts";
|
|
10
|
+
import "vue3-ace-editor";
|
|
11
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
12
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
13
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
14
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
15
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
16
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
17
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
18
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
19
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
20
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
21
|
+
import "vue-cropper";
|
|
22
|
+
import "jinrishici";
|
|
23
|
+
import "lodash-es";
|
|
24
|
+
import "vue-draggable-plus";
|
|
25
|
+
import "aieditor";
|
|
26
|
+
import { DuxFormItem as m } from "../../form/formItem.js";
|
|
27
|
+
import "@vee-validate/i18n";
|
|
28
|
+
import "colorizr";
|
|
29
|
+
import "echarts";
|
|
30
|
+
import "@ant-design/colors";
|
|
31
|
+
import "@unocss/preset-icons/browser";
|
|
32
|
+
import "@unocss/preset-typography";
|
|
33
|
+
import "unocss/preset-wind4";
|
|
34
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
35
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
36
|
+
import "vee-validate";
|
|
37
|
+
import "vue-command-palette";
|
|
38
|
+
import "@duxweb/dvha-naiveui";
|
|
39
|
+
import "../../../pages/page404.js";
|
|
40
|
+
import { DuxFormEditorItem as k, DuxFormEditorRule as C } from "../base/base.js";
|
|
41
|
+
import { WidgetEditorSettingCard as p } from "../../designEditor/editor/setting.js";
|
|
42
|
+
import "@iconify-json/tabler/icons.json";
|
|
43
|
+
import "../../posterEditor/elements/index.js";
|
|
44
|
+
import "fabric";
|
|
45
|
+
import "mime";
|
|
46
|
+
import "dayjs";
|
|
47
|
+
import "@tanstack/vue-query";
|
|
48
|
+
import "pinia";
|
|
49
|
+
import "short-unique-id";
|
|
50
|
+
function V(o) {
|
|
51
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !d(o);
|
|
52
|
+
}
|
|
53
|
+
const j = /* @__PURE__ */ u({
|
|
54
|
+
name: "FormEditorCheckbox",
|
|
55
|
+
props: {
|
|
56
|
+
options: Object
|
|
57
|
+
},
|
|
58
|
+
setup(o) {
|
|
59
|
+
return () => t(m, {
|
|
60
|
+
label: o.options?.label,
|
|
61
|
+
description: o.options?.desc
|
|
62
|
+
}, {
|
|
63
|
+
default: () => [t(h, c(o.options?.attr, {
|
|
64
|
+
value: o.options?.attr?.defaultValue
|
|
65
|
+
}), {
|
|
66
|
+
default: () => [o.options?.attr?.options?.map((e, r) => t(g, {
|
|
67
|
+
key: r,
|
|
68
|
+
value: e.value
|
|
69
|
+
}, {
|
|
70
|
+
default: () => [e.label]
|
|
71
|
+
}))]
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
function N(o) {
|
|
77
|
+
const {
|
|
78
|
+
options: e,
|
|
79
|
+
model: r
|
|
80
|
+
} = o || {};
|
|
81
|
+
return {
|
|
82
|
+
tag: "dux-form-item",
|
|
83
|
+
attrs: {
|
|
84
|
+
label: e?.label,
|
|
85
|
+
description: e?.desc
|
|
86
|
+
},
|
|
87
|
+
children: [{
|
|
88
|
+
tag: "n-checkbox-group",
|
|
89
|
+
attrs: {
|
|
90
|
+
...e?.attr,
|
|
91
|
+
"v-model:value": [r, e?.name]
|
|
92
|
+
},
|
|
93
|
+
children: e?.attr?.options?.map((n) => ({
|
|
94
|
+
tag: "n-checkbox",
|
|
95
|
+
attrs: {
|
|
96
|
+
value: n.value
|
|
97
|
+
},
|
|
98
|
+
children: [n.label]
|
|
99
|
+
})) || []
|
|
100
|
+
}]
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
const y = /* @__PURE__ */ u({
|
|
104
|
+
name: "FormEditorCheckboxSetting",
|
|
105
|
+
props: {
|
|
106
|
+
value: {
|
|
107
|
+
type: Object,
|
|
108
|
+
default: {}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
setup(o, {
|
|
112
|
+
emit: e
|
|
113
|
+
}) {
|
|
114
|
+
const r = f(o, "value", e), n = E(), {
|
|
115
|
+
t: l
|
|
116
|
+
} = s();
|
|
117
|
+
return () => {
|
|
118
|
+
let a;
|
|
119
|
+
return t("div", {
|
|
120
|
+
class: ""
|
|
121
|
+
}, [t(k, {
|
|
122
|
+
value: o.value,
|
|
123
|
+
"onUpdate:value": (i) => o.value = i
|
|
124
|
+
}, null), t(p, {
|
|
125
|
+
title: l("components.formEditor.common.componentConfig")
|
|
126
|
+
}, {
|
|
127
|
+
default: () => [t(m, {
|
|
128
|
+
label: l("components.formEditor.common.defaultValue")
|
|
129
|
+
}, {
|
|
130
|
+
default: () => [t(b, {
|
|
131
|
+
value: r.value.attr.defaultValue,
|
|
132
|
+
"onUpdate:value": (i) => r.value.attr.defaultValue = i
|
|
133
|
+
}, null)]
|
|
134
|
+
}), t(m, {
|
|
135
|
+
label: l("components.formEditor.common.disabled"),
|
|
136
|
+
labelPlacement: "left"
|
|
137
|
+
}, {
|
|
138
|
+
default: () => [t("div", {
|
|
139
|
+
class: "flex flex-1 justify-end"
|
|
140
|
+
}, [t(v, {
|
|
141
|
+
value: r.value.attr.disabled,
|
|
142
|
+
"onUpdate:value": (i) => r.value.attr.disabled = i
|
|
143
|
+
}, null)])]
|
|
144
|
+
})]
|
|
145
|
+
}), t(p, {
|
|
146
|
+
title: l("components.formEditor.common.optionConfig")
|
|
147
|
+
}, {
|
|
148
|
+
default: () => [t(x, {
|
|
149
|
+
block: !0,
|
|
150
|
+
dashed: !0,
|
|
151
|
+
renderIcon: () => t("div", {
|
|
152
|
+
class: "i-tabler:edit"
|
|
153
|
+
}, null),
|
|
154
|
+
onClick: () => {
|
|
155
|
+
n.show({
|
|
156
|
+
title: l("components.formEditor.common.dataConfig"),
|
|
157
|
+
component: () => import("../base/options.js"),
|
|
158
|
+
componentProps: {
|
|
159
|
+
desc: l("components.formEditor.checkbox.configDesc"),
|
|
160
|
+
value: r.value.attr.options,
|
|
161
|
+
onChange: (i) => {
|
|
162
|
+
r.value.attr.options = i;
|
|
163
|
+
},
|
|
164
|
+
options: [{
|
|
165
|
+
label: l("components.formEditor.common.optionLabel"),
|
|
166
|
+
value: "label"
|
|
167
|
+
}, {
|
|
168
|
+
label: l("components.formEditor.common.optionValue"),
|
|
169
|
+
value: "value"
|
|
170
|
+
}]
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}, V(a = l("components.formEditor.common.dataConfig")) ? a : {
|
|
175
|
+
default: () => [a]
|
|
176
|
+
})]
|
|
177
|
+
}), t(C, {
|
|
178
|
+
value: r.value.rule,
|
|
179
|
+
"onUpdate:value": (i) => r.value.rule = i
|
|
180
|
+
}, null)]);
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
function Vo(o) {
|
|
185
|
+
return {
|
|
186
|
+
name: "dux-checkbox",
|
|
187
|
+
icon: "i-tabler:square-check",
|
|
188
|
+
label: o("components.formEditor.checkbox.label"),
|
|
189
|
+
group: "form",
|
|
190
|
+
component: (e) => t(j, e, null),
|
|
191
|
+
setting: (e) => t(y, e, null),
|
|
192
|
+
settingDefault: {
|
|
193
|
+
label: o("components.formEditor.checkbox.label"),
|
|
194
|
+
name: "checkbox",
|
|
195
|
+
attr: {
|
|
196
|
+
options: [{
|
|
197
|
+
label: "option 1",
|
|
198
|
+
value: "1"
|
|
199
|
+
}, {
|
|
200
|
+
label: "option 2",
|
|
201
|
+
value: "2"
|
|
202
|
+
}],
|
|
203
|
+
defaultValue: []
|
|
204
|
+
},
|
|
205
|
+
rule: []
|
|
206
|
+
},
|
|
207
|
+
json: N
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
export {
|
|
211
|
+
Vo as duxFormEditorCheckbox
|
|
212
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { createVNode as o, defineComponent as p } from "vue";
|
|
2
|
+
import { useI18n as n } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as u } from "@vueuse/core";
|
|
4
|
+
import { NSwitch as a, NColorPicker as d } 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 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 v = /* @__PURE__ */ p({
|
|
50
|
+
name: "FormEditorColor",
|
|
51
|
+
props: {
|
|
52
|
+
options: Object
|
|
53
|
+
},
|
|
54
|
+
setup(t) {
|
|
55
|
+
const r = t.options?.attr;
|
|
56
|
+
return () => o(m, {
|
|
57
|
+
label: t.options?.label,
|
|
58
|
+
description: t.options?.desc
|
|
59
|
+
}, {
|
|
60
|
+
default: () => [o("div", {
|
|
61
|
+
class: "flex-1"
|
|
62
|
+
}, [o(d, r, null)])]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
function b(t) {
|
|
67
|
+
const {
|
|
68
|
+
options: r,
|
|
69
|
+
model: e
|
|
70
|
+
} = t || {};
|
|
71
|
+
return {
|
|
72
|
+
tag: "dux-form-item",
|
|
73
|
+
attrs: {
|
|
74
|
+
label: r?.label,
|
|
75
|
+
description: r?.desc
|
|
76
|
+
},
|
|
77
|
+
children: [{
|
|
78
|
+
tag: "n-color-picker",
|
|
79
|
+
attrs: {
|
|
80
|
+
...r?.attr,
|
|
81
|
+
"v-model:value": [e, r?.name]
|
|
82
|
+
}
|
|
83
|
+
}]
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const x = /* @__PURE__ */ p({
|
|
87
|
+
name: "FormEditorColorSetting",
|
|
88
|
+
props: {
|
|
89
|
+
value: {
|
|
90
|
+
type: Object,
|
|
91
|
+
default: {}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
setup(t, {
|
|
95
|
+
emit: r
|
|
96
|
+
}) {
|
|
97
|
+
const e = u(t, "value", r), {
|
|
98
|
+
t: i
|
|
99
|
+
} = n();
|
|
100
|
+
return () => o("div", {
|
|
101
|
+
class: ""
|
|
102
|
+
}, [o(s, {
|
|
103
|
+
value: t.value,
|
|
104
|
+
"onUpdate:value": (l) => t.value = l
|
|
105
|
+
}, null), o(f, {
|
|
106
|
+
title: i("components.formEditor.common.componentConfig")
|
|
107
|
+
}, {
|
|
108
|
+
default: () => [o(m, {
|
|
109
|
+
label: i("components.formEditor.common.disabled"),
|
|
110
|
+
labelPlacement: "left"
|
|
111
|
+
}, {
|
|
112
|
+
default: () => [o("div", {
|
|
113
|
+
class: "flex flex-1 justify-end"
|
|
114
|
+
}, [o(a, {
|
|
115
|
+
value: e.value.attr.disabled,
|
|
116
|
+
"onUpdate:value": (l) => e.value.attr.disabled = l
|
|
117
|
+
}, null)])]
|
|
118
|
+
}), o(m, {
|
|
119
|
+
label: i("components.formEditor.color.showAlpha"),
|
|
120
|
+
labelPlacement: "left"
|
|
121
|
+
}, {
|
|
122
|
+
default: () => [o("div", {
|
|
123
|
+
class: "flex flex-1 justify-end"
|
|
124
|
+
}, [o(a, {
|
|
125
|
+
value: e.value.attr.showAlpha,
|
|
126
|
+
"onUpdate:value": (l) => e.value.attr.showAlpha = l
|
|
127
|
+
}, null)])]
|
|
128
|
+
})]
|
|
129
|
+
}), o(c, {
|
|
130
|
+
value: e.value.rule,
|
|
131
|
+
"onUpdate:value": (l) => e.value.rule = l
|
|
132
|
+
}, null)]);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
function co(t) {
|
|
136
|
+
return {
|
|
137
|
+
name: "dux-color",
|
|
138
|
+
icon: "i-tabler:palette",
|
|
139
|
+
label: t("components.formEditor.color.label"),
|
|
140
|
+
group: "form",
|
|
141
|
+
component: (r) => o(v, r, null),
|
|
142
|
+
setting: (r) => o(x, r, null),
|
|
143
|
+
settingDefault: {
|
|
144
|
+
label: t("components.formEditor.color.label"),
|
|
145
|
+
name: "color",
|
|
146
|
+
attr: {
|
|
147
|
+
showAlpha: !0
|
|
148
|
+
},
|
|
149
|
+
rule: []
|
|
150
|
+
},
|
|
151
|
+
json: b
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export {
|
|
155
|
+
co as duxFormEditorColor
|
|
156
|
+
};
|
|
@@ -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
|
+
};
|