@duxweb/dvha-pro 1.0.32 → 1.0.33
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/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/setting.cjs +1 -1
- package/dist/cjs/components/form/drawerForm.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/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/base/setting.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/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/posterEditor/pages/RightPanel.cjs +1 -1
- package/dist/cjs/components/posterEditor/posterEditor.cjs +1 -1
- 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/config/echart.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/pages/layout/global.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 +1 -1
- package/dist/esm/components/chart/echart.js +16 -2
- package/dist/esm/components/crop/imageCrop.js +26 -12
- package/dist/esm/components/data/dynamicSelect.js +33 -19
- package/dist/esm/components/data/selectModal.js +41 -27
- package/dist/esm/components/designEditor/components/grid.js +39 -25
- package/dist/esm/components/designEditor/editor/setting.js +36 -22
- package/dist/esm/components/form/drawerForm.js +32 -18
- package/dist/esm/components/form/modalForm.js +31 -17
- package/dist/esm/components/form/pageForm.js +40 -26
- package/dist/esm/components/form/pageTabForm.js +30 -16
- package/dist/esm/components/form/settingForm.js +32 -18
- package/dist/esm/components/formEditor/base/base.js +29 -15
- package/dist/esm/components/formEditor/base/setting.js +21 -7
- package/dist/esm/components/formEditor/components/cascader.js +65 -51
- package/dist/esm/components/formEditor/components/cascaderAsync.js +95 -81
- package/dist/esm/components/formEditor/components/checkbox.js +43 -29
- package/dist/esm/components/formEditor/components/color.js +34 -20
- package/dist/esm/components/formEditor/components/date.js +51 -37
- package/dist/esm/components/formEditor/components/dynamicInput.js +42 -28
- package/dist/esm/components/formEditor/components/dynamicTags.js +39 -25
- package/dist/esm/components/formEditor/components/editor.js +23 -9
- package/dist/esm/components/formEditor/components/input.js +66 -52
- package/dist/esm/components/formEditor/components/inputNumber.js +37 -23
- package/dist/esm/components/formEditor/components/mentionAsync.js +60 -46
- package/dist/esm/components/formEditor/components/radio.js +28 -14
- package/dist/esm/components/formEditor/components/region.js +37 -23
- package/dist/esm/components/formEditor/components/select.js +16 -2
- package/dist/esm/components/formEditor/components/selectAsync.js +72 -58
- package/dist/esm/components/formEditor/components/sider.js +40 -26
- package/dist/esm/components/formEditor/components/switch.js +33 -19
- package/dist/esm/components/formEditor/components/time.js +60 -46
- package/dist/esm/components/formEditor/components/transferAsync.js +49 -35
- package/dist/esm/components/formEditor/components/treeSelect.js +54 -40
- package/dist/esm/components/formEditor/components/treeSelectAsync.js +74 -60
- package/dist/esm/components/formEditor/editor.js +16 -2
- package/dist/esm/components/formEditor/renderer.js +28 -14
- package/dist/esm/components/icon/icon.js +23 -9
- package/dist/esm/components/layout/list.js +69 -55
- package/dist/esm/components/layout/table.js +37 -23
- package/dist/esm/components/level/level.js +37 -23
- package/dist/esm/components/posterEditor/pages/RightPanel.js +46 -32
- package/dist/esm/components/posterEditor/posterEditor.js +26 -12
- package/dist/esm/components/table/table.js +21 -7
- package/dist/esm/components/upload/file.js +16 -2
- package/dist/esm/components/upload/image.js +42 -28
- package/dist/esm/components/upload/manage/item.js +24 -10
- package/dist/esm/components/upload/manager.js +16 -2
- package/dist/esm/config/echart.js +1 -1
- package/dist/esm/hooks/dialog.js +16 -2
- package/dist/esm/hooks/drawer.js +16 -2
- package/dist/esm/hooks/modal.js +16 -2
- package/dist/esm/hooks/table/image.js +20 -6
- package/dist/esm/hooks/table/media.js +20 -6
- package/dist/esm/pages/layout/global.js +52 -37
- package/dist/esm/pages/layout/page.js +26 -12
- package/dist/esm/pages/login.js +33 -19
- package/dist/esm/pages/menu/avatar.js +46 -32
- package/dist/esm/pages/menu/button.js +22 -8
- package/dist/esm/pages/menu/cmd.js +51 -37
- package/dist/esm/pages/menu/main.js +42 -28
- package/dist/esm/pages/menu/mobile.js +16 -2
- package/dist/esm/pages/page404.js +14 -0
- package/dist/esm/pages/pageStatus.js +18 -4
- package/dist/esm/theme/uno.css.js +1 -1
- package/package.json +5 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as d, toRef as f, createVNode as t } from "vue";
|
|
2
2
|
import { useI18n as g, useTabStore as b, useInvalidate as y, useExtendForm as v } from "@duxweb/dvha-core";
|
|
3
|
-
import { useMessage as x, NTabs as S, NButton as
|
|
3
|
+
import { useMessage as x, NTabs as S, NButton as n } from "naive-ui";
|
|
4
4
|
import { useRouter as h } from "vue-router";
|
|
5
5
|
import "@overlastic/vue";
|
|
6
6
|
import { DuxCard as T } from "../card/card.js";
|
|
@@ -36,6 +36,20 @@ import "pinia";
|
|
|
36
36
|
import "@vee-validate/i18n";
|
|
37
37
|
import "colorizr";
|
|
38
38
|
import "echarts";
|
|
39
|
+
import "highlight.js/lib/core";
|
|
40
|
+
import "highlight.js/lib/languages/bash";
|
|
41
|
+
import "highlight.js/lib/languages/css";
|
|
42
|
+
import "highlight.js/lib/languages/go";
|
|
43
|
+
import "highlight.js/lib/languages/java";
|
|
44
|
+
import "highlight.js/lib/languages/javascript";
|
|
45
|
+
import "highlight.js/lib/languages/json";
|
|
46
|
+
import "highlight.js/lib/languages/markdown";
|
|
47
|
+
import "highlight.js/lib/languages/php";
|
|
48
|
+
import "highlight.js/lib/languages/python";
|
|
49
|
+
import "highlight.js/lib/languages/shell";
|
|
50
|
+
import "highlight.js/lib/languages/sql";
|
|
51
|
+
import "highlight.js/lib/languages/typescript";
|
|
52
|
+
import "highlight.js/lib/languages/xml";
|
|
39
53
|
import "@ant-design/colors";
|
|
40
54
|
import "@unocss/preset-icons/browser";
|
|
41
55
|
import "@unocss/preset-typography";
|
|
@@ -45,7 +59,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
45
59
|
import "vue-command-palette";
|
|
46
60
|
import { DuxPage as E } from "../../pages/page.js";
|
|
47
61
|
import "../../pages/page404.js";
|
|
48
|
-
const
|
|
62
|
+
const It = /* @__PURE__ */ d({
|
|
49
63
|
name: "DuxPageTabForm",
|
|
50
64
|
props: {
|
|
51
65
|
id: {
|
|
@@ -78,22 +92,22 @@ const yt = /* @__PURE__ */ d({
|
|
|
78
92
|
}
|
|
79
93
|
},
|
|
80
94
|
setup(o, {
|
|
81
|
-
slots:
|
|
95
|
+
slots: p
|
|
82
96
|
}) {
|
|
83
97
|
const {
|
|
84
|
-
t:
|
|
85
|
-
} = g(), s = f(o, "data", {}),
|
|
98
|
+
t: r
|
|
99
|
+
} = g(), s = f(o, "data", {}), a = x(), l = h(), m = b(), {
|
|
86
100
|
invalidate: u
|
|
87
101
|
} = y(), i = v({
|
|
88
102
|
id: o.id,
|
|
89
103
|
path: o.path,
|
|
90
104
|
form: s,
|
|
91
105
|
action: o.action,
|
|
92
|
-
onError: (
|
|
93
|
-
|
|
106
|
+
onError: (e) => {
|
|
107
|
+
a.error(e.message || r("components.form.error")), o.onError?.(e);
|
|
94
108
|
},
|
|
95
|
-
onSuccess: (
|
|
96
|
-
|
|
109
|
+
onSuccess: (e) => {
|
|
110
|
+
a.success(r("components.form.success")), o.onSuccess?.(e), !i.isEdit.value && m.current && m.delTab(m.current, (c) => l.push(c.path || "")), o.invalidate && u(o.invalidate);
|
|
97
111
|
}
|
|
98
112
|
});
|
|
99
113
|
return () => t(E, {
|
|
@@ -112,25 +126,25 @@ const yt = /* @__PURE__ */ d({
|
|
|
112
126
|
prefix: () => t("div", {
|
|
113
127
|
class: "w-1"
|
|
114
128
|
}, null),
|
|
115
|
-
default: () =>
|
|
129
|
+
default: () => p?.default?.(i),
|
|
116
130
|
suffix: () => t("div", {
|
|
117
131
|
class: "flex gap-6 items-center px-3"
|
|
118
|
-
}, [
|
|
132
|
+
}, [p?.actions?.(i), t("div", {
|
|
119
133
|
class: "flex gap-2"
|
|
120
|
-
}, [t(
|
|
134
|
+
}, [t(n, {
|
|
121
135
|
onClick: () => i.onReset(),
|
|
122
136
|
loading: i.isLoading.value
|
|
123
137
|
}, {
|
|
124
|
-
default: () =>
|
|
138
|
+
default: () => r("components.button.reset"),
|
|
125
139
|
icon: () => t("i", {
|
|
126
140
|
class: "i-tabler:refresh"
|
|
127
141
|
}, null)
|
|
128
|
-
}), t(
|
|
142
|
+
}), t(n, {
|
|
129
143
|
type: "primary",
|
|
130
144
|
onClick: () => i.onSubmit(),
|
|
131
145
|
loading: i.isLoading.value
|
|
132
146
|
}, {
|
|
133
|
-
default: () =>
|
|
147
|
+
default: () => r("components.button.submit"),
|
|
134
148
|
icon: () => t("i", {
|
|
135
149
|
class: "i-tabler:device-floppy"
|
|
136
150
|
}, null)
|
|
@@ -141,5 +155,5 @@ const yt = /* @__PURE__ */ d({
|
|
|
141
155
|
}
|
|
142
156
|
});
|
|
143
157
|
export {
|
|
144
|
-
|
|
158
|
+
It as DuxPageTabForm
|
|
145
159
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as s, ref as c, toRef as d, computed as f, createVNode as
|
|
1
|
+
import { defineComponent as s, ref as c, toRef as d, computed as f, createVNode as i } from "vue";
|
|
2
2
|
import { useI18n as g, useInvalidate as x, useExtendForm as y } from "@duxweb/dvha-core";
|
|
3
3
|
import { useMessage as v, NTabs as S } from "naive-ui";
|
|
4
4
|
import "@overlastic/vue";
|
|
@@ -35,6 +35,20 @@ import "pinia";
|
|
|
35
35
|
import "@vee-validate/i18n";
|
|
36
36
|
import "colorizr";
|
|
37
37
|
import "echarts";
|
|
38
|
+
import "highlight.js/lib/core";
|
|
39
|
+
import "highlight.js/lib/languages/bash";
|
|
40
|
+
import "highlight.js/lib/languages/css";
|
|
41
|
+
import "highlight.js/lib/languages/go";
|
|
42
|
+
import "highlight.js/lib/languages/java";
|
|
43
|
+
import "highlight.js/lib/languages/javascript";
|
|
44
|
+
import "highlight.js/lib/languages/json";
|
|
45
|
+
import "highlight.js/lib/languages/markdown";
|
|
46
|
+
import "highlight.js/lib/languages/php";
|
|
47
|
+
import "highlight.js/lib/languages/python";
|
|
48
|
+
import "highlight.js/lib/languages/shell";
|
|
49
|
+
import "highlight.js/lib/languages/sql";
|
|
50
|
+
import "highlight.js/lib/languages/typescript";
|
|
51
|
+
import "highlight.js/lib/languages/xml";
|
|
38
52
|
import "@ant-design/colors";
|
|
39
53
|
import "@unocss/preset-icons/browser";
|
|
40
54
|
import "@unocss/preset-typography";
|
|
@@ -44,7 +58,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
44
58
|
import "vue-command-palette";
|
|
45
59
|
import { DuxPage as b } from "../../pages/page.js";
|
|
46
60
|
import "../../pages/page404.js";
|
|
47
|
-
const
|
|
61
|
+
const Dt = /* @__PURE__ */ s({
|
|
48
62
|
name: "DuxSettingForm",
|
|
49
63
|
props: {
|
|
50
64
|
id: {
|
|
@@ -82,22 +96,22 @@ const dt = /* @__PURE__ */ s({
|
|
|
82
96
|
}
|
|
83
97
|
},
|
|
84
98
|
setup(t, {
|
|
85
|
-
slots:
|
|
99
|
+
slots: e
|
|
86
100
|
}) {
|
|
87
|
-
const r = c(t.defaultTab),
|
|
101
|
+
const r = c(t.defaultTab), n = d(t, "data", {}), {
|
|
88
102
|
t: m
|
|
89
103
|
} = g(), a = v(), {
|
|
90
104
|
invalidate: u
|
|
91
|
-
} = x(),
|
|
105
|
+
} = x(), p = y({
|
|
92
106
|
id: t.id,
|
|
93
107
|
path: t.path,
|
|
94
|
-
form:
|
|
108
|
+
form: n,
|
|
95
109
|
action: t.action,
|
|
96
|
-
onError: (
|
|
97
|
-
a.error(
|
|
110
|
+
onError: (o) => {
|
|
111
|
+
a.error(o.message || m("components.form.error")), t.onError?.(o);
|
|
98
112
|
},
|
|
99
|
-
onSuccess: (
|
|
100
|
-
a.success(m("components.form.success")), t.onSuccess?.(
|
|
113
|
+
onSuccess: (o) => {
|
|
114
|
+
a.success(m("components.form.success")), t.onSuccess?.(o), t.invalidate && u(t.invalidate);
|
|
101
115
|
}
|
|
102
116
|
}), l = f(() => {
|
|
103
117
|
switch (t.size) {
|
|
@@ -110,22 +124,22 @@ const dt = /* @__PURE__ */ s({
|
|
|
110
124
|
return "lg:max-w-2xl";
|
|
111
125
|
}
|
|
112
126
|
});
|
|
113
|
-
return () =>
|
|
114
|
-
default: () => [
|
|
127
|
+
return () => i(b, null, {
|
|
128
|
+
default: () => [i("div", {
|
|
115
129
|
class: `flex flex-col gap-6 w-full ${l.value} mx-auto py-4`
|
|
116
|
-
}, [t.tabs ?
|
|
130
|
+
}, [t.tabs ? i(S, {
|
|
117
131
|
defaultValue: t.defaultTab,
|
|
118
132
|
value: r.value,
|
|
119
|
-
onUpdateValue: (
|
|
120
|
-
r.value =
|
|
133
|
+
onUpdateValue: (o) => {
|
|
134
|
+
r.value = o;
|
|
121
135
|
},
|
|
122
136
|
type: "segment"
|
|
123
137
|
}, {
|
|
124
|
-
default: () => [
|
|
125
|
-
}) :
|
|
138
|
+
default: () => [e?.default?.(p)]
|
|
139
|
+
}) : e?.default?.(p)])]
|
|
126
140
|
});
|
|
127
141
|
}
|
|
128
142
|
});
|
|
129
143
|
export {
|
|
130
|
-
|
|
144
|
+
Dt as DuxSettingForm
|
|
131
145
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as a, createVNode as t } from "vue";
|
|
2
2
|
import { useI18n as n } from "@duxweb/dvha-core";
|
|
3
3
|
import { useVModel as u } from "@vueuse/core";
|
|
4
|
-
import { NInput as
|
|
4
|
+
import { NInput as p } from "naive-ui";
|
|
5
5
|
import "clsx";
|
|
6
6
|
import "vue-router";
|
|
7
7
|
import "@overlastic/vue";
|
|
@@ -26,6 +26,20 @@ import { DuxFormItem as l } from "../../form/formItem.js";
|
|
|
26
26
|
import "@vee-validate/i18n";
|
|
27
27
|
import "colorizr";
|
|
28
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";
|
|
29
43
|
import "@ant-design/colors";
|
|
30
44
|
import "@unocss/preset-icons/browser";
|
|
31
45
|
import "@unocss/preset-typography";
|
|
@@ -45,7 +59,7 @@ import "dayjs";
|
|
|
45
59
|
import "@tanstack/vue-query";
|
|
46
60
|
import "pinia";
|
|
47
61
|
import "short-unique-id";
|
|
48
|
-
const
|
|
62
|
+
const Fo = /* @__PURE__ */ a({
|
|
49
63
|
name: "DuxFormEditorItem",
|
|
50
64
|
props: {
|
|
51
65
|
value: {
|
|
@@ -53,12 +67,12 @@ const po = /* @__PURE__ */ a({
|
|
|
53
67
|
default: []
|
|
54
68
|
}
|
|
55
69
|
},
|
|
56
|
-
setup(
|
|
57
|
-
emit:
|
|
70
|
+
setup(i, {
|
|
71
|
+
emit: e
|
|
58
72
|
}) {
|
|
59
73
|
const {
|
|
60
74
|
t: r
|
|
61
|
-
} = n(), o = u(
|
|
75
|
+
} = n(), o = u(i, "value", e);
|
|
62
76
|
return () => t(d, {
|
|
63
77
|
title: r("components.formEditor.componentConfig")
|
|
64
78
|
}, {
|
|
@@ -66,28 +80,28 @@ const po = /* @__PURE__ */ a({
|
|
|
66
80
|
label: r("components.formEditor.common.label"),
|
|
67
81
|
path: "label"
|
|
68
82
|
}, {
|
|
69
|
-
default: () => [t(
|
|
83
|
+
default: () => [t(p, {
|
|
70
84
|
value: o.value.label,
|
|
71
85
|
"onUpdate:value": (m) => o.value.label = m
|
|
72
86
|
}, null)]
|
|
73
87
|
}), t(l, {
|
|
74
88
|
label: r("components.formEditor.common.name")
|
|
75
89
|
}, {
|
|
76
|
-
default: () => [t(
|
|
90
|
+
default: () => [t(p, {
|
|
77
91
|
value: o.value.name,
|
|
78
92
|
"onUpdate:value": (m) => o.value.name = m
|
|
79
93
|
}, null)]
|
|
80
94
|
}), t(l, {
|
|
81
95
|
label: r("components.formEditor.common.desc")
|
|
82
96
|
}, {
|
|
83
|
-
default: () => [t(
|
|
97
|
+
default: () => [t(p, {
|
|
84
98
|
value: o.value.desc,
|
|
85
99
|
"onUpdate:value": (m) => o.value.desc = m
|
|
86
100
|
}, null)]
|
|
87
101
|
})]
|
|
88
102
|
});
|
|
89
103
|
}
|
|
90
|
-
}),
|
|
104
|
+
}), Do = /* @__PURE__ */ a({
|
|
91
105
|
name: "FormEditorInput",
|
|
92
106
|
props: {
|
|
93
107
|
value: {
|
|
@@ -95,16 +109,16 @@ const po = /* @__PURE__ */ a({
|
|
|
95
109
|
default: []
|
|
96
110
|
}
|
|
97
111
|
},
|
|
98
|
-
setup(
|
|
99
|
-
emit:
|
|
112
|
+
setup(i, {
|
|
113
|
+
emit: e
|
|
100
114
|
}) {
|
|
101
115
|
const {
|
|
102
116
|
t: r
|
|
103
|
-
} = n(), o = u(
|
|
117
|
+
} = n(), o = u(i, "value", e);
|
|
104
118
|
return () => t(d, {
|
|
105
119
|
title: r("components.formEditor.validation")
|
|
106
120
|
}, {
|
|
107
|
-
default: () => [t(
|
|
121
|
+
default: () => [t(p, {
|
|
108
122
|
value: o.value,
|
|
109
123
|
"onUpdate:value": (m) => o.value = m
|
|
110
124
|
}, null)]
|
|
@@ -112,6 +126,6 @@ const po = /* @__PURE__ */ a({
|
|
|
112
126
|
}
|
|
113
127
|
});
|
|
114
128
|
export {
|
|
115
|
-
|
|
116
|
-
|
|
129
|
+
Fo as DuxFormEditorItem,
|
|
130
|
+
Do as DuxFormEditorRule
|
|
117
131
|
};
|
|
@@ -30,6 +30,20 @@ import "vue-draggable-plus";
|
|
|
30
30
|
import "@vee-validate/i18n";
|
|
31
31
|
import "colorizr";
|
|
32
32
|
import "echarts";
|
|
33
|
+
import "highlight.js/lib/core";
|
|
34
|
+
import "highlight.js/lib/languages/bash";
|
|
35
|
+
import "highlight.js/lib/languages/css";
|
|
36
|
+
import "highlight.js/lib/languages/go";
|
|
37
|
+
import "highlight.js/lib/languages/java";
|
|
38
|
+
import "highlight.js/lib/languages/javascript";
|
|
39
|
+
import "highlight.js/lib/languages/json";
|
|
40
|
+
import "highlight.js/lib/languages/markdown";
|
|
41
|
+
import "highlight.js/lib/languages/php";
|
|
42
|
+
import "highlight.js/lib/languages/python";
|
|
43
|
+
import "highlight.js/lib/languages/shell";
|
|
44
|
+
import "highlight.js/lib/languages/sql";
|
|
45
|
+
import "highlight.js/lib/languages/typescript";
|
|
46
|
+
import "highlight.js/lib/languages/xml";
|
|
33
47
|
import "@ant-design/colors";
|
|
34
48
|
import "@unocss/preset-icons/browser";
|
|
35
49
|
import "@unocss/preset-typography";
|
|
@@ -48,7 +62,7 @@ import "fabric";
|
|
|
48
62
|
function i(r) {
|
|
49
63
|
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !u(r);
|
|
50
64
|
}
|
|
51
|
-
const
|
|
65
|
+
const Nt = /* @__PURE__ */ f({
|
|
52
66
|
name: "DuxFormEditorSettingPage",
|
|
53
67
|
inheritAttrs: !1,
|
|
54
68
|
props: {
|
|
@@ -64,7 +78,7 @@ const ft = /* @__PURE__ */ f({
|
|
|
64
78
|
t: o
|
|
65
79
|
} = s(), a = g(r, "value", d);
|
|
66
80
|
return () => {
|
|
67
|
-
let
|
|
81
|
+
let p, e, l, n;
|
|
68
82
|
return t("div", {
|
|
69
83
|
class: "flex flex-col gap-2"
|
|
70
84
|
}, [t(E, {
|
|
@@ -82,12 +96,12 @@ const ft = /* @__PURE__ */ f({
|
|
|
82
96
|
class: "grid grid-cols-2 gap-2"
|
|
83
97
|
}, [t(m, {
|
|
84
98
|
value: "left"
|
|
85
|
-
}, i(
|
|
86
|
-
default: () => [
|
|
99
|
+
}, i(p = o("components.formEditor.common.leftAlign")) ? p : {
|
|
100
|
+
default: () => [p]
|
|
87
101
|
}), t(m, {
|
|
88
102
|
value: "top"
|
|
89
|
-
}, i(
|
|
90
|
-
default: () => [
|
|
103
|
+
}, i(e = o("components.formEditor.common.topAlign")) ? e : {
|
|
104
|
+
default: () => [e]
|
|
91
105
|
}), t(m, {
|
|
92
106
|
value: "setting"
|
|
93
107
|
}, i(l = o("components.formEditor.common.settingAlign")) ? l : {
|
|
@@ -104,5 +118,5 @@ const ft = /* @__PURE__ */ f({
|
|
|
104
118
|
}
|
|
105
119
|
});
|
|
106
120
|
export {
|
|
107
|
-
|
|
121
|
+
Nt as DuxFormEditorSettingPage
|
|
108
122
|
};
|
|
@@ -27,6 +27,20 @@ import { DuxFormItem as m } from "../../form/formItem.js";
|
|
|
27
27
|
import "@vee-validate/i18n";
|
|
28
28
|
import "colorizr";
|
|
29
29
|
import "echarts";
|
|
30
|
+
import "highlight.js/lib/core";
|
|
31
|
+
import "highlight.js/lib/languages/bash";
|
|
32
|
+
import "highlight.js/lib/languages/css";
|
|
33
|
+
import "highlight.js/lib/languages/go";
|
|
34
|
+
import "highlight.js/lib/languages/java";
|
|
35
|
+
import "highlight.js/lib/languages/javascript";
|
|
36
|
+
import "highlight.js/lib/languages/json";
|
|
37
|
+
import "highlight.js/lib/languages/markdown";
|
|
38
|
+
import "highlight.js/lib/languages/php";
|
|
39
|
+
import "highlight.js/lib/languages/python";
|
|
40
|
+
import "highlight.js/lib/languages/shell";
|
|
41
|
+
import "highlight.js/lib/languages/sql";
|
|
42
|
+
import "highlight.js/lib/languages/typescript";
|
|
43
|
+
import "highlight.js/lib/languages/xml";
|
|
30
44
|
import "@ant-design/colors";
|
|
31
45
|
import "@unocss/preset-icons/browser";
|
|
32
46
|
import "@unocss/preset-typography";
|
|
@@ -47,39 +61,39 @@ import "dayjs";
|
|
|
47
61
|
import "@tanstack/vue-query";
|
|
48
62
|
import "pinia";
|
|
49
63
|
import "short-unique-id";
|
|
50
|
-
function h(
|
|
51
|
-
return typeof
|
|
64
|
+
function h(o) {
|
|
65
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !d(o);
|
|
52
66
|
}
|
|
53
67
|
const j = /* @__PURE__ */ c({
|
|
54
68
|
name: "FormEditorCascader",
|
|
55
69
|
props: {
|
|
56
70
|
options: Object
|
|
57
71
|
},
|
|
58
|
-
setup(
|
|
72
|
+
setup(o) {
|
|
59
73
|
return () => t(m, {
|
|
60
|
-
label:
|
|
61
|
-
description:
|
|
74
|
+
label: o.options?.label,
|
|
75
|
+
description: o.options?.desc
|
|
62
76
|
}, {
|
|
63
|
-
default: () => [t(b,
|
|
77
|
+
default: () => [t(b, o.options?.attr, null)]
|
|
64
78
|
});
|
|
65
79
|
}
|
|
66
80
|
});
|
|
67
|
-
function y(
|
|
81
|
+
function y(o) {
|
|
68
82
|
const {
|
|
69
|
-
options:
|
|
70
|
-
model:
|
|
71
|
-
} =
|
|
83
|
+
options: l,
|
|
84
|
+
model: e
|
|
85
|
+
} = o || {};
|
|
72
86
|
return {
|
|
73
87
|
tag: "dux-form-item",
|
|
74
88
|
attrs: {
|
|
75
|
-
label:
|
|
76
|
-
description:
|
|
89
|
+
label: l?.label,
|
|
90
|
+
description: l?.desc
|
|
77
91
|
},
|
|
78
92
|
children: [{
|
|
79
93
|
tag: "n-cascader",
|
|
80
94
|
attrs: {
|
|
81
|
-
...
|
|
82
|
-
"v-model:value": [
|
|
95
|
+
...l?.attr,
|
|
96
|
+
"v-model:value": [e, l?.name]
|
|
83
97
|
}
|
|
84
98
|
}]
|
|
85
99
|
};
|
|
@@ -92,75 +106,75 @@ const C = /* @__PURE__ */ c({
|
|
|
92
106
|
default: {}
|
|
93
107
|
}
|
|
94
108
|
},
|
|
95
|
-
setup(
|
|
96
|
-
emit:
|
|
109
|
+
setup(o, {
|
|
110
|
+
emit: l
|
|
97
111
|
}) {
|
|
98
|
-
const
|
|
99
|
-
t:
|
|
112
|
+
const e = f(o, "value", l), u = E(), {
|
|
113
|
+
t: a
|
|
100
114
|
} = s();
|
|
101
115
|
return () => {
|
|
102
116
|
let n;
|
|
103
117
|
return t("div", {
|
|
104
118
|
class: ""
|
|
105
119
|
}, [t(x, {
|
|
106
|
-
value:
|
|
107
|
-
"onUpdate:value": (
|
|
120
|
+
value: o.value,
|
|
121
|
+
"onUpdate:value": (r) => o.value = r
|
|
108
122
|
}, null), t(p, {
|
|
109
|
-
title:
|
|
123
|
+
title: a("components.formEditor.common.componentConfig")
|
|
110
124
|
}, {
|
|
111
125
|
default: () => [t(m, {
|
|
112
|
-
label:
|
|
126
|
+
label: a("components.formEditor.common.multiple"),
|
|
113
127
|
labelPlacement: "left"
|
|
114
128
|
}, {
|
|
115
129
|
default: () => [t("div", {
|
|
116
130
|
class: "flex flex-1 justify-end"
|
|
117
131
|
}, [t(i, {
|
|
118
|
-
value:
|
|
119
|
-
"onUpdate:value": (
|
|
132
|
+
value: e.value.attr.multiple,
|
|
133
|
+
"onUpdate:value": (r) => e.value.attr.multiple = r
|
|
120
134
|
}, null)])]
|
|
121
135
|
}), t(m, {
|
|
122
|
-
label:
|
|
136
|
+
label: a("components.formEditor.common.cascade"),
|
|
123
137
|
labelPlacement: "left"
|
|
124
138
|
}, {
|
|
125
139
|
default: () => [t("div", {
|
|
126
140
|
class: "flex flex-1 justify-end"
|
|
127
141
|
}, [t(i, {
|
|
128
|
-
value:
|
|
129
|
-
"onUpdate:value": (
|
|
142
|
+
value: e.value.attr.cascade,
|
|
143
|
+
"onUpdate:value": (r) => e.value.attr.cascade = r
|
|
130
144
|
}, null)])]
|
|
131
145
|
}), t(m, {
|
|
132
|
-
label:
|
|
146
|
+
label: a("components.formEditor.common.showPath"),
|
|
133
147
|
labelPlacement: "left"
|
|
134
148
|
}, {
|
|
135
149
|
default: () => [t("div", {
|
|
136
150
|
class: "flex flex-1 justify-end"
|
|
137
151
|
}, [t(i, {
|
|
138
|
-
value:
|
|
139
|
-
"onUpdate:value": (
|
|
152
|
+
value: e.value.attr.showPath,
|
|
153
|
+
"onUpdate:value": (r) => e.value.attr.showPath = r
|
|
140
154
|
}, null)])]
|
|
141
155
|
}), t(m, {
|
|
142
|
-
label:
|
|
156
|
+
label: a("components.formEditor.common.disabled"),
|
|
143
157
|
labelPlacement: "left"
|
|
144
158
|
}, {
|
|
145
159
|
default: () => [t("div", {
|
|
146
160
|
class: "flex flex-1 justify-end"
|
|
147
161
|
}, [t(i, {
|
|
148
|
-
value:
|
|
149
|
-
"onUpdate:value": (
|
|
162
|
+
value: e.value.attr.disabled,
|
|
163
|
+
"onUpdate:value": (r) => e.value.attr.disabled = r
|
|
150
164
|
}, null)])]
|
|
151
165
|
}), t(m, {
|
|
152
|
-
label:
|
|
166
|
+
label: a("components.formEditor.common.clearable"),
|
|
153
167
|
labelPlacement: "left"
|
|
154
168
|
}, {
|
|
155
169
|
default: () => [t("div", {
|
|
156
170
|
class: "flex flex-1 justify-end"
|
|
157
171
|
}, [t(i, {
|
|
158
|
-
value:
|
|
159
|
-
"onUpdate:value": (
|
|
172
|
+
value: e.value.attr.clearable,
|
|
173
|
+
"onUpdate:value": (r) => e.value.attr.clearable = r
|
|
160
174
|
}, null)])]
|
|
161
175
|
})]
|
|
162
176
|
}), t(p, {
|
|
163
|
-
title:
|
|
177
|
+
title: a("components.formEditor.common.optionData")
|
|
164
178
|
}, {
|
|
165
179
|
default: () => [t(v, {
|
|
166
180
|
block: !0,
|
|
@@ -170,40 +184,40 @@ const C = /* @__PURE__ */ c({
|
|
|
170
184
|
}, null),
|
|
171
185
|
onClick: () => {
|
|
172
186
|
u.show({
|
|
173
|
-
title:
|
|
187
|
+
title: a("components.formEditor.common.dataEdit"),
|
|
174
188
|
component: () => import("../base/json.js"),
|
|
175
189
|
componentProps: {
|
|
176
|
-
desc:
|
|
177
|
-
value: JSON.stringify(
|
|
178
|
-
onChange: (
|
|
190
|
+
desc: a("components.formEditor.cascader.optionDesc"),
|
|
191
|
+
value: JSON.stringify(e.value.attr.options, null, 2),
|
|
192
|
+
onChange: (r) => {
|
|
179
193
|
try {
|
|
180
|
-
|
|
194
|
+
e.value.attr.options = JSON.parse(r);
|
|
181
195
|
} catch {
|
|
182
196
|
}
|
|
183
197
|
}
|
|
184
198
|
}
|
|
185
199
|
});
|
|
186
200
|
}
|
|
187
|
-
}, h(n =
|
|
201
|
+
}, h(n = a("components.formEditor.common.dataEdit")) ? n : {
|
|
188
202
|
default: () => [n]
|
|
189
203
|
})]
|
|
190
204
|
}), t(g, {
|
|
191
|
-
value:
|
|
192
|
-
"onUpdate:value": (
|
|
205
|
+
value: e.value.rule,
|
|
206
|
+
"onUpdate:value": (r) => e.value.rule = r
|
|
193
207
|
}, null)]);
|
|
194
208
|
};
|
|
195
209
|
}
|
|
196
210
|
});
|
|
197
|
-
function
|
|
211
|
+
function Jt(o) {
|
|
198
212
|
return {
|
|
199
213
|
name: "dux-cascader",
|
|
200
214
|
icon: "i-tabler:list-tree",
|
|
201
|
-
label:
|
|
215
|
+
label: o("components.formEditor.cascader.label"),
|
|
202
216
|
group: "select",
|
|
203
|
-
component: (
|
|
204
|
-
setting: (
|
|
217
|
+
component: (l) => t(j, l, null),
|
|
218
|
+
setting: (l) => t(C, l, null),
|
|
205
219
|
settingDefault: {
|
|
206
|
-
label:
|
|
220
|
+
label: o("components.formEditor.cascader.label"),
|
|
207
221
|
name: "cascader",
|
|
208
222
|
attr: {
|
|
209
223
|
options: [],
|
|
@@ -215,5 +229,5 @@ function gt(e) {
|
|
|
215
229
|
};
|
|
216
230
|
}
|
|
217
231
|
export {
|
|
218
|
-
|
|
232
|
+
Jt as duxFormEditorCascader
|
|
219
233
|
};
|