@duxweb/dvha-pro 1.0.18 → 1.0.19
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/card/card.cjs +1 -1
- package/dist/cjs/components/chart/echart.cjs +1 -1
- package/dist/cjs/components/code/code.cjs +1 -0
- 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/drawer/drawer.cjs +1 -1
- package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
- package/dist/cjs/components/form/formItem.cjs +1 -1
- package/dist/cjs/components/form/formLayout.cjs +1 -1
- package/dist/cjs/components/form/modalForm.cjs +1 -1
- package/dist/cjs/components/form/pageForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/icon/icon.cjs +1 -1
- package/dist/cjs/components/layout/filter.cjs +1 -1
- package/dist/cjs/components/layout/filterLayout.cjs +1 -0
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/level/level.cjs +1 -1
- package/dist/cjs/components/modal/modal.cjs +1 -1
- package/dist/cjs/components/modal/modalPage.cjs +1 -1
- package/dist/cjs/components/panel/collapse.cjs +1 -0
- package/dist/cjs/components/panel/setting.cjs +1 -1
- package/dist/cjs/components/status/listEmpty.cjs +1 -0
- package/dist/cjs/components/table/table.cjs +1 -0
- package/dist/cjs/components/table/tablePage.cjs +1 -1
- package/dist/cjs/components/tree/treeFilter.cjs +1 -1
- package/dist/cjs/components/upload/config.cjs +1 -0
- 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/dvha-pro.css +1 -1
- package/dist/cjs/hooks/action.cjs +1 -1
- package/dist/cjs/hooks/dialog.cjs +1 -1
- package/dist/cjs/hooks/drawer.cjs +1 -1
- package/dist/cjs/hooks/modal.cjs +1 -1
- package/dist/cjs/hooks/table/image.cjs +1 -1
- package/dist/cjs/hooks/table/media.cjs +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/langs/en-US.json.cjs +1 -1
- package/dist/cjs/langs/zh-CN.json.cjs +1 -1
- package/dist/cjs/pages/authLayout.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/pages/login.cjs +1 -1
- package/dist/cjs/pages/menu/avatar.cjs +1 -1
- package/dist/cjs/pages/menu/button.cjs +1 -1
- package/dist/cjs/pages/menu/cmd.cjs +1 -1
- package/dist/cjs/pages/menu/main.cjs +1 -1
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/pages/page.cjs +1 -1
- package/dist/cjs/pages/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/theme/naiveTheme.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +23 -7
- package/dist/esm/component.js +36 -34
- package/dist/esm/components/card/card.js +6 -6
- package/dist/esm/components/chart/echart.js +17 -6
- package/dist/esm/components/code/code.js +53 -0
- package/dist/esm/components/crop/imageCrop.js +37 -26
- package/dist/esm/components/data/dynamicSelect.js +29 -18
- package/dist/esm/components/data/selectModal.js +49 -38
- package/dist/esm/components/drawer/drawer.js +17 -28
- package/dist/esm/components/drawer/drawerPage.js +54 -17
- package/dist/esm/components/form/formItem.js +17 -17
- package/dist/esm/components/form/formLayout.js +8 -8
- package/dist/esm/components/form/modalForm.js +44 -35
- package/dist/esm/components/form/pageForm.js +81 -43
- package/dist/esm/components/form/settingForm.js +28 -17
- package/dist/esm/components/icon/icon.js +23 -12
- package/dist/esm/components/layout/filter.js +15 -11
- package/dist/esm/components/layout/filterLayout.js +34 -0
- package/dist/esm/components/layout/list.js +206 -160
- package/dist/esm/components/layout/table.js +212 -185
- package/dist/esm/components/level/level.js +28 -17
- package/dist/esm/components/modal/modal.js +9 -9
- package/dist/esm/components/modal/modalPage.js +2 -2
- package/dist/esm/components/panel/collapse.js +49 -0
- package/dist/esm/components/panel/setting.js +3 -3
- package/dist/esm/components/status/listEmpty.js +26 -0
- package/dist/esm/components/table/table.js +110 -0
- package/dist/esm/components/table/tablePage.js +24 -18
- package/dist/esm/components/tree/treeFilter.js +44 -39
- package/dist/esm/components/upload/config.js +32 -0
- package/dist/esm/components/upload/file.js +142 -116
- package/dist/esm/components/upload/image.js +95 -66
- package/dist/esm/components/upload/manage/item.js +17 -6
- package/dist/esm/components/upload/manager.js +202 -164
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +77 -75
- package/dist/esm/hooks/dialog.js +13 -2
- package/dist/esm/hooks/drawer.js +13 -2
- package/dist/esm/hooks/modal.js +13 -2
- package/dist/esm/hooks/table/image.js +21 -10
- package/dist/esm/hooks/table/media.js +20 -9
- package/dist/esm/hooks/table.js +16 -13
- package/dist/esm/index.js +174 -164
- package/dist/esm/langs/en-US.json.js +1 -1
- package/dist/esm/langs/zh-CN.json.js +1 -1
- package/dist/esm/pages/authLayout.js +19 -8
- package/dist/esm/pages/layout/page.js +17 -6
- package/dist/esm/pages/login.js +40 -29
- package/dist/esm/pages/menu/avatar.js +45 -34
- package/dist/esm/pages/menu/button.js +23 -12
- package/dist/esm/pages/menu/cmd.js +45 -34
- package/dist/esm/pages/menu/main.js +40 -27
- package/dist/esm/pages/menu/mobile.js +13 -2
- package/dist/esm/pages/page.js +1 -1
- package/dist/esm/pages/page404.js +20 -9
- package/dist/esm/pages/pageStatus.js +31 -15
- package/dist/esm/theme/naiveTheme.js +6 -6
- package/dist/esm/theme/uno.css.js +23 -7
- package/dist/types/components/code/code.d.ts +44 -0
- package/dist/types/components/code/index.d.ts +1 -0
- package/dist/types/components/drawer/drawer.d.ts +2 -0
- package/dist/types/components/drawer/drawerPage.d.ts +20 -1
- package/dist/types/components/form/formItem.d.ts +2 -2
- package/dist/types/components/form/formLayout.d.ts +3 -3
- package/dist/types/components/form/modalForm.d.ts +3 -3
- package/dist/types/components/form/pageForm.d.ts +12 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/layout/filterLayout.d.ts +32 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/layout/table.d.ts +3 -0
- package/dist/types/components/panel/collapse.d.ts +14 -0
- package/dist/types/components/panel/index.d.ts +1 -0
- package/dist/types/components/select/cardSelect.d.ts +1 -1
- package/dist/types/components/status/index.d.ts +1 -0
- package/dist/types/components/status/listEmpty.d.ts +11 -0
- package/dist/types/components/table/index.d.ts +1 -0
- package/dist/types/components/table/table.d.ts +6552 -0
- package/dist/types/components/table/tablePage.d.ts +3 -0
- package/dist/types/components/tree/treeFilter.d.ts +13 -12
- package/dist/types/components/upload/config.d.ts +13 -0
- package/dist/types/components/upload/file.d.ts +4 -0
- package/dist/types/components/upload/image.d.ts +30 -2
- package/dist/types/components/upload/manager.d.ts +4 -0
- package/dist/types/hooks/drawer.d.ts +1 -0
- package/dist/types/hooks/table/types.d.ts +1 -0
- package/dist/types/main.d.ts +6 -0
- package/dist/types/pages/pageStatus.d.ts +11 -1
- package/package.json +6 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as s, computed as C, toRef as F, createVNode as n, Fragment as x, isVNode as E } from "vue";
|
|
2
2
|
import { useI18n as h, useExtendForm as j } from "@duxweb/dvha-core";
|
|
3
|
-
import { useMessage as
|
|
3
|
+
import { useMessage as v, NButton as a } from "naive-ui";
|
|
4
4
|
import "clsx";
|
|
5
5
|
import "vue-echarts";
|
|
6
6
|
import "vue-router";
|
|
@@ -13,12 +13,12 @@ import "@duxweb/dvha-naiveui";
|
|
|
13
13
|
import "@vueuse/core";
|
|
14
14
|
import "pinia";
|
|
15
15
|
import "vue-cropper";
|
|
16
|
-
import
|
|
16
|
+
import D from "../modal/modalPage.js";
|
|
17
17
|
import "jinrishici";
|
|
18
18
|
import "vue-draggable-plus";
|
|
19
19
|
import "aieditor";
|
|
20
20
|
import "vee-validate";
|
|
21
|
-
import { DuxFormLayout as
|
|
21
|
+
import { DuxFormLayout as d } from "./formLayout.js";
|
|
22
22
|
import "@vee-validate/i18n";
|
|
23
23
|
import "colorizr";
|
|
24
24
|
import "echarts";
|
|
@@ -31,10 +31,21 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
31
31
|
import "vue-command-palette";
|
|
32
32
|
import "../../pages/page404.js";
|
|
33
33
|
import "@iconify-json/tabler/icons.json";
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
import "vue3-ace-editor";
|
|
35
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
36
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
37
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
38
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
39
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
40
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
41
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
42
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
43
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
44
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
45
|
+
function l(t) {
|
|
46
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !E(t);
|
|
36
47
|
}
|
|
37
|
-
const
|
|
48
|
+
const Et = /* @__PURE__ */ s({
|
|
38
49
|
name: "DuxModalForm",
|
|
39
50
|
props: {
|
|
40
51
|
id: {
|
|
@@ -62,68 +73,66 @@ const ft = /* @__PURE__ */ p({
|
|
|
62
73
|
type: Function
|
|
63
74
|
}
|
|
64
75
|
},
|
|
65
|
-
extends:
|
|
76
|
+
extends: d,
|
|
66
77
|
setup(t, {
|
|
67
|
-
slots:
|
|
78
|
+
slots: m
|
|
68
79
|
}) {
|
|
69
80
|
const {
|
|
70
|
-
t:
|
|
81
|
+
t: i
|
|
71
82
|
} = h(), f = C(() => {
|
|
72
83
|
const {
|
|
73
84
|
onClose: o,
|
|
74
85
|
onSuccess: e,
|
|
75
86
|
onError: r,
|
|
76
|
-
action:
|
|
77
|
-
title:
|
|
78
|
-
id:
|
|
87
|
+
action: M,
|
|
88
|
+
title: N,
|
|
89
|
+
id: O,
|
|
79
90
|
path: _,
|
|
80
91
|
data: k,
|
|
81
|
-
...
|
|
92
|
+
...b
|
|
82
93
|
} = t;
|
|
83
|
-
return
|
|
84
|
-
}),
|
|
94
|
+
return b;
|
|
95
|
+
}), p = F(t, "data", {}), c = v(), {
|
|
85
96
|
isLoading: u,
|
|
86
|
-
onSubmit:
|
|
87
|
-
onReset:
|
|
88
|
-
isEdit:
|
|
97
|
+
onSubmit: g,
|
|
98
|
+
onReset: y,
|
|
99
|
+
isEdit: S
|
|
89
100
|
} = j({
|
|
90
101
|
id: t.id,
|
|
91
102
|
path: t.path,
|
|
92
|
-
form:
|
|
103
|
+
form: p,
|
|
93
104
|
action: t.action,
|
|
94
105
|
onError: (o) => {
|
|
95
106
|
var e;
|
|
96
|
-
c.error(o.message ||
|
|
107
|
+
c.error(o.message || i("components.form.error")), (e = t.onError) == null || e.call(t, o);
|
|
97
108
|
},
|
|
98
109
|
onSuccess: (o) => {
|
|
99
110
|
var e, r;
|
|
100
|
-
c.success(
|
|
111
|
+
c.success(i("components.form.success")), (e = t.onSuccess) == null || e.call(t, o), (r = t.onClose) == null || r.call(t);
|
|
101
112
|
}
|
|
102
113
|
});
|
|
103
|
-
return () =>
|
|
104
|
-
title: (t == null ? void 0 : t.title) || (
|
|
114
|
+
return () => n(D, {
|
|
115
|
+
title: (t == null ? void 0 : t.title) || (S.value ? i("components.form.edit") : i("components.form.create")),
|
|
105
116
|
onClose: t == null ? void 0 : t.onClose
|
|
106
117
|
}, {
|
|
107
|
-
default: () =>
|
|
108
|
-
class: "px-2 py-2"
|
|
109
|
-
}), {
|
|
118
|
+
default: () => n(d, f.value, {
|
|
110
119
|
default: () => {
|
|
111
120
|
var o;
|
|
112
|
-
return [(o =
|
|
121
|
+
return [(o = m == null ? void 0 : m.default) == null ? void 0 : o.call(m)];
|
|
113
122
|
}
|
|
114
123
|
}),
|
|
115
124
|
footer: () => {
|
|
116
125
|
let o, e;
|
|
117
|
-
return
|
|
118
|
-
onClick:
|
|
126
|
+
return n(x, null, [n(a, {
|
|
127
|
+
onClick: y,
|
|
119
128
|
loading: u.value
|
|
120
|
-
},
|
|
129
|
+
}, l(o = i("components.button.reset")) ? o : {
|
|
121
130
|
default: () => [o]
|
|
122
|
-
}),
|
|
131
|
+
}), n(a, {
|
|
123
132
|
type: "primary",
|
|
124
133
|
loading: u.value,
|
|
125
|
-
onClick:
|
|
126
|
-
},
|
|
134
|
+
onClick: () => g()
|
|
135
|
+
}, l(e = i("components.button.submit")) ? e : {
|
|
127
136
|
default: () => [e]
|
|
128
137
|
})]);
|
|
129
138
|
}
|
|
@@ -131,5 +140,5 @@ const ft = /* @__PURE__ */ p({
|
|
|
131
140
|
}
|
|
132
141
|
});
|
|
133
142
|
export {
|
|
134
|
-
|
|
143
|
+
Et as DuxModalForm
|
|
135
144
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useMessage as
|
|
1
|
+
import { defineComponent as b, toRef as g, createVNode as i } from "vue";
|
|
2
|
+
import { useI18n as x, useTabStore as y, useExtendForm as S } from "@duxweb/dvha-core";
|
|
3
|
+
import { useMessage as s, NButton as p, NScrollbar as h } from "naive-ui";
|
|
4
|
+
import { useRouter as E } from "vue-router";
|
|
4
5
|
import "@overlastic/vue";
|
|
5
|
-
import "
|
|
6
|
+
import { DuxCard as F } from "../card/card.js";
|
|
6
7
|
import "clsx";
|
|
7
8
|
import "vue-echarts";
|
|
8
9
|
import "@vueuse/core";
|
|
@@ -12,8 +13,20 @@ import "lodash-es";
|
|
|
12
13
|
import "vue-draggable-plus";
|
|
13
14
|
import "aieditor";
|
|
14
15
|
import "vee-validate";
|
|
16
|
+
import { DuxFormLayout as v } from "./formLayout.js";
|
|
15
17
|
import "@iconify-json/tabler/icons.json";
|
|
16
18
|
import "mime";
|
|
19
|
+
import "vue3-ace-editor";
|
|
20
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
21
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
22
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
23
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
24
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
25
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
26
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
27
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
28
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
29
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
17
30
|
import "dayjs";
|
|
18
31
|
import "@tanstack/vue-query";
|
|
19
32
|
import "@duxweb/dvha-naiveui";
|
|
@@ -28,9 +41,9 @@ import "unocss/preset-wind4";
|
|
|
28
41
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
29
42
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
30
43
|
import "vue-command-palette";
|
|
31
|
-
import { DuxPage as
|
|
44
|
+
import { DuxPage as C } from "../../pages/page.js";
|
|
32
45
|
import "../../pages/page404.js";
|
|
33
|
-
const
|
|
46
|
+
const xt = /* @__PURE__ */ b({
|
|
34
47
|
name: "DuxPageForm",
|
|
35
48
|
props: {
|
|
36
49
|
id: {
|
|
@@ -39,6 +52,12 @@ const W = /* @__PURE__ */ p({
|
|
|
39
52
|
action: {
|
|
40
53
|
type: String
|
|
41
54
|
},
|
|
55
|
+
title: {
|
|
56
|
+
type: String
|
|
57
|
+
},
|
|
58
|
+
description: {
|
|
59
|
+
type: String
|
|
60
|
+
},
|
|
42
61
|
path: {
|
|
43
62
|
type: String
|
|
44
63
|
},
|
|
@@ -57,54 +76,73 @@ const W = /* @__PURE__ */ p({
|
|
|
57
76
|
}
|
|
58
77
|
},
|
|
59
78
|
setup(t, {
|
|
60
|
-
slots:
|
|
79
|
+
slots: r
|
|
61
80
|
}) {
|
|
62
81
|
const {
|
|
63
82
|
t: o
|
|
64
|
-
} =
|
|
83
|
+
} = x(), d = g(t, "data", {}), u = s(), l = E(), n = y(), m = S({
|
|
65
84
|
id: t.id,
|
|
66
85
|
path: t.path,
|
|
67
|
-
form:
|
|
86
|
+
form: d,
|
|
68
87
|
action: t.action,
|
|
69
|
-
onError: (
|
|
70
|
-
var
|
|
71
|
-
|
|
88
|
+
onError: (e) => {
|
|
89
|
+
var a;
|
|
90
|
+
u.error(e.message || o("components.form.error")), (a = t.onError) == null || a.call(t, e);
|
|
72
91
|
},
|
|
73
|
-
onSuccess: (
|
|
74
|
-
var
|
|
75
|
-
|
|
92
|
+
onSuccess: (e) => {
|
|
93
|
+
var a;
|
|
94
|
+
u.success(o("components.form.success")), (a = t.onSuccess) == null || a.call(t, e), !m.isEdit.value && n.current && n.delTab(n.current, (f) => l.push(f.path || ""));
|
|
76
95
|
}
|
|
77
|
-
});
|
|
78
|
-
return () => i(
|
|
79
|
-
card: !1
|
|
96
|
+
}), c = n.tabs.find((e) => e.path === n.current);
|
|
97
|
+
return () => i(C, {
|
|
98
|
+
card: !1,
|
|
99
|
+
scrollbar: !1
|
|
80
100
|
}, {
|
|
81
|
-
default: () => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
default: () => [i(F, {
|
|
102
|
+
title: (t == null ? void 0 : t.title) || (c == null ? void 0 : c.label) || (m.isEdit.value ? o("components.form.edit") : o("components.form.create")),
|
|
103
|
+
description: t == null ? void 0 : t.description,
|
|
104
|
+
class: "h-full flex flex-col",
|
|
105
|
+
contentClass: "flex-1 min-h-0",
|
|
106
|
+
contentSize: "none",
|
|
107
|
+
"header-bordered": !0
|
|
108
|
+
}, {
|
|
109
|
+
default: () => i(h, null, {
|
|
110
|
+
default: () => [i(v, {
|
|
111
|
+
"label-placement": "page"
|
|
112
|
+
}, {
|
|
113
|
+
default: () => {
|
|
114
|
+
var e;
|
|
115
|
+
return [(e = r == null ? void 0 : r.default) == null ? void 0 : e.call(r, m)];
|
|
116
|
+
}
|
|
117
|
+
})]
|
|
118
|
+
}),
|
|
119
|
+
headerExtra: () => {
|
|
120
|
+
var e;
|
|
121
|
+
return i("div", {
|
|
122
|
+
class: "flex gap-6 items-center"
|
|
123
|
+
}, [(e = r == null ? void 0 : r.actions) == null ? void 0 : e.call(r, m), i("div", {
|
|
124
|
+
class: "flex gap-2"
|
|
125
|
+
}, [i(p, {
|
|
126
|
+
onClick: () => m.onReset()
|
|
127
|
+
}, {
|
|
128
|
+
default: () => o("components.button.reset"),
|
|
129
|
+
icon: () => i("i", {
|
|
130
|
+
class: "i-tabler:refresh"
|
|
131
|
+
}, null)
|
|
132
|
+
}), i(p, {
|
|
133
|
+
type: "primary",
|
|
134
|
+
onClick: () => m.onSubmit()
|
|
135
|
+
}, {
|
|
136
|
+
default: () => o("components.button.submit"),
|
|
137
|
+
icon: () => i("i", {
|
|
138
|
+
class: "i-tabler:device-floppy"
|
|
139
|
+
}, null)
|
|
140
|
+
})])]);
|
|
141
|
+
}
|
|
142
|
+
})]
|
|
105
143
|
});
|
|
106
144
|
}
|
|
107
145
|
});
|
|
108
146
|
export {
|
|
109
|
-
|
|
147
|
+
xt as DuxPageForm
|
|
110
148
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, ref as d, toRef as l, computed as g, createVNode as i } from "vue";
|
|
2
2
|
import { useI18n as x, useExtendForm as y } from "@duxweb/dvha-core";
|
|
3
3
|
import { useMessage as S, NTabs as b } from "naive-ui";
|
|
4
4
|
import "@overlastic/vue";
|
|
@@ -14,6 +14,17 @@ import "aieditor";
|
|
|
14
14
|
import "vee-validate";
|
|
15
15
|
import "@iconify-json/tabler/icons.json";
|
|
16
16
|
import "mime";
|
|
17
|
+
import "vue3-ace-editor";
|
|
18
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
19
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
20
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
21
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
22
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
23
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
24
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
25
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
26
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
27
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
17
28
|
import "dayjs";
|
|
18
29
|
import "@tanstack/vue-query";
|
|
19
30
|
import "@duxweb/dvha-naiveui";
|
|
@@ -30,7 +41,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
30
41
|
import "vue-command-palette";
|
|
31
42
|
import { DuxPage as v } from "../../pages/page.js";
|
|
32
43
|
import "../../pages/page404.js";
|
|
33
|
-
const
|
|
44
|
+
const ct = /* @__PURE__ */ f({
|
|
34
45
|
name: "DuxSettingForm",
|
|
35
46
|
props: {
|
|
36
47
|
id: {
|
|
@@ -67,22 +78,22 @@ const _ = /* @__PURE__ */ d({
|
|
|
67
78
|
setup(t, {
|
|
68
79
|
slots: e
|
|
69
80
|
}) {
|
|
70
|
-
const
|
|
81
|
+
const a = d(t.defaultTab), c = l(t, "data", {}), {
|
|
71
82
|
t: o
|
|
72
83
|
} = x(), n = S(), u = y({
|
|
73
84
|
id: t.id,
|
|
74
85
|
path: t.path,
|
|
75
86
|
form: c,
|
|
76
87
|
action: t.action,
|
|
77
|
-
onError: (
|
|
88
|
+
onError: (r) => {
|
|
78
89
|
var m;
|
|
79
|
-
n.error(
|
|
90
|
+
n.error(r.message || o("components.form.error")), (m = t.onError) == null || m.call(t, r);
|
|
80
91
|
},
|
|
81
|
-
onSuccess: (
|
|
92
|
+
onSuccess: (r) => {
|
|
82
93
|
var m;
|
|
83
|
-
n.success(o("components.form.success")), (m = t.onSuccess) == null || m.call(t,
|
|
94
|
+
n.success(o("components.form.success")), (m = t.onSuccess) == null || m.call(t, r);
|
|
84
95
|
}
|
|
85
|
-
}),
|
|
96
|
+
}), p = g(() => {
|
|
86
97
|
switch (t.size) {
|
|
87
98
|
case "small":
|
|
88
99
|
return "lg:max-w-lg";
|
|
@@ -93,16 +104,16 @@ const _ = /* @__PURE__ */ d({
|
|
|
93
104
|
return "lg:max-w-2xl";
|
|
94
105
|
}
|
|
95
106
|
});
|
|
96
|
-
return () =>
|
|
107
|
+
return () => i(v, null, {
|
|
97
108
|
default: () => {
|
|
98
|
-
var
|
|
99
|
-
return [
|
|
100
|
-
class: `flex flex-col gap-6 w-full ${
|
|
101
|
-
}, [t.tabs ?
|
|
109
|
+
var r;
|
|
110
|
+
return [i("div", {
|
|
111
|
+
class: `flex flex-col gap-6 w-full ${p.value} mx-auto py-4`
|
|
112
|
+
}, [t.tabs ? i(b, {
|
|
102
113
|
defaultValue: t.defaultTab,
|
|
103
|
-
value:
|
|
114
|
+
value: a.value,
|
|
104
115
|
onUpdateValue: (m) => {
|
|
105
|
-
|
|
116
|
+
a.value = m;
|
|
106
117
|
},
|
|
107
118
|
type: "segment"
|
|
108
119
|
}, {
|
|
@@ -110,11 +121,11 @@ const _ = /* @__PURE__ */ d({
|
|
|
110
121
|
var m;
|
|
111
122
|
return [(m = e == null ? void 0 : e.default) == null ? void 0 : m.call(e, u)];
|
|
112
123
|
}
|
|
113
|
-
}) : (
|
|
124
|
+
}) : (r = e == null ? void 0 : e.default) == null ? void 0 : r.call(e, u)])];
|
|
114
125
|
}
|
|
115
126
|
});
|
|
116
127
|
}
|
|
117
128
|
});
|
|
118
129
|
export {
|
|
119
|
-
|
|
130
|
+
ct as DuxSettingForm
|
|
120
131
|
};
|
|
@@ -26,33 +26,44 @@ import "@duxweb/dvha-naiveui";
|
|
|
26
26
|
import "../../pages/page404.js";
|
|
27
27
|
import "@iconify-json/tabler/icons.json";
|
|
28
28
|
import "mime";
|
|
29
|
+
import "vue3-ace-editor";
|
|
30
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
31
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
32
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
33
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
34
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
35
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
36
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
37
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
38
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
39
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
29
40
|
import { useModal as c } from "../../hooks/modal.js";
|
|
30
41
|
import "dayjs";
|
|
31
42
|
import "@tanstack/vue-query";
|
|
32
43
|
import "pinia";
|
|
33
|
-
const
|
|
44
|
+
const to = /* @__PURE__ */ n({
|
|
34
45
|
name: "DuxIconPicker",
|
|
35
46
|
props: {
|
|
36
47
|
defaultValue: String,
|
|
37
48
|
value: String
|
|
38
49
|
},
|
|
39
|
-
setup(
|
|
50
|
+
setup(r, {
|
|
40
51
|
emit: m
|
|
41
52
|
}) {
|
|
42
|
-
const o = a(
|
|
43
|
-
defaultValue:
|
|
53
|
+
const o = a(r, "value", m, {
|
|
54
|
+
defaultValue: r.defaultValue,
|
|
44
55
|
passive: !0
|
|
45
56
|
}), p = c(), {
|
|
46
|
-
t:
|
|
57
|
+
t: e
|
|
47
58
|
} = l();
|
|
48
59
|
return () => t(u, {
|
|
49
60
|
dashed: !o.value,
|
|
50
61
|
onClick: () => {
|
|
51
62
|
p.show({
|
|
52
|
-
title:
|
|
63
|
+
title: e("components.iconPicker.title"),
|
|
53
64
|
component: () => import("./iconPicker.js")
|
|
54
|
-
}).then((
|
|
55
|
-
o.value =
|
|
65
|
+
}).then((i) => {
|
|
66
|
+
o.value = i;
|
|
56
67
|
});
|
|
57
68
|
},
|
|
58
69
|
iconPlacement: "right"
|
|
@@ -61,11 +72,11 @@ const O = /* @__PURE__ */ n({
|
|
|
61
72
|
class: "flex gap-2 items-center"
|
|
62
73
|
}, [o.value ? t("div", {
|
|
63
74
|
class: `size-4 ${o.value || ""}`
|
|
64
|
-
}, null) : void 0,
|
|
75
|
+
}, null) : void 0, e("components.iconPicker.title")]),
|
|
65
76
|
icon: () => o.value ? t("div", {
|
|
66
77
|
class: "rounded-full p-1 hover:bg-gray-2 hover:text-gray-7",
|
|
67
|
-
onClick: (
|
|
68
|
-
|
|
78
|
+
onClick: (i) => {
|
|
79
|
+
i.stopPropagation(), o.value = void 0;
|
|
69
80
|
}
|
|
70
81
|
}, [t("div", {
|
|
71
82
|
class: "size-4 i-tabler:x"
|
|
@@ -74,5 +85,5 @@ const O = /* @__PURE__ */ n({
|
|
|
74
85
|
}
|
|
75
86
|
});
|
|
76
87
|
export {
|
|
77
|
-
|
|
88
|
+
to as DuxIconPicker
|
|
78
89
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as n, createVNode as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as n, inject as r, createVNode as l } from "vue";
|
|
2
|
+
const c = /* @__PURE__ */ n({
|
|
3
3
|
name: "DuxTableFilter",
|
|
4
4
|
props: {
|
|
5
5
|
label: {
|
|
@@ -7,21 +7,25 @@ const i = /* @__PURE__ */ n({
|
|
|
7
7
|
default: ""
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
10
|
+
setup(a, {
|
|
11
11
|
slots: e
|
|
12
12
|
}) {
|
|
13
|
+
const t = r("dux.filter", {
|
|
14
|
+
showLabel: !1,
|
|
15
|
+
labelPlacement: "left"
|
|
16
|
+
});
|
|
13
17
|
return () => {
|
|
14
|
-
var
|
|
15
|
-
return
|
|
16
|
-
class: "flex gap-2 gap-2 flex-nowrap items-center"
|
|
17
|
-
}, [
|
|
18
|
+
var f;
|
|
19
|
+
return l("div", {
|
|
20
|
+
class: ["flex gap-2 gap-2 flex-nowrap", t.labelPlacement === "left" ? "flex-row items-center" : "flex-col"]
|
|
21
|
+
}, [t.showLabel && a.label && l("div", {
|
|
18
22
|
class: "text-sm text-default whitespace-nowrap"
|
|
19
|
-
}, [
|
|
20
|
-
class: "flex-1
|
|
21
|
-
}, [(
|
|
23
|
+
}, [a.label]), l("div", {
|
|
24
|
+
class: "flex-1 min-w-60"
|
|
25
|
+
}, [(f = e.default) == null ? void 0 : f.call(e)])]);
|
|
22
26
|
};
|
|
23
27
|
}
|
|
24
28
|
});
|
|
25
29
|
export {
|
|
26
|
-
|
|
30
|
+
c as DuxTableFilter
|
|
27
31
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as t, provide as o, createVNode as f } from "vue";
|
|
2
|
+
const r = /* @__PURE__ */ t({
|
|
3
|
+
name: "DuxFilterLayout",
|
|
4
|
+
props: {
|
|
5
|
+
showLabel: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !1
|
|
8
|
+
},
|
|
9
|
+
labelPlacement: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "left"
|
|
12
|
+
},
|
|
13
|
+
horizontal: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(e, {
|
|
19
|
+
slots: l
|
|
20
|
+
}) {
|
|
21
|
+
return o("dux.filter", {
|
|
22
|
+
showLabel: e.showLabel,
|
|
23
|
+
labelPlacement: e.labelPlacement
|
|
24
|
+
}), () => {
|
|
25
|
+
var a;
|
|
26
|
+
return f("div", {
|
|
27
|
+
class: ["flex flex-col gap-2", e.horizontal ? "flex-row" : "flex-col"]
|
|
28
|
+
}, [(a = l.default) == null ? void 0 : a.call(l)]);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
r as DuxFilterLayout
|
|
34
|
+
};
|