@duxweb/dvha-pro 0.0.6 → 0.0.7
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 -0
- package/dist/cjs/components/dialog/dialog.cjs +1 -1
- package/dist/cjs/components/drawer/drawer.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/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/list/card.cjs +1 -1
- package/dist/cjs/components/list/list.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/modal/modalTab.cjs +1 -1
- package/dist/cjs/components/select/cardSelect.cjs +1 -0
- package/dist/cjs/components/table/tablePage.cjs +1 -1
- package/dist/cjs/config/echart.cjs +1 -0
- 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/echart.cjs +1 -0
- package/dist/cjs/hooks/modal.cjs +1 -1
- package/dist/cjs/hooks/table/media.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/main.cjs +1 -1
- package/dist/cjs/pages/authLayout.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/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 +28 -7
- package/dist/esm/component.js +43 -41
- package/dist/esm/components/card/card.js +1 -1
- package/dist/esm/components/chart/echart.js +75 -0
- package/dist/esm/components/dialog/dialog.js +87 -93
- package/dist/esm/components/drawer/drawer.js +34 -32
- package/dist/esm/components/form/modalForm.js +1 -1
- package/dist/esm/components/form/pageForm.js +23 -19
- package/dist/esm/components/form/settingForm.js +22 -18
- package/dist/esm/components/layout/list.js +203 -142
- package/dist/esm/components/layout/table.js +210 -145
- package/dist/esm/components/list/card.js +42 -32
- package/dist/esm/components/list/list.js +27 -16
- package/dist/esm/components/modal/modal.js +46 -86
- package/dist/esm/components/modal/modalPage.js +23 -18
- package/dist/esm/components/modal/modalTab.js +11 -11
- package/dist/esm/components/select/cardSelect.js +103 -0
- package/dist/esm/components/table/tablePage.js +21 -18
- package/dist/esm/config/echart.js +456 -0
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +46 -45
- package/dist/esm/hooks/dialog.js +24 -7
- package/dist/esm/hooks/drawer.js +12 -8
- package/dist/esm/hooks/echart.js +469 -0
- package/dist/esm/hooks/modal.js +25 -9
- package/dist/esm/hooks/table/media.js +18 -14
- package/dist/esm/index.js +158 -135
- package/dist/esm/main.js +11 -8
- package/dist/esm/pages/authLayout.js +3 -2
- package/dist/esm/pages/layout/global.js +46 -33
- package/dist/esm/pages/layout/page.js +13 -9
- package/dist/esm/pages/login.js +25 -21
- package/dist/esm/pages/menu/avatar.js +14 -14
- package/dist/esm/pages/menu/button.js +14 -10
- package/dist/esm/pages/menu/cmd.js +26 -22
- package/dist/esm/pages/menu/main.js +26 -22
- package/dist/esm/pages/menu/mobile.js +11 -7
- package/dist/esm/pages/page.js +16 -16
- package/dist/esm/pages/page404.js +24 -20
- package/dist/esm/pages/pageStatus.js +12 -8
- package/dist/esm/theme/naiveTheme.js +57 -51
- package/dist/esm/theme/uno.css.js +28 -7
- package/dist/types/components/chart/echart.d.ts +284 -0
- package/dist/types/components/chart/index.d.ts +1 -0
- package/dist/types/components/dialog/dialog.d.ts +1 -20
- package/dist/types/components/drawer/drawer.d.ts +14 -4
- package/dist/types/components/form/formLayout.d.ts +1 -1
- package/dist/types/components/form/modalForm.d.ts +1 -1
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/components/layout/list.d.ts +18 -0
- package/dist/types/components/layout/table.d.ts +22 -1
- package/dist/types/components/list/card.d.ts +38 -0
- package/dist/types/components/list/list.d.ts +43 -2
- package/dist/types/components/modal/modal.d.ts +13 -31
- package/dist/types/components/modal/modalPage.d.ts +3 -6
- package/dist/types/components/panel/alert.d.ts +1 -1
- package/dist/types/components/select/cardSelect.d.ts +88 -0
- package/dist/types/components/select/index.d.ts +1 -0
- package/dist/types/components/table/tablePage.d.ts +28 -2
- package/dist/types/config/echart.d.ts +4 -0
- package/dist/types/config/index.d.ts +1 -0
- package/dist/types/hooks/drawer.d.ts +3 -2
- package/dist/types/hooks/echart.d.ts +166 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/modal.d.ts +10 -5
- package/dist/types/hooks/table/types.d.ts +1 -0
- package/dist/types/main.d.ts +1 -0
- package/dist/types/pages/layout/global.d.ts +1 -0
- package/dist/types/pages/menu/avatar.d.ts +3 -3
- package/dist/types/pages/menu/button.d.ts +3 -3
- package/dist/types/pages/menu/main.d.ts +3 -3
- package/dist/types/pages/page.d.ts +1 -1
- package/package.json +8 -3
- package/dist/cjs/node_modules/.pnpm/@vueuse_integrations@13.3.0_async-validator@4.2.5_axios@1.10.0_focus-trap@7.6.5_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/integrations/useFocusTrap.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/shared/index.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/focus-trap@7.6.5/node_modules/focus-trap/dist/focus-trap.esm.cjs +0 -5
- package/dist/cjs/node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.cjs +0 -4
- package/dist/esm/node_modules/.pnpm/@vueuse_integrations@13.3.0_async-validator@4.2.5_axios@1.10.0_focus-trap@7.6.5_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/integrations/useFocusTrap.js +0 -43
- package/dist/esm/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/shared/index.js +0 -6
- package/dist/esm/node_modules/.pnpm/focus-trap@7.6.5/node_modules/focus-trap/dist/focus-trap.esm.js +0 -473
- package/dist/esm/node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js +0 -202
package/dist/esm/hooks/action.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { useI18n as
|
|
1
|
+
import { useI18n as x, useManage as S, useCustomMutation as D, useDelete as C } from "@duxweb/dvha-core";
|
|
2
2
|
import { useMessage as I, NButton as j, NDropdown as N } from "naive-ui";
|
|
3
|
-
import { h as
|
|
3
|
+
import { h as r } from "vue";
|
|
4
4
|
import { useRouter as $ } from "vue-router";
|
|
5
5
|
import { useDialog as B } from "./dialog.js";
|
|
6
6
|
import { useDrawer as E } from "./drawer.js";
|
|
7
7
|
import { useModal as T } from "./modal.js";
|
|
8
8
|
function U(n) {
|
|
9
|
-
const y = T(), d = E(),
|
|
9
|
+
const y = T(), d = E(), s = B(), {
|
|
10
10
|
t: c
|
|
11
|
-
} =
|
|
11
|
+
} = x(), l = I(), a = S(), u = $(), v = D({
|
|
12
12
|
onSuccess: (e) => {
|
|
13
13
|
l.success(e.message || "操作成功");
|
|
14
14
|
},
|
|
@@ -22,25 +22,26 @@ function U(n) {
|
|
|
22
22
|
onError: (e) => {
|
|
23
23
|
l.error(e.message || "操作失败");
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
26
|
-
var
|
|
27
|
-
const i = c(e.item.title || "", {}, e.item.title),
|
|
25
|
+
}), h = (n == null ? void 0 : n.path) || a.getPath(), b = (e) => {
|
|
26
|
+
var m, P;
|
|
27
|
+
const i = c(e.item.title || "", {}, e.item.title), f = c(e.item.label || "", {}, e.item.label);
|
|
28
28
|
if (e.item.type === "modal") {
|
|
29
29
|
const t = e.item;
|
|
30
30
|
y.show({
|
|
31
|
-
title: i ||
|
|
31
|
+
title: i || f,
|
|
32
32
|
component: t.component,
|
|
33
33
|
componentProps: {
|
|
34
34
|
id: e.id,
|
|
35
35
|
...t.componentProps
|
|
36
36
|
},
|
|
37
|
-
width: t.width
|
|
37
|
+
width: t.width,
|
|
38
|
+
draggable: t.draggable !== void 0 ? t.draggable : !0
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
if (e.item.type === "drawer") {
|
|
41
42
|
const t = e.item;
|
|
42
43
|
d.show({
|
|
43
|
-
title: i ||
|
|
44
|
+
title: i || f,
|
|
44
45
|
component: t.component,
|
|
45
46
|
componentProps: {
|
|
46
47
|
id: e.id,
|
|
@@ -51,43 +52,43 @@ function U(n) {
|
|
|
51
52
|
}
|
|
52
53
|
if (e.item.type === "confirm") {
|
|
53
54
|
const t = e.item;
|
|
54
|
-
|
|
55
|
-
title: i ||
|
|
55
|
+
s.confirm({
|
|
56
|
+
title: i || f,
|
|
56
57
|
content: t.content
|
|
57
|
-
}).then((
|
|
58
|
+
}).then((g) => {
|
|
58
59
|
var o;
|
|
59
|
-
|
|
60
|
+
g && ((o = t.callback) == null || o.call(t, e.id, e.data));
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
63
|
if (e.item.type === "request") {
|
|
63
64
|
const t = e.item;
|
|
64
|
-
|
|
65
|
-
title: i ||
|
|
65
|
+
s.confirm({
|
|
66
|
+
title: i || f,
|
|
66
67
|
content: t.content
|
|
67
68
|
}).then(() => {
|
|
68
|
-
const
|
|
69
|
+
const g = typeof t.data == "function" ? t.data(e.id, e.data) : t.data, o = (t.method || "post").toLowerCase(), M = t.path || h;
|
|
69
70
|
v.mutate({
|
|
70
71
|
path: M,
|
|
71
72
|
method: o,
|
|
72
|
-
payload:
|
|
73
|
+
payload: g
|
|
73
74
|
});
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
77
|
if (e.item.type === "delete") {
|
|
77
78
|
const t = e.item;
|
|
78
|
-
|
|
79
|
-
title: i ||
|
|
79
|
+
s.confirm({
|
|
80
|
+
title: i || f,
|
|
80
81
|
content: t.content
|
|
81
82
|
}).then(() => {
|
|
82
83
|
A.mutate({
|
|
83
84
|
id: e.id,
|
|
84
|
-
path: t.path ||
|
|
85
|
+
path: t.path || h
|
|
85
86
|
});
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
if (e.item.type === "link") {
|
|
89
|
-
const t = e.item,
|
|
90
|
-
u.push(
|
|
90
|
+
const t = e.item, g = typeof t.path == "function" ? (m = t.path) == null ? void 0 : m.call(t, e.id, e.data) : a.getRoutePath(e.id ? `${t.path || h}${e.data === void 0 ? "" : `/${e.id}`}` : t.path || h);
|
|
91
|
+
u.push(g);
|
|
91
92
|
}
|
|
92
93
|
if (e.item.type === "callback") {
|
|
93
94
|
const t = e.item;
|
|
@@ -95,27 +96,27 @@ function U(n) {
|
|
|
95
96
|
}
|
|
96
97
|
}, w = q(), k = L();
|
|
97
98
|
return {
|
|
98
|
-
target:
|
|
99
|
-
renderTable: (e) => (i,
|
|
100
|
-
const
|
|
99
|
+
target: b,
|
|
100
|
+
renderTable: (e) => (i, f) => {
|
|
101
|
+
const m = {
|
|
101
102
|
id: i[e.key || (n == null ? void 0 : n.key) || "id"],
|
|
102
103
|
data: i,
|
|
103
|
-
index:
|
|
104
|
-
target:
|
|
104
|
+
index: f,
|
|
105
|
+
target: b,
|
|
105
106
|
text: e.text !== void 0 ? e.text : (n == null ? void 0 : n.text) || !1,
|
|
106
107
|
align: e.align !== void 0 ? e.align : (n == null ? void 0 : n.align) || "left"
|
|
107
108
|
};
|
|
108
109
|
return (e.type || (n == null ? void 0 : n.type)) === "button" ? w.render({
|
|
109
|
-
...
|
|
110
|
+
...m,
|
|
110
111
|
action: e || n
|
|
111
112
|
}) : k.render({
|
|
112
|
-
...
|
|
113
|
+
...m,
|
|
113
114
|
action: e || n
|
|
114
115
|
});
|
|
115
116
|
},
|
|
116
117
|
renderAction: (e) => {
|
|
117
118
|
const i = {
|
|
118
|
-
target:
|
|
119
|
+
target: b,
|
|
119
120
|
text: e.text !== void 0 ? e.text : (n == null ? void 0 : n.text) || !1,
|
|
120
121
|
align: e.align !== void 0 ? e.align : (n == null ? void 0 : n.align) || "left"
|
|
121
122
|
};
|
|
@@ -132,14 +133,14 @@ function U(n) {
|
|
|
132
133
|
function q() {
|
|
133
134
|
const {
|
|
134
135
|
t: n
|
|
135
|
-
} =
|
|
136
|
+
} = x();
|
|
136
137
|
return {
|
|
137
138
|
render: (d) => {
|
|
138
139
|
var c;
|
|
139
|
-
const
|
|
140
|
+
const s = (c = d.action.items) == null ? void 0 : c.filter((l) => {
|
|
140
141
|
var a;
|
|
141
142
|
return !l.show || ((a = l.show) == null ? void 0 : a.call(l, d.data, d.index));
|
|
142
|
-
}).map((l, a) =>
|
|
143
|
+
}).map((l, a) => r(j, {
|
|
143
144
|
key: a,
|
|
144
145
|
type: l.color || l.type === "delete" ? "error" : "primary",
|
|
145
146
|
text: d.text,
|
|
@@ -151,30 +152,30 @@ function q() {
|
|
|
151
152
|
item: l
|
|
152
153
|
});
|
|
153
154
|
},
|
|
154
|
-
renderIcon: l.icon ? () =>
|
|
155
|
+
renderIcon: l.icon ? () => r("div", {
|
|
155
156
|
class: ["n-icon", l.icon]
|
|
156
157
|
}) : void 0
|
|
157
158
|
}, () => n(l.label || "", {}, l.label)));
|
|
158
|
-
return
|
|
159
|
+
return r("div", {
|
|
159
160
|
class: ["flex gap-2 flex-wrap items-center", d.align === "right" ? "justify-end" : d.align === "center" ? "justify-center" : "justify-start"]
|
|
160
|
-
},
|
|
161
|
+
}, s);
|
|
161
162
|
}
|
|
162
163
|
};
|
|
163
164
|
}
|
|
164
165
|
function L() {
|
|
165
166
|
const {
|
|
166
167
|
t: n
|
|
167
|
-
} =
|
|
168
|
+
} = x();
|
|
168
169
|
return {
|
|
169
170
|
render: (d) => {
|
|
170
171
|
var c;
|
|
171
|
-
const
|
|
172
|
+
const s = (c = d.action.items) == null ? void 0 : c.filter((l) => {
|
|
172
173
|
var a;
|
|
173
174
|
return !l.show || ((a = l.show) == null ? void 0 : a.call(l, d.data, d.index));
|
|
174
175
|
}).map((l, a) => ({
|
|
175
176
|
label: n(l.label || "", {}, l.label),
|
|
176
177
|
key: a,
|
|
177
|
-
icon: l.icon ? () =>
|
|
178
|
+
icon: l.icon ? () => r("div", {
|
|
178
179
|
class: ["n-icon", l.icon]
|
|
179
180
|
}) : void 0,
|
|
180
181
|
onSelect: () => {
|
|
@@ -186,20 +187,20 @@ function L() {
|
|
|
186
187
|
});
|
|
187
188
|
}
|
|
188
189
|
}));
|
|
189
|
-
return
|
|
190
|
+
return r(N, {
|
|
190
191
|
trigger: "click",
|
|
191
|
-
options:
|
|
192
|
+
options: s,
|
|
192
193
|
onSelect: (l, a) => {
|
|
193
194
|
var u;
|
|
194
195
|
(u = a == null ? void 0 : a.onSelect) == null || u.call(a);
|
|
195
196
|
}
|
|
196
|
-
}, () => [
|
|
197
|
+
}, () => [r("div", {
|
|
197
198
|
class: ["flex items-center", d.align === "right" ? "justify-end" : d.align === "center" ? "justify-center" : "justify-start"]
|
|
198
|
-
},
|
|
199
|
+
}, r(j, {
|
|
199
200
|
type: "default",
|
|
200
201
|
text: d.text,
|
|
201
202
|
secondary: !d.text,
|
|
202
|
-
renderIcon: () =>
|
|
203
|
+
renderIcon: () => r("div", {
|
|
203
204
|
class: ["n-icon", "i-tabler:dots-vertical"]
|
|
204
205
|
})
|
|
205
206
|
}))]);
|
package/dist/esm/hooks/dialog.js
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { useOverlayInject as p } from "@overlastic/vue";
|
|
2
|
+
import "vue";
|
|
3
|
+
import "naive-ui";
|
|
4
|
+
import "vue-echarts";
|
|
5
|
+
import "@duxweb/dvha-core";
|
|
6
|
+
import "vue-router";
|
|
7
|
+
import "lodash-es";
|
|
8
|
+
import "@duxweb/dvha-naiveui";
|
|
9
|
+
import "@vueuse/core";
|
|
10
|
+
import "pinia";
|
|
11
|
+
import "clsx";
|
|
12
|
+
import "jinrishici";
|
|
13
|
+
import m from "../components/dialog/dialog.js";
|
|
14
|
+
import "vee-validate";
|
|
15
|
+
import "@vee-validate/i18n";
|
|
16
|
+
import "colorizr";
|
|
17
|
+
import "echarts";
|
|
18
|
+
import "@ant-design/colors";
|
|
19
|
+
import "@unocss/preset-typography";
|
|
20
|
+
import "vue-command-palette";
|
|
21
|
+
import "../pages/page404.js";
|
|
22
|
+
function C() {
|
|
23
|
+
const t = p(m), o = (r) => t(r);
|
|
7
24
|
return {
|
|
8
25
|
confirm: (r) => o({
|
|
9
26
|
...r,
|
|
@@ -28,5 +45,5 @@ function i() {
|
|
|
28
45
|
};
|
|
29
46
|
}
|
|
30
47
|
export {
|
|
31
|
-
|
|
48
|
+
C as useDialog
|
|
32
49
|
};
|
package/dist/esm/hooks/drawer.js
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import { useOverlayInject as t } from "@overlastic/vue";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "naive-ui";
|
|
4
|
-
import "
|
|
5
|
-
import "jinrishici";
|
|
6
|
-
import "lodash-es";
|
|
7
|
-
import m from "../components/drawer/drawer.js";
|
|
8
|
-
import "@vueuse/core";
|
|
9
|
-
import "vee-validate";
|
|
4
|
+
import "vue-echarts";
|
|
10
5
|
import "@duxweb/dvha-core";
|
|
11
6
|
import "vue-router";
|
|
7
|
+
import "lodash-es";
|
|
12
8
|
import "@duxweb/dvha-naiveui";
|
|
9
|
+
import "@vueuse/core";
|
|
13
10
|
import "pinia";
|
|
11
|
+
import "clsx";
|
|
12
|
+
import "jinrishici";
|
|
13
|
+
import m from "../components/drawer/drawer.js";
|
|
14
|
+
import "vee-validate";
|
|
14
15
|
import "@vee-validate/i18n";
|
|
15
16
|
import "colorizr";
|
|
17
|
+
import "echarts";
|
|
18
|
+
import "@ant-design/colors";
|
|
19
|
+
import "@unocss/preset-typography";
|
|
16
20
|
import "vue-command-palette";
|
|
17
21
|
import "../pages/page404.js";
|
|
18
|
-
function
|
|
22
|
+
function k() {
|
|
19
23
|
const r = t(m);
|
|
20
24
|
return {
|
|
21
25
|
show: (o) => r(o)
|
|
22
26
|
};
|
|
23
27
|
}
|
|
24
28
|
export {
|
|
25
|
-
|
|
29
|
+
k as useDrawer
|
|
26
30
|
};
|