@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,4 +1,4 @@
|
|
|
1
|
-
import { createVNode as n, defineComponent as u, computed as
|
|
1
|
+
import { createVNode as n, defineComponent as u, computed as d, isVNode as g } from "vue";
|
|
2
2
|
import { useI18n as f } from "@duxweb/dvha-core";
|
|
3
3
|
import { useVModel as h } from "@vueuse/core";
|
|
4
4
|
import v from "clsx";
|
|
@@ -30,6 +30,20 @@ import "vee-validate";
|
|
|
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";
|
|
@@ -60,12 +74,12 @@ const C = /* @__PURE__ */ u({
|
|
|
60
74
|
onChildren: Function
|
|
61
75
|
},
|
|
62
76
|
setup(o) {
|
|
63
|
-
const r =
|
|
64
|
-
const t = [...o.children || []],
|
|
65
|
-
for (; t.length <
|
|
77
|
+
const r = d(() => o.options?.col || 2), i = d(() => {
|
|
78
|
+
const t = [...o.children || []], e = r.value;
|
|
79
|
+
for (; t.length < e; )
|
|
66
80
|
t.push([]);
|
|
67
|
-
for (let
|
|
68
|
-
Array.isArray(t[
|
|
81
|
+
for (let p = 0; p < e; p++)
|
|
82
|
+
Array.isArray(t[p]) || (t[p] = []);
|
|
69
83
|
return t;
|
|
70
84
|
});
|
|
71
85
|
return () => {
|
|
@@ -73,18 +87,18 @@ const C = /* @__PURE__ */ u({
|
|
|
73
87
|
return n(b, {
|
|
74
88
|
cols: r.value,
|
|
75
89
|
spac: o.options?.spac
|
|
76
|
-
}, x(t =
|
|
77
|
-
const
|
|
90
|
+
}, x(t = i.value.map((e, p) => {
|
|
91
|
+
const m = e;
|
|
78
92
|
return n("div", {
|
|
79
|
-
key:
|
|
93
|
+
key: p,
|
|
80
94
|
class: v({
|
|
81
|
-
"rounded border border-dashed border-accented": !
|
|
95
|
+
"rounded border border-dashed border-accented": !m?.length
|
|
82
96
|
})
|
|
83
97
|
}, [n(E, {
|
|
84
|
-
modelValue:
|
|
98
|
+
modelValue: m,
|
|
85
99
|
onUpdate: (s) => {
|
|
86
|
-
const
|
|
87
|
-
p
|
|
100
|
+
const l = [...i.value];
|
|
101
|
+
l[p] = s, o.onChildren?.(l);
|
|
88
102
|
}
|
|
89
103
|
}, null)]);
|
|
90
104
|
})) ? t : {
|
|
@@ -107,33 +121,33 @@ const C = /* @__PURE__ */ u({
|
|
|
107
121
|
emit: r
|
|
108
122
|
}) {
|
|
109
123
|
const {
|
|
110
|
-
t:
|
|
124
|
+
t: i
|
|
111
125
|
} = f(), t = h(o, "value", r);
|
|
112
126
|
return () => n(y, {
|
|
113
|
-
title:
|
|
127
|
+
title: i("components.designEditor.grid.title"),
|
|
114
128
|
icon: "i-tabler:grid-4x4"
|
|
115
129
|
}, {
|
|
116
130
|
default: () => [n(a, {
|
|
117
|
-
label:
|
|
131
|
+
label: i("components.designEditor.grid.columns"),
|
|
118
132
|
path: "col"
|
|
119
133
|
}, {
|
|
120
134
|
default: () => [n(c, {
|
|
121
135
|
value: t.value.col,
|
|
122
|
-
"onUpdate:value": (
|
|
136
|
+
"onUpdate:value": (e) => t.value.col = e,
|
|
123
137
|
min: 1,
|
|
124
138
|
max: 12,
|
|
125
|
-
placeholder:
|
|
139
|
+
placeholder: i("components.designEditor.grid.columnsPlaceholder")
|
|
126
140
|
}, null)]
|
|
127
141
|
}), n(a, {
|
|
128
|
-
label:
|
|
142
|
+
label: i("components.designEditor.grid.spacing"),
|
|
129
143
|
path: "spac"
|
|
130
144
|
}, {
|
|
131
145
|
default: () => [n(c, {
|
|
132
146
|
value: t.value.spac,
|
|
133
|
-
"onUpdate:value": (
|
|
147
|
+
"onUpdate:value": (e) => t.value.spac = e,
|
|
134
148
|
min: 0,
|
|
135
149
|
max: 100,
|
|
136
|
-
placeholder:
|
|
150
|
+
placeholder: i("components.designEditor.grid.spacingPlaceholder")
|
|
137
151
|
}, null)]
|
|
138
152
|
})]
|
|
139
153
|
});
|
|
@@ -142,10 +156,10 @@ const C = /* @__PURE__ */ u({
|
|
|
142
156
|
function j(o) {
|
|
143
157
|
const {
|
|
144
158
|
children: r,
|
|
145
|
-
convertToJsonSchema:
|
|
159
|
+
convertToJsonSchema: i
|
|
146
160
|
} = o || {};
|
|
147
161
|
let t = [];
|
|
148
|
-
return r?.length &&
|
|
162
|
+
return r?.length && i && (t = r.flatMap((e) => Array.isArray(e) ? i(e) : [])), {
|
|
149
163
|
tag: "dux-grid",
|
|
150
164
|
attrs: {
|
|
151
165
|
cols: o?.options?.col || 2,
|
|
@@ -154,7 +168,7 @@ function j(o) {
|
|
|
154
168
|
children: t
|
|
155
169
|
};
|
|
156
170
|
}
|
|
157
|
-
function
|
|
171
|
+
function Dt(o) {
|
|
158
172
|
return {
|
|
159
173
|
name: "dux-grid",
|
|
160
174
|
icon: "i-tabler:grid-4x4",
|
|
@@ -171,5 +185,5 @@ function Et(o) {
|
|
|
171
185
|
};
|
|
172
186
|
}
|
|
173
187
|
export {
|
|
174
|
-
|
|
188
|
+
Dt as duxFormEditorGrid
|
|
175
189
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as m, inject as l, computed as p, createVNode as
|
|
1
|
+
import { defineComponent as m, inject as l, computed as p, createVNode as o } from "vue";
|
|
2
2
|
import "clsx";
|
|
3
3
|
import "naive-ui";
|
|
4
4
|
import "vue-echarts";
|
|
@@ -29,6 +29,20 @@ import "vue-draggable-plus";
|
|
|
29
29
|
import "@vee-validate/i18n";
|
|
30
30
|
import "colorizr";
|
|
31
31
|
import "echarts";
|
|
32
|
+
import "highlight.js/lib/core";
|
|
33
|
+
import "highlight.js/lib/languages/bash";
|
|
34
|
+
import "highlight.js/lib/languages/css";
|
|
35
|
+
import "highlight.js/lib/languages/go";
|
|
36
|
+
import "highlight.js/lib/languages/java";
|
|
37
|
+
import "highlight.js/lib/languages/javascript";
|
|
38
|
+
import "highlight.js/lib/languages/json";
|
|
39
|
+
import "highlight.js/lib/languages/markdown";
|
|
40
|
+
import "highlight.js/lib/languages/php";
|
|
41
|
+
import "highlight.js/lib/languages/python";
|
|
42
|
+
import "highlight.js/lib/languages/shell";
|
|
43
|
+
import "highlight.js/lib/languages/sql";
|
|
44
|
+
import "highlight.js/lib/languages/typescript";
|
|
45
|
+
import "highlight.js/lib/languages/xml";
|
|
32
46
|
import "@ant-design/colors";
|
|
33
47
|
import "@unocss/preset-icons/browser";
|
|
34
48
|
import "@unocss/preset-typography";
|
|
@@ -44,48 +58,48 @@ import { DuxFormLayout as a } from "../../form/formLayout.js";
|
|
|
44
58
|
import "@iconify-json/tabler/icons.json";
|
|
45
59
|
import "../../posterEditor/elements/index.js";
|
|
46
60
|
import "fabric";
|
|
47
|
-
const
|
|
61
|
+
const gt = /* @__PURE__ */ m({
|
|
48
62
|
name: "WidgetEditorSetting",
|
|
49
63
|
props: {
|
|
50
64
|
actionRender: Function
|
|
51
65
|
},
|
|
52
|
-
setup(
|
|
53
|
-
const t = l("editor.use"),
|
|
54
|
-
return () =>
|
|
66
|
+
setup(e) {
|
|
67
|
+
const t = l("editor.use"), i = p(() => t?.getData(t.selected.value)), n = p(() => t?.components.value?.find((r) => r.name === i.value?.name));
|
|
68
|
+
return () => o("div", {
|
|
55
69
|
class: "flex-none p-2 max-w-full w-220px overflow-y-auto bg-default",
|
|
56
|
-
key:
|
|
70
|
+
key: i.value?.key
|
|
57
71
|
}, [n.value?.setting?.({
|
|
58
|
-
value:
|
|
59
|
-
"update:modelValue": (
|
|
60
|
-
|
|
72
|
+
value: i.value?.options,
|
|
73
|
+
"update:modelValue": (r) => {
|
|
74
|
+
i?.value && (i.value.options = r);
|
|
61
75
|
}
|
|
62
|
-
}) ||
|
|
76
|
+
}) || o("div", {
|
|
63
77
|
class: "flex flex-col gap-2 h-full"
|
|
64
|
-
}, [
|
|
78
|
+
}, [o("div", {
|
|
65
79
|
class: "flex-1 min-h-0"
|
|
66
80
|
}, [t?.settingPage?.component?.({
|
|
67
81
|
value: t.value.value.config,
|
|
68
|
-
"update:modelValue": (
|
|
69
|
-
t.value.value.config =
|
|
82
|
+
"update:modelValue": (r) => {
|
|
83
|
+
t.value.value.config = r;
|
|
70
84
|
}
|
|
71
|
-
})]),
|
|
85
|
+
})]), e?.actionRender?.(t)])]);
|
|
72
86
|
}
|
|
73
|
-
}),
|
|
87
|
+
}), xt = /* @__PURE__ */ m({
|
|
74
88
|
name: "WidgetEditorSettingCard",
|
|
75
89
|
props: {
|
|
76
90
|
title: String,
|
|
77
91
|
icon: String
|
|
78
92
|
},
|
|
79
|
-
setup(
|
|
93
|
+
setup(e, {
|
|
80
94
|
slots: t
|
|
81
95
|
}) {
|
|
82
|
-
return () =>
|
|
96
|
+
return () => o("div", {
|
|
83
97
|
class: "flex flex-col"
|
|
84
|
-
}, [
|
|
98
|
+
}, [o("div", {
|
|
85
99
|
class: "bg-elevated rounded py-2 px-4 flex justify-center items-center gap-2"
|
|
86
|
-
}, [
|
|
100
|
+
}, [o("div", null, [e.title])]), o("div", {
|
|
87
101
|
class: "py-4 flex-1"
|
|
88
|
-
}, [
|
|
102
|
+
}, [o(a, {
|
|
89
103
|
labelPlacement: "top"
|
|
90
104
|
}, {
|
|
91
105
|
default: () => [t.default?.()]
|
|
@@ -93,6 +107,6 @@ const ot = /* @__PURE__ */ m({
|
|
|
93
107
|
}
|
|
94
108
|
});
|
|
95
109
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
110
|
+
gt as WidgetEditorSetting,
|
|
111
|
+
xt as WidgetEditorSettingCard
|
|
98
112
|
};
|
|
@@ -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 i, Fragment as F, mergeProps as x, isVNode as D } from "vue";
|
|
2
2
|
import { useI18n as E, useInvalidate as N, useExtendForm as h } from "@duxweb/dvha-core";
|
|
3
3
|
import { useMessage as j, NButton as p, NScrollbar as w } from "naive-ui";
|
|
4
4
|
import "clsx";
|
|
@@ -29,6 +29,20 @@ import "vue-draggable-plus";
|
|
|
29
29
|
import "@vee-validate/i18n";
|
|
30
30
|
import "colorizr";
|
|
31
31
|
import "echarts";
|
|
32
|
+
import "highlight.js/lib/core";
|
|
33
|
+
import "highlight.js/lib/languages/bash";
|
|
34
|
+
import "highlight.js/lib/languages/css";
|
|
35
|
+
import "highlight.js/lib/languages/go";
|
|
36
|
+
import "highlight.js/lib/languages/java";
|
|
37
|
+
import "highlight.js/lib/languages/javascript";
|
|
38
|
+
import "highlight.js/lib/languages/json";
|
|
39
|
+
import "highlight.js/lib/languages/markdown";
|
|
40
|
+
import "highlight.js/lib/languages/php";
|
|
41
|
+
import "highlight.js/lib/languages/python";
|
|
42
|
+
import "highlight.js/lib/languages/shell";
|
|
43
|
+
import "highlight.js/lib/languages/sql";
|
|
44
|
+
import "highlight.js/lib/languages/typescript";
|
|
45
|
+
import "highlight.js/lib/languages/xml";
|
|
32
46
|
import "@ant-design/colors";
|
|
33
47
|
import "@unocss/preset-icons/browser";
|
|
34
48
|
import "@unocss/preset-typography";
|
|
@@ -48,7 +62,7 @@ import "fabric";
|
|
|
48
62
|
function s(t) {
|
|
49
63
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !D(t);
|
|
50
64
|
}
|
|
51
|
-
const
|
|
65
|
+
const Ht = /* @__PURE__ */ b({
|
|
52
66
|
name: "DuxDrawerForm",
|
|
53
67
|
props: {
|
|
54
68
|
id: {
|
|
@@ -88,7 +102,7 @@ const Ot = /* @__PURE__ */ b({
|
|
|
88
102
|
} = E(), l = v(() => {
|
|
89
103
|
const {
|
|
90
104
|
onClose: o,
|
|
91
|
-
onSuccess:
|
|
105
|
+
onSuccess: e,
|
|
92
106
|
onError: P,
|
|
93
107
|
action: _,
|
|
94
108
|
title: k,
|
|
@@ -98,10 +112,10 @@ const Ot = /* @__PURE__ */ b({
|
|
|
98
112
|
...S
|
|
99
113
|
} = t;
|
|
100
114
|
return S;
|
|
101
|
-
}), u = C(t, "data", {}),
|
|
115
|
+
}), u = C(t, "data", {}), m = j(), {
|
|
102
116
|
invalidate: d
|
|
103
117
|
} = N(), {
|
|
104
|
-
isLoading:
|
|
118
|
+
isLoading: n,
|
|
105
119
|
onSubmit: f,
|
|
106
120
|
onReset: g,
|
|
107
121
|
isEdit: y
|
|
@@ -111,42 +125,42 @@ const Ot = /* @__PURE__ */ b({
|
|
|
111
125
|
form: u,
|
|
112
126
|
action: t.action,
|
|
113
127
|
onError: (o) => {
|
|
114
|
-
|
|
128
|
+
m.error(o.message || r("components.form.error")), t.onError?.(o);
|
|
115
129
|
},
|
|
116
130
|
onSuccess: (o) => {
|
|
117
|
-
|
|
131
|
+
m.success(r("components.form.success")), t.onSuccess?.(o), t.onClose?.(), t.invalidate && d(t.invalidate);
|
|
118
132
|
}
|
|
119
133
|
});
|
|
120
|
-
return () =>
|
|
134
|
+
return () => i(O, {
|
|
121
135
|
scrollbar: !1,
|
|
122
136
|
title: t?.title || (y.value ? r("components.form.edit") : r("components.form.create")),
|
|
123
137
|
onClose: t?.onClose
|
|
124
138
|
}, {
|
|
125
|
-
default: () =>
|
|
126
|
-
default: () => [
|
|
139
|
+
default: () => i(w, null, {
|
|
140
|
+
default: () => [i(a, x({
|
|
127
141
|
class: "p-4"
|
|
128
142
|
}, l.value), {
|
|
129
143
|
default: () => [c?.default?.()]
|
|
130
144
|
})]
|
|
131
145
|
}),
|
|
132
146
|
footer: () => {
|
|
133
|
-
let o,
|
|
134
|
-
return
|
|
147
|
+
let o, e;
|
|
148
|
+
return i(F, null, [i(p, {
|
|
135
149
|
onClick: g,
|
|
136
|
-
loading:
|
|
150
|
+
loading: n.value
|
|
137
151
|
}, s(o = r("components.button.reset")) ? o : {
|
|
138
152
|
default: () => [o]
|
|
139
|
-
}),
|
|
153
|
+
}), i(p, {
|
|
140
154
|
type: "primary",
|
|
141
|
-
loading:
|
|
155
|
+
loading: n.value,
|
|
142
156
|
onClick: () => f()
|
|
143
|
-
}, s(
|
|
144
|
-
default: () => [
|
|
157
|
+
}, s(e = r("components.button.submit")) ? e : {
|
|
158
|
+
default: () => [e]
|
|
145
159
|
})]);
|
|
146
160
|
}
|
|
147
161
|
});
|
|
148
162
|
}
|
|
149
163
|
});
|
|
150
164
|
export {
|
|
151
|
-
|
|
165
|
+
Ht as DuxDrawerForm
|
|
152
166
|
};
|
|
@@ -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: {
|
|
@@ -82,63 +96,63 @@ const vt = /* @__PURE__ */ f({
|
|
|
82
96
|
}
|
|
83
97
|
},
|
|
84
98
|
setup(t, {
|
|
85
|
-
slots:
|
|
99
|
+
slots: n
|
|
86
100
|
}) {
|
|
87
101
|
const {
|
|
88
102
|
t: i
|
|
89
|
-
} = g(),
|
|
103
|
+
} = g(), l = b(t, "data", {}), a = v(), s = E(), m = y(), {
|
|
90
104
|
invalidate: c
|
|
91
|
-
} = S(),
|
|
105
|
+
} = S(), e = x({
|
|
92
106
|
id: t.id,
|
|
93
107
|
path: t.path,
|
|
94
|
-
form:
|
|
108
|
+
form: l,
|
|
95
109
|
action: t.action,
|
|
96
110
|
onError: (r) => {
|
|
97
111
|
a.error(r.message || i("components.form.error")), t.onError?.(r);
|
|
98
112
|
},
|
|
99
113
|
onSuccess: (r) => {
|
|
100
|
-
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);
|
|
101
115
|
}
|
|
102
|
-
}), u =
|
|
103
|
-
return () =>
|
|
116
|
+
}), u = m.tabs.find((r) => r.path === m.current);
|
|
117
|
+
return () => o(C, {
|
|
104
118
|
card: !1,
|
|
105
119
|
scrollbar: !1
|
|
106
120
|
}, {
|
|
107
|
-
default: () => [
|
|
108
|
-
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")),
|
|
109
123
|
description: t?.description,
|
|
110
124
|
class: "h-full flex flex-col",
|
|
111
125
|
contentClass: "flex-1 min-h-0",
|
|
112
126
|
contentSize: "none",
|
|
113
127
|
"header-bordered": !0
|
|
114
128
|
}, {
|
|
115
|
-
default: () =>
|
|
116
|
-
default: () => [
|
|
129
|
+
default: () => o(h, null, {
|
|
130
|
+
default: () => [o(P, {
|
|
117
131
|
labelPlacement: t.labelPlacement,
|
|
118
132
|
class: "p-4"
|
|
119
133
|
}, {
|
|
120
|
-
default: () => [
|
|
134
|
+
default: () => [n?.default?.(e)]
|
|
121
135
|
})]
|
|
122
136
|
}),
|
|
123
|
-
headerExtra: () =>
|
|
137
|
+
headerExtra: () => o("div", {
|
|
124
138
|
class: "flex gap-6 items-center"
|
|
125
|
-
}, [
|
|
139
|
+
}, [n?.actions?.(e), o("div", {
|
|
126
140
|
class: "flex gap-2"
|
|
127
|
-
}, [
|
|
128
|
-
onClick: () =>
|
|
129
|
-
loading:
|
|
141
|
+
}, [o(p, {
|
|
142
|
+
onClick: () => e.onReset(),
|
|
143
|
+
loading: e.isLoading.value
|
|
130
144
|
}, {
|
|
131
145
|
default: () => i("components.button.reset"),
|
|
132
|
-
icon: () =>
|
|
146
|
+
icon: () => o("i", {
|
|
133
147
|
class: "i-tabler:refresh"
|
|
134
148
|
}, null)
|
|
135
|
-
}),
|
|
149
|
+
}), o(p, {
|
|
136
150
|
type: "primary",
|
|
137
|
-
onClick: () =>
|
|
138
|
-
loading:
|
|
151
|
+
onClick: () => e.onSubmit(),
|
|
152
|
+
loading: e.isLoading.value
|
|
139
153
|
}, {
|
|
140
154
|
default: () => i("components.button.submit"),
|
|
141
|
-
icon: () =>
|
|
155
|
+
icon: () => o("i", {
|
|
142
156
|
class: "i-tabler:device-floppy"
|
|
143
157
|
}, null)
|
|
144
158
|
})])])
|
|
@@ -147,5 +161,5 @@ const vt = /* @__PURE__ */ f({
|
|
|
147
161
|
}
|
|
148
162
|
});
|
|
149
163
|
export {
|
|
150
|
-
|
|
164
|
+
zt as DuxPageForm
|
|
151
165
|
};
|