@duxweb/dvha-pro 1.0.31 → 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/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/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 -0
- 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/dvha-pro.css +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/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 +2 -1
- package/dist/esm/component.js +31 -31
- 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 +34 -20
- 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 -30
- package/dist/esm/components/form/pageTabForm.js +159 -0
- 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 +101 -85
- 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 +20 -4
- 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/dvha-pro.css +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/index.js +130 -128
- 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 +2 -1
- package/dist/types/components/data/selectModal.d.ts +1 -1
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/pageForm.d.ts +0 -9
- package/dist/types/components/form/pageTabForm.d.ts +63 -0
- package/dist/types/components/layout/table.d.ts +2 -2
- package/dist/types/components/table/tablePage.d.ts +2 -2
- package/package.json +5 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, computed as v, toRef as C, createVNode as
|
|
1
|
+
import { defineComponent as b, computed as v, toRef as C, createVNode as r, Fragment as F, isVNode as x } from "vue";
|
|
2
2
|
import { useI18n as E, useInvalidate as h, useExtendForm as j } from "@duxweb/dvha-core";
|
|
3
3
|
import { useMessage as D, NButton as p } from "naive-ui";
|
|
4
4
|
import "clsx";
|
|
@@ -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 c(t) {
|
|
49
63
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !x(t);
|
|
50
64
|
}
|
|
51
|
-
const
|
|
65
|
+
const At = /* @__PURE__ */ b({
|
|
52
66
|
name: "DuxModalForm",
|
|
53
67
|
props: {
|
|
54
68
|
id: {
|
|
@@ -88,7 +102,7 @@ const Mt = /* @__PURE__ */ b({
|
|
|
88
102
|
} = E(), u = v(() => {
|
|
89
103
|
const {
|
|
90
104
|
onClose: o,
|
|
91
|
-
onSuccess:
|
|
105
|
+
onSuccess: e,
|
|
92
106
|
onError: N,
|
|
93
107
|
action: O,
|
|
94
108
|
title: _,
|
|
@@ -98,10 +112,10 @@ const Mt = /* @__PURE__ */ b({
|
|
|
98
112
|
...S
|
|
99
113
|
} = t;
|
|
100
114
|
return S;
|
|
101
|
-
}), l = C(t, "data", {}),
|
|
115
|
+
}), l = C(t, "data", {}), m = D(), {
|
|
102
116
|
invalidate: d
|
|
103
117
|
} = h(), {
|
|
104
|
-
isLoading:
|
|
118
|
+
isLoading: n,
|
|
105
119
|
onSubmit: f,
|
|
106
120
|
onReset: g,
|
|
107
121
|
isEdit: y
|
|
@@ -111,37 +125,37 @@ const Mt = /* @__PURE__ */ b({
|
|
|
111
125
|
form: l,
|
|
112
126
|
action: t.action,
|
|
113
127
|
onError: (o) => {
|
|
114
|
-
|
|
128
|
+
m.error(o.message || i("components.form.error")), t.onError?.(o);
|
|
115
129
|
},
|
|
116
130
|
onSuccess: (o) => {
|
|
117
|
-
t.invalidate && d(t.invalidate),
|
|
131
|
+
t.invalidate && d(t.invalidate), m.success(i("components.form.success")), t.onSuccess?.(o), t.onClose?.();
|
|
118
132
|
}
|
|
119
133
|
});
|
|
120
|
-
return () =>
|
|
134
|
+
return () => r(M, {
|
|
121
135
|
title: t?.title || (y.value ? i("components.form.edit") : i("components.form.create")),
|
|
122
136
|
onClose: t?.onClose
|
|
123
137
|
}, {
|
|
124
|
-
default: () =>
|
|
138
|
+
default: () => r(a, u.value, {
|
|
125
139
|
default: () => [s?.default?.()]
|
|
126
140
|
}),
|
|
127
141
|
footer: () => {
|
|
128
|
-
let o,
|
|
129
|
-
return
|
|
142
|
+
let o, e;
|
|
143
|
+
return r(F, null, [r(p, {
|
|
130
144
|
onClick: g,
|
|
131
|
-
loading:
|
|
145
|
+
loading: n.value
|
|
132
146
|
}, c(o = i("components.button.reset")) ? o : {
|
|
133
147
|
default: () => [o]
|
|
134
|
-
}),
|
|
148
|
+
}), r(p, {
|
|
135
149
|
type: "primary",
|
|
136
|
-
loading:
|
|
150
|
+
loading: n.value,
|
|
137
151
|
onClick: () => f()
|
|
138
|
-
}, c(
|
|
139
|
-
default: () => [
|
|
152
|
+
}, c(e = i("components.button.submit")) ? e : {
|
|
153
|
+
default: () => [e]
|
|
140
154
|
})]);
|
|
141
155
|
}
|
|
142
156
|
});
|
|
143
157
|
}
|
|
144
158
|
});
|
|
145
159
|
export {
|
|
146
|
-
|
|
160
|
+
At as DuxModalForm
|
|
147
161
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as f, toRef as b, createVNode as
|
|
1
|
+
import { defineComponent as f, toRef as b, createVNode as o } from "vue";
|
|
2
2
|
import { useI18n as g, useTabStore as y, useInvalidate as S, useExtendForm as x } from "@duxweb/dvha-core";
|
|
3
|
-
import { useMessage as v, NButton as
|
|
3
|
+
import { useMessage as v, NButton as p, NScrollbar as h } from "naive-ui";
|
|
4
4
|
import { useRouter as E } from "vue-router";
|
|
5
5
|
import "@overlastic/vue";
|
|
6
6
|
import { DuxCard as F } from "../card/card.js";
|
|
@@ -37,6 +37,20 @@ import "pinia";
|
|
|
37
37
|
import "@vee-validate/i18n";
|
|
38
38
|
import "colorizr";
|
|
39
39
|
import "echarts";
|
|
40
|
+
import "highlight.js/lib/core";
|
|
41
|
+
import "highlight.js/lib/languages/bash";
|
|
42
|
+
import "highlight.js/lib/languages/css";
|
|
43
|
+
import "highlight.js/lib/languages/go";
|
|
44
|
+
import "highlight.js/lib/languages/java";
|
|
45
|
+
import "highlight.js/lib/languages/javascript";
|
|
46
|
+
import "highlight.js/lib/languages/json";
|
|
47
|
+
import "highlight.js/lib/languages/markdown";
|
|
48
|
+
import "highlight.js/lib/languages/php";
|
|
49
|
+
import "highlight.js/lib/languages/python";
|
|
50
|
+
import "highlight.js/lib/languages/shell";
|
|
51
|
+
import "highlight.js/lib/languages/sql";
|
|
52
|
+
import "highlight.js/lib/languages/typescript";
|
|
53
|
+
import "highlight.js/lib/languages/xml";
|
|
40
54
|
import "@ant-design/colors";
|
|
41
55
|
import "@unocss/preset-icons/browser";
|
|
42
56
|
import "@unocss/preset-typography";
|
|
@@ -46,7 +60,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
46
60
|
import "vue-command-palette";
|
|
47
61
|
import { DuxPage as C } from "../../pages/page.js";
|
|
48
62
|
import "../../pages/page404.js";
|
|
49
|
-
const
|
|
63
|
+
const zt = /* @__PURE__ */ f({
|
|
50
64
|
name: "DuxPageForm",
|
|
51
65
|
props: {
|
|
52
66
|
id: {
|
|
@@ -77,72 +91,68 @@ const vt = /* @__PURE__ */ f({
|
|
|
77
91
|
onError: {
|
|
78
92
|
type: Function
|
|
79
93
|
},
|
|
80
|
-
size: {
|
|
81
|
-
type: String,
|
|
82
|
-
default: "medium"
|
|
83
|
-
},
|
|
84
94
|
invalidate: {
|
|
85
95
|
type: String
|
|
86
96
|
}
|
|
87
97
|
},
|
|
88
98
|
setup(t, {
|
|
89
|
-
slots:
|
|
99
|
+
slots: n
|
|
90
100
|
}) {
|
|
91
101
|
const {
|
|
92
102
|
t: i
|
|
93
|
-
} = g(),
|
|
103
|
+
} = g(), l = b(t, "data", {}), a = v(), s = E(), m = y(), {
|
|
94
104
|
invalidate: c
|
|
95
|
-
} = S(),
|
|
105
|
+
} = S(), e = x({
|
|
96
106
|
id: t.id,
|
|
97
107
|
path: t.path,
|
|
98
|
-
form:
|
|
108
|
+
form: l,
|
|
99
109
|
action: t.action,
|
|
100
110
|
onError: (r) => {
|
|
101
111
|
a.error(r.message || i("components.form.error")), t.onError?.(r);
|
|
102
112
|
},
|
|
103
113
|
onSuccess: (r) => {
|
|
104
|
-
a.success(i("components.form.success")), t.onSuccess?.(r), !
|
|
114
|
+
a.success(i("components.form.success")), t.onSuccess?.(r), !e.isEdit.value && m.current && m.delTab(m.current, (d) => s.push(d.path || "")), t.invalidate && c(t.invalidate);
|
|
105
115
|
}
|
|
106
|
-
}), u =
|
|
107
|
-
return () =>
|
|
116
|
+
}), u = m.tabs.find((r) => r.path === m.current);
|
|
117
|
+
return () => o(C, {
|
|
108
118
|
card: !1,
|
|
109
119
|
scrollbar: !1
|
|
110
120
|
}, {
|
|
111
|
-
default: () => [
|
|
112
|
-
title: t?.title || u?.label || (
|
|
121
|
+
default: () => [o(F, {
|
|
122
|
+
title: t?.title || u?.label || (e.isEdit.value ? i("components.form.edit") : i("components.form.create")),
|
|
113
123
|
description: t?.description,
|
|
114
124
|
class: "h-full flex flex-col",
|
|
115
125
|
contentClass: "flex-1 min-h-0",
|
|
116
126
|
contentSize: "none",
|
|
117
127
|
"header-bordered": !0
|
|
118
128
|
}, {
|
|
119
|
-
default: () =>
|
|
120
|
-
default: () => [
|
|
129
|
+
default: () => o(h, null, {
|
|
130
|
+
default: () => [o(P, {
|
|
121
131
|
labelPlacement: t.labelPlacement,
|
|
122
132
|
class: "p-4"
|
|
123
133
|
}, {
|
|
124
|
-
default: () => [
|
|
134
|
+
default: () => [n?.default?.(e)]
|
|
125
135
|
})]
|
|
126
136
|
}),
|
|
127
|
-
headerExtra: () =>
|
|
137
|
+
headerExtra: () => o("div", {
|
|
128
138
|
class: "flex gap-6 items-center"
|
|
129
|
-
}, [
|
|
139
|
+
}, [n?.actions?.(e), o("div", {
|
|
130
140
|
class: "flex gap-2"
|
|
131
|
-
}, [
|
|
132
|
-
onClick: () =>
|
|
133
|
-
loading:
|
|
141
|
+
}, [o(p, {
|
|
142
|
+
onClick: () => e.onReset(),
|
|
143
|
+
loading: e.isLoading.value
|
|
134
144
|
}, {
|
|
135
145
|
default: () => i("components.button.reset"),
|
|
136
|
-
icon: () =>
|
|
146
|
+
icon: () => o("i", {
|
|
137
147
|
class: "i-tabler:refresh"
|
|
138
148
|
}, null)
|
|
139
|
-
}),
|
|
149
|
+
}), o(p, {
|
|
140
150
|
type: "primary",
|
|
141
|
-
onClick: () =>
|
|
142
|
-
loading:
|
|
151
|
+
onClick: () => e.onSubmit(),
|
|
152
|
+
loading: e.isLoading.value
|
|
143
153
|
}, {
|
|
144
154
|
default: () => i("components.button.submit"),
|
|
145
|
-
icon: () =>
|
|
155
|
+
icon: () => o("i", {
|
|
146
156
|
class: "i-tabler:device-floppy"
|
|
147
157
|
}, null)
|
|
148
158
|
})])])
|
|
@@ -151,5 +161,5 @@ const vt = /* @__PURE__ */ f({
|
|
|
151
161
|
}
|
|
152
162
|
});
|
|
153
163
|
export {
|
|
154
|
-
|
|
164
|
+
zt as DuxPageForm
|
|
155
165
|
};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { defineComponent as d, toRef as f, createVNode as t } from "vue";
|
|
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 n } from "naive-ui";
|
|
4
|
+
import { useRouter as h } from "vue-router";
|
|
5
|
+
import "@overlastic/vue";
|
|
6
|
+
import { DuxCard as T } from "../card/card.js";
|
|
7
|
+
import "clsx";
|
|
8
|
+
import "vue-echarts";
|
|
9
|
+
import "@vueuse/core";
|
|
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 "short-unique-id";
|
|
26
|
+
import "aieditor";
|
|
27
|
+
import "vee-validate";
|
|
28
|
+
import "@duxweb/dvha-naiveui";
|
|
29
|
+
import "@iconify-json/tabler/icons.json";
|
|
30
|
+
import "../posterEditor/elements/index.js";
|
|
31
|
+
import "fabric";
|
|
32
|
+
import "mime";
|
|
33
|
+
import "dayjs";
|
|
34
|
+
import "@tanstack/vue-query";
|
|
35
|
+
import "pinia";
|
|
36
|
+
import "@vee-validate/i18n";
|
|
37
|
+
import "colorizr";
|
|
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";
|
|
53
|
+
import "@ant-design/colors";
|
|
54
|
+
import "@unocss/preset-icons/browser";
|
|
55
|
+
import "@unocss/preset-typography";
|
|
56
|
+
import "unocss/preset-wind4";
|
|
57
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
58
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
59
|
+
import "vue-command-palette";
|
|
60
|
+
import { DuxPage as E } from "../../pages/page.js";
|
|
61
|
+
import "../../pages/page404.js";
|
|
62
|
+
const It = /* @__PURE__ */ d({
|
|
63
|
+
name: "DuxPageTabForm",
|
|
64
|
+
props: {
|
|
65
|
+
id: {
|
|
66
|
+
type: [String, Number]
|
|
67
|
+
},
|
|
68
|
+
action: {
|
|
69
|
+
type: String
|
|
70
|
+
},
|
|
71
|
+
title: {
|
|
72
|
+
type: String
|
|
73
|
+
},
|
|
74
|
+
path: {
|
|
75
|
+
type: String
|
|
76
|
+
},
|
|
77
|
+
data: {
|
|
78
|
+
type: Object
|
|
79
|
+
},
|
|
80
|
+
onSuccess: {
|
|
81
|
+
type: Function
|
|
82
|
+
},
|
|
83
|
+
onError: {
|
|
84
|
+
type: Function
|
|
85
|
+
},
|
|
86
|
+
invalidate: {
|
|
87
|
+
type: String
|
|
88
|
+
},
|
|
89
|
+
defaultTab: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: "0"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
setup(o, {
|
|
95
|
+
slots: p
|
|
96
|
+
}) {
|
|
97
|
+
const {
|
|
98
|
+
t: r
|
|
99
|
+
} = g(), s = f(o, "data", {}), a = x(), l = h(), m = b(), {
|
|
100
|
+
invalidate: u
|
|
101
|
+
} = y(), i = v({
|
|
102
|
+
id: o.id,
|
|
103
|
+
path: o.path,
|
|
104
|
+
form: s,
|
|
105
|
+
action: o.action,
|
|
106
|
+
onError: (e) => {
|
|
107
|
+
a.error(e.message || r("components.form.error")), o.onError?.(e);
|
|
108
|
+
},
|
|
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);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
return () => t(E, {
|
|
114
|
+
card: !1,
|
|
115
|
+
scrollbar: !1
|
|
116
|
+
}, {
|
|
117
|
+
default: () => [t(T, {
|
|
118
|
+
class: "h-full"
|
|
119
|
+
}, {
|
|
120
|
+
default: () => [t(S, {
|
|
121
|
+
class: "app-page-tabs",
|
|
122
|
+
type: "line",
|
|
123
|
+
size: "large",
|
|
124
|
+
defaultValue: o.defaultTab
|
|
125
|
+
}, {
|
|
126
|
+
prefix: () => t("div", {
|
|
127
|
+
class: "w-1"
|
|
128
|
+
}, null),
|
|
129
|
+
default: () => p?.default?.(i),
|
|
130
|
+
suffix: () => t("div", {
|
|
131
|
+
class: "flex gap-6 items-center px-3"
|
|
132
|
+
}, [p?.actions?.(i), t("div", {
|
|
133
|
+
class: "flex gap-2"
|
|
134
|
+
}, [t(n, {
|
|
135
|
+
onClick: () => i.onReset(),
|
|
136
|
+
loading: i.isLoading.value
|
|
137
|
+
}, {
|
|
138
|
+
default: () => r("components.button.reset"),
|
|
139
|
+
icon: () => t("i", {
|
|
140
|
+
class: "i-tabler:refresh"
|
|
141
|
+
}, null)
|
|
142
|
+
}), t(n, {
|
|
143
|
+
type: "primary",
|
|
144
|
+
onClick: () => i.onSubmit(),
|
|
145
|
+
loading: i.isLoading.value
|
|
146
|
+
}, {
|
|
147
|
+
default: () => r("components.button.submit"),
|
|
148
|
+
icon: () => t("i", {
|
|
149
|
+
class: "i-tabler:device-floppy"
|
|
150
|
+
}, null)
|
|
151
|
+
})])])
|
|
152
|
+
})]
|
|
153
|
+
})]
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
export {
|
|
158
|
+
It as DuxPageTabForm
|
|
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
|
};
|