@duxweb/dvha-pro 1.0.17 → 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 -0
- package/dist/cjs/components/icon/iconPicker.cjs +1 -0
- 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 -0
- 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 +27 -7
- package/dist/esm/component.js +52 -47
- package/dist/esm/components/card/card.js +6 -6
- package/dist/esm/components/chart/echart.js +18 -6
- package/dist/esm/components/code/code.js +53 -0
- package/dist/esm/components/crop/imageCrop.js +38 -26
- package/dist/esm/components/data/dynamicSelect.js +31 -19
- package/dist/esm/components/data/selectModal.js +50 -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 +13 -13
- package/dist/esm/components/form/formLayout.js +8 -8
- package/dist/esm/components/form/modalForm.js +46 -36
- package/dist/esm/components/form/pageForm.js +82 -43
- package/dist/esm/components/form/settingForm.js +39 -27
- package/dist/esm/components/icon/icon.js +89 -0
- package/dist/esm/components/icon/iconPicker.js +83 -0
- 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 +207 -160
- package/dist/esm/components/layout/table.js +213 -185
- package/dist/esm/components/level/level.js +29 -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 +212 -0
- package/dist/esm/components/upload/config.js +32 -0
- package/dist/esm/components/upload/file.js +143 -116
- package/dist/esm/components/upload/image.js +96 -66
- package/dist/esm/components/upload/manage/item.js +18 -6
- package/dist/esm/components/upload/manager.js +203 -164
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +77 -75
- package/dist/esm/hooks/dialog.js +14 -2
- package/dist/esm/hooks/drawer.js +14 -2
- package/dist/esm/hooks/modal.js +14 -2
- package/dist/esm/hooks/table/image.js +22 -10
- package/dist/esm/hooks/table/media.js +22 -10
- package/dist/esm/hooks/table.js +16 -13
- package/dist/esm/index.js +200 -184
- 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 +23 -11
- package/dist/esm/pages/layout/page.js +29 -17
- package/dist/esm/pages/login.js +41 -29
- package/dist/esm/pages/menu/avatar.js +46 -34
- package/dist/esm/pages/menu/button.js +26 -14
- package/dist/esm/pages/menu/cmd.js +46 -34
- package/dist/esm/pages/menu/main.js +41 -27
- package/dist/esm/pages/menu/mobile.js +14 -2
- package/dist/esm/pages/page.js +1 -1
- package/dist/esm/pages/page404.js +21 -9
- package/dist/esm/pages/pageStatus.js +33 -16
- package/dist/esm/theme/naiveTheme.js +6 -6
- package/dist/esm/theme/uno.css.js +27 -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/icon/icon.d.ts +7 -0
- package/dist/types/components/icon/iconPicker.d.ts +9 -0
- package/dist/types/components/icon/index.d.ts +2 -0
- package/dist/types/components/index.d.ts +3 -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/index.d.ts +1 -0
- package/dist/types/components/tree/treeFilter.d.ts +24 -0
- 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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as d, createVNode as
|
|
1
|
+
import { defineComponent as d, createVNode as p } from "vue";
|
|
2
2
|
import { useI18n as f, useManage as g, useUpload as v } from "@duxweb/dvha-core";
|
|
3
3
|
import { useVModel as h } from "@vueuse/core";
|
|
4
4
|
import { useMessage as x } from "naive-ui";
|
|
@@ -25,12 +25,24 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
25
25
|
import "vue-command-palette";
|
|
26
26
|
import "@duxweb/dvha-naiveui";
|
|
27
27
|
import "../../pages/page404.js";
|
|
28
|
+
import "@iconify-json/tabler/icons.json";
|
|
28
29
|
import "mime";
|
|
30
|
+
import "vue3-ace-editor";
|
|
31
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
32
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
33
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
34
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
35
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
36
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
37
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
38
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
39
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
40
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
29
41
|
import { useModal as C } from "../../hooks/modal.js";
|
|
30
42
|
import "dayjs";
|
|
31
43
|
import "@tanstack/vue-query";
|
|
32
44
|
import "pinia";
|
|
33
|
-
const
|
|
45
|
+
const so = /* @__PURE__ */ d({
|
|
34
46
|
name: "DuxImageCrop",
|
|
35
47
|
props: {
|
|
36
48
|
defaultValue: {
|
|
@@ -50,56 +62,56 @@ const $ = /* @__PURE__ */ d({
|
|
|
50
62
|
default: !0
|
|
51
63
|
}
|
|
52
64
|
},
|
|
53
|
-
setup(
|
|
65
|
+
setup(e, {
|
|
54
66
|
emit: l
|
|
55
67
|
}) {
|
|
56
68
|
var u;
|
|
57
69
|
const {
|
|
58
|
-
t:
|
|
59
|
-
} = f(), i = h(
|
|
70
|
+
t: m
|
|
71
|
+
} = f(), i = h(e, "value", l, {
|
|
60
72
|
passive: !0,
|
|
61
|
-
defaultValue:
|
|
73
|
+
defaultValue: e.defaultValue || ""
|
|
62
74
|
}), {
|
|
63
75
|
config: n
|
|
64
|
-
} = g(), s = C(),
|
|
65
|
-
path:
|
|
76
|
+
} = g(), s = C(), a = x(), c = v({
|
|
77
|
+
path: e.path || ((u = n.apiPath) == null ? void 0 : u.upload) || "upload",
|
|
66
78
|
autoUpload: !0,
|
|
67
|
-
onSuccess: (
|
|
79
|
+
onSuccess: (o) => {
|
|
68
80
|
var r;
|
|
69
|
-
i.value = (r =
|
|
81
|
+
i.value = (r = o.data) == null ? void 0 : r.url, a.success(m("components.upload.success"));
|
|
70
82
|
},
|
|
71
|
-
onError: (
|
|
72
|
-
|
|
83
|
+
onError: (o) => {
|
|
84
|
+
a.error(o.message || m("components.upload.failed"));
|
|
73
85
|
}
|
|
74
86
|
});
|
|
75
|
-
return () =>
|
|
76
|
-
class: ["relative size-80px overflow-hidden group",
|
|
87
|
+
return () => p("div", {
|
|
88
|
+
class: ["relative size-80px overflow-hidden group", e.circle && "rounded-full"],
|
|
77
89
|
onClick: () => {
|
|
78
|
-
var
|
|
79
|
-
(r = (
|
|
80
|
-
component: () => import("./imageCropModal.js").then((
|
|
90
|
+
var o, r;
|
|
91
|
+
(r = (o = s.show({
|
|
92
|
+
component: () => import("./imageCropModal.js").then((t) => t.DuxImageCropModal),
|
|
81
93
|
componentProps: {
|
|
82
94
|
value: i.value,
|
|
83
|
-
onConfirm: (
|
|
84
|
-
i.value =
|
|
95
|
+
onConfirm: (t) => {
|
|
96
|
+
i.value = t;
|
|
85
97
|
}
|
|
86
98
|
}
|
|
87
|
-
})) == null ? void 0 :
|
|
88
|
-
|
|
99
|
+
})) == null ? void 0 : o.then) == null || r.call(o, (t) => {
|
|
100
|
+
t && (t.name = "image.png", t.mime = "image/png", c.addFiles([t], "blob"));
|
|
89
101
|
}).catch(() => {
|
|
90
102
|
});
|
|
91
103
|
}
|
|
92
|
-
}, [
|
|
104
|
+
}, [p(y, {
|
|
93
105
|
src: i.value,
|
|
94
|
-
circle:
|
|
106
|
+
circle: e.circle,
|
|
95
107
|
size: 80
|
|
96
|
-
}, null),
|
|
108
|
+
}, null), p("div", {
|
|
97
109
|
class: "absolute size-full bg-gray-900/30 items-center justify-center inset-0 cursor-pointer hidden z-1 group-hover:flex"
|
|
98
|
-
}, [
|
|
110
|
+
}, [p("div", {
|
|
99
111
|
class: "i-tabler:pencil size-4 text-white/90"
|
|
100
112
|
}, null)])]);
|
|
101
113
|
}
|
|
102
114
|
});
|
|
103
115
|
export {
|
|
104
|
-
|
|
116
|
+
so as DuxImageCrop
|
|
105
117
|
};
|
|
@@ -24,13 +24,25 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
24
24
|
import "vue-command-palette";
|
|
25
25
|
import "@duxweb/dvha-naiveui";
|
|
26
26
|
import "../../pages/page404.js";
|
|
27
|
+
import "@iconify-json/tabler/icons.json";
|
|
27
28
|
import "mime";
|
|
28
29
|
import "vue-draggable-plus";
|
|
30
|
+
import "vue3-ace-editor";
|
|
31
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
32
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
33
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
34
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
35
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
36
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
37
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
38
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
39
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
40
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
29
41
|
import { useModal as C } from "../../hooks/modal.js";
|
|
30
42
|
import "dayjs";
|
|
31
43
|
import "@tanstack/vue-query";
|
|
32
44
|
import "pinia";
|
|
33
|
-
const
|
|
45
|
+
const vt = /* @__PURE__ */ y({
|
|
34
46
|
name: "DuxDynamicSelect",
|
|
35
47
|
props: {
|
|
36
48
|
rowKey: {
|
|
@@ -53,32 +65,32 @@ const et = /* @__PURE__ */ y({
|
|
|
53
65
|
}
|
|
54
66
|
},
|
|
55
67
|
setup(t, {
|
|
56
|
-
emit:
|
|
68
|
+
emit: p
|
|
57
69
|
}) {
|
|
58
|
-
const e = K(t, "value",
|
|
70
|
+
const e = K(t, "value", p, {
|
|
59
71
|
passive: !0,
|
|
60
72
|
defaultValue: t.defaultValue,
|
|
61
73
|
deep: !0
|
|
62
|
-
}),
|
|
74
|
+
}), n = C(), c = D(), {
|
|
63
75
|
t: f
|
|
64
|
-
} = S(),
|
|
65
|
-
return d([e,
|
|
66
|
-
var
|
|
67
|
-
if (!
|
|
76
|
+
} = S(), i = h(!0);
|
|
77
|
+
return d([e, i], () => {
|
|
78
|
+
var r;
|
|
79
|
+
if (!i.value || !e.value || e.value.length === 0)
|
|
68
80
|
return;
|
|
69
|
-
const o = ((
|
|
81
|
+
const o = ((r = e.value) == null ? void 0 : r.map((m) => m[t.rowKey])) || [];
|
|
70
82
|
c.request({
|
|
71
83
|
path: t.path,
|
|
72
84
|
query: {
|
|
73
85
|
ids: (o == null ? void 0 : o.join(",")) || ""
|
|
74
86
|
}
|
|
75
|
-
}).then((
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
e.value.some((v) => v[t.rowKey] ===
|
|
87
|
+
}).then((m) => {
|
|
88
|
+
var l;
|
|
89
|
+
i.value = !1, (l = m == null ? void 0 : m.data) == null || l.forEach((a, u) => {
|
|
90
|
+
e.value.some((v) => v[t.rowKey] === a[t.rowKey]) ? e.value[u] = {
|
|
79
91
|
...e.value[u],
|
|
80
|
-
...
|
|
81
|
-
} : e.value.push(
|
|
92
|
+
...a
|
|
93
|
+
} : e.value.push(a);
|
|
82
94
|
});
|
|
83
95
|
});
|
|
84
96
|
}), () => s(A, {
|
|
@@ -86,7 +98,7 @@ const et = /* @__PURE__ */ y({
|
|
|
86
98
|
"onUpdate:value": (o) => e.value = o,
|
|
87
99
|
columns: t.columns,
|
|
88
100
|
onCreate: () => {
|
|
89
|
-
|
|
101
|
+
n.show({
|
|
90
102
|
component: () => import("./selectModal.js"),
|
|
91
103
|
componentProps: {
|
|
92
104
|
path: t.path,
|
|
@@ -96,8 +108,8 @@ const et = /* @__PURE__ */ y({
|
|
|
96
108
|
width: 1e3,
|
|
97
109
|
title: f("buttons.select")
|
|
98
110
|
}).then((o) => {
|
|
99
|
-
|
|
100
|
-
e.value.some((
|
|
111
|
+
i.value = !1, o == null || o.forEach((r) => {
|
|
112
|
+
e.value.some((m) => m[t.rowKey] === r[t.rowKey]) || e.value.push(r);
|
|
101
113
|
});
|
|
102
114
|
});
|
|
103
115
|
}
|
|
@@ -105,5 +117,5 @@ const et = /* @__PURE__ */ y({
|
|
|
105
117
|
}
|
|
106
118
|
});
|
|
107
119
|
export {
|
|
108
|
-
|
|
120
|
+
vt as DuxDynamicSelect
|
|
109
121
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as h, computed as C, ref as
|
|
1
|
+
import { defineComponent as h, computed as C, ref as m, watch as b, createVNode as i, Fragment as x, h as w, mergeProps as z, isVNode as P } from "vue";
|
|
2
2
|
import { useI18n as j, useJsonSchema as k } from "@duxweb/dvha-core";
|
|
3
|
-
import { NButton as
|
|
3
|
+
import { NButton as p, NDataTable as K } from "naive-ui";
|
|
4
4
|
import "vue-router";
|
|
5
5
|
import "@overlastic/vue";
|
|
6
6
|
import "clsx";
|
|
@@ -25,15 +25,27 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
25
25
|
import "vue-command-palette";
|
|
26
26
|
import "@duxweb/dvha-naiveui";
|
|
27
27
|
import "../../pages/page404.js";
|
|
28
|
+
import "@iconify-json/tabler/icons.json";
|
|
28
29
|
import "mime";
|
|
30
|
+
import "vue3-ace-editor";
|
|
31
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
32
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
33
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
34
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
35
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
36
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
37
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
38
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
39
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
40
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
29
41
|
import "dayjs";
|
|
30
42
|
import "@tanstack/vue-query";
|
|
31
43
|
import { useTable as D } from "../../hooks/table.js";
|
|
32
44
|
import "pinia";
|
|
33
|
-
function
|
|
34
|
-
return typeof
|
|
45
|
+
function u(t) {
|
|
46
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !P(t);
|
|
35
47
|
}
|
|
36
|
-
const
|
|
48
|
+
const bt = /* @__PURE__ */ h({
|
|
37
49
|
name: "Select",
|
|
38
50
|
props: {
|
|
39
51
|
path: String,
|
|
@@ -48,13 +60,13 @@ const ce = /* @__PURE__ */ h({
|
|
|
48
60
|
onConfirm: Function,
|
|
49
61
|
onClose: Function
|
|
50
62
|
},
|
|
51
|
-
setup(
|
|
63
|
+
setup(t) {
|
|
52
64
|
const {
|
|
53
|
-
t:
|
|
65
|
+
t: n
|
|
54
66
|
} = j(), f = C(() => [{
|
|
55
67
|
type: "selection",
|
|
56
68
|
fixed: "left"
|
|
57
|
-
}, ...
|
|
69
|
+
}, ...t.columns || []]), l = m({}), a = m({
|
|
58
70
|
page: 1,
|
|
59
71
|
pageSize: 10
|
|
60
72
|
}), {
|
|
@@ -64,72 +76,72 @@ const ce = /* @__PURE__ */ h({
|
|
|
64
76
|
pageSizes: S,
|
|
65
77
|
checkeds: v
|
|
66
78
|
} = D({
|
|
67
|
-
path:
|
|
79
|
+
path: t.path || "",
|
|
68
80
|
columns: f.value || [],
|
|
69
|
-
filters:
|
|
70
|
-
pagination:
|
|
71
|
-
}), c =
|
|
72
|
-
b(v, (
|
|
73
|
-
var
|
|
74
|
-
c.value = (
|
|
81
|
+
filters: l,
|
|
82
|
+
pagination: a.value
|
|
83
|
+
}), c = m([]);
|
|
84
|
+
b(v, (e) => {
|
|
85
|
+
var r;
|
|
86
|
+
c.value = (r = g.value) == null ? void 0 : r.filter((o) => e.includes(o[t.rowKey]));
|
|
75
87
|
});
|
|
76
88
|
const y = k({
|
|
77
|
-
data:
|
|
89
|
+
data: t.filterSchema || [],
|
|
78
90
|
context: {
|
|
79
|
-
filter:
|
|
91
|
+
filter: l
|
|
80
92
|
}
|
|
81
93
|
});
|
|
82
94
|
return () => i(N, {
|
|
83
|
-
title:
|
|
95
|
+
title: n("components.data.selectTitle"),
|
|
84
96
|
onClose: () => {
|
|
85
|
-
var
|
|
86
|
-
(
|
|
97
|
+
var e;
|
|
98
|
+
(e = t.onClose) == null || e.call(t);
|
|
87
99
|
}
|
|
88
100
|
}, {
|
|
89
101
|
default: () => i("div", {
|
|
90
102
|
class: "flex flex-col gap-4"
|
|
91
|
-
}, [
|
|
103
|
+
}, [t.filterSchema && i("div", {
|
|
92
104
|
class: "grid grid-cols-1 md:grid-cols-4 gap-2"
|
|
93
105
|
}, [w(y.render)]), i(K, z({
|
|
94
106
|
bordered: !1,
|
|
95
107
|
maxHeight: 400,
|
|
96
|
-
rowKey: (
|
|
108
|
+
rowKey: (e) => e[t.rowKey]
|
|
97
109
|
}, d.value, {
|
|
98
110
|
pagination: {
|
|
99
|
-
page:
|
|
100
|
-
pageSize:
|
|
111
|
+
page: a.value.page,
|
|
112
|
+
pageSize: a.value.pageSize,
|
|
101
113
|
pageCount: s.value,
|
|
102
114
|
pageSizes: S,
|
|
103
|
-
onUpdatePage: (
|
|
104
|
-
|
|
115
|
+
onUpdatePage: (e) => {
|
|
116
|
+
a.value.page = e;
|
|
105
117
|
},
|
|
106
|
-
onUpdatePageSize: (
|
|
107
|
-
|
|
118
|
+
onUpdatePageSize: (e) => {
|
|
119
|
+
a.value.pageSize = e;
|
|
108
120
|
}
|
|
109
121
|
}
|
|
110
122
|
}), null)]),
|
|
111
123
|
footer: () => {
|
|
112
|
-
let
|
|
113
|
-
return i(x, null, [i(
|
|
124
|
+
let e, r;
|
|
125
|
+
return i(x, null, [i(p, {
|
|
114
126
|
onClick: () => {
|
|
115
127
|
var o;
|
|
116
|
-
(o =
|
|
128
|
+
(o = t.onClose) == null || o.call(t);
|
|
117
129
|
}
|
|
118
|
-
},
|
|
119
|
-
default: () => [
|
|
120
|
-
}), i(
|
|
130
|
+
}, u(e = n("components.button.cancel")) ? e : {
|
|
131
|
+
default: () => [e]
|
|
132
|
+
}), i(p, {
|
|
121
133
|
type: "primary",
|
|
122
134
|
onClick: () => {
|
|
123
135
|
var o;
|
|
124
|
-
(o =
|
|
136
|
+
(o = t.onConfirm) == null || o.call(t, c.value);
|
|
125
137
|
}
|
|
126
|
-
},
|
|
127
|
-
default: () => [
|
|
138
|
+
}, u(r = n("components.button.select")) ? r : {
|
|
139
|
+
default: () => [r]
|
|
128
140
|
})]);
|
|
129
141
|
}
|
|
130
142
|
});
|
|
131
143
|
}
|
|
132
144
|
});
|
|
133
145
|
export {
|
|
134
|
-
|
|
146
|
+
bt as default
|
|
135
147
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as u, defineAsyncComponent as
|
|
1
|
+
import { defineComponent as u, defineAsyncComponent as c, createVNode as t, Suspense as d } from "vue";
|
|
2
2
|
import { useExtendOverlay as f } from "@overlastic/vue";
|
|
3
|
-
import { NDrawer as
|
|
3
|
+
import { NDrawer as r, NSpin as s } from "naive-ui";
|
|
4
4
|
const w = /* @__PURE__ */ u({
|
|
5
5
|
name: "DuxDrawer",
|
|
6
6
|
props: {
|
|
7
7
|
title: String,
|
|
8
8
|
width: [Number, String],
|
|
9
|
+
maxWidth: [Number],
|
|
9
10
|
placement: {
|
|
10
11
|
type: String,
|
|
11
12
|
default: "right"
|
|
@@ -20,17 +21,18 @@ const w = /* @__PURE__ */ u({
|
|
|
20
21
|
const {
|
|
21
22
|
visible: i,
|
|
22
23
|
resolve: a,
|
|
23
|
-
reject:
|
|
24
|
+
reject: l,
|
|
24
25
|
vanish: o
|
|
25
26
|
} = f({
|
|
26
27
|
duration: 1e3
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
return () => t(
|
|
28
|
+
}), n = (e == null ? void 0 : e.componentProps) || {};
|
|
29
|
+
n.title = e.title, n.onConfirm = a, n.onClose = l;
|
|
30
|
+
const m = typeof e.component == "function" ? c(e.component) : e.component;
|
|
31
|
+
return () => t(r, {
|
|
31
32
|
closeOnEsc: !1,
|
|
32
33
|
maskClosable: !1,
|
|
33
|
-
minWidth:
|
|
34
|
+
minWidth: 200,
|
|
35
|
+
maxWidth: (e == null ? void 0 : e.maxWidth) || 800,
|
|
34
36
|
defaultWidth: (e == null ? void 0 : e.width) || 400,
|
|
35
37
|
resizable: !0,
|
|
36
38
|
placement: e.placement,
|
|
@@ -40,28 +42,15 @@ const w = /* @__PURE__ */ u({
|
|
|
40
42
|
o();
|
|
41
43
|
},
|
|
42
44
|
onEsc: () => {
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
+
l();
|
|
46
|
+
},
|
|
47
|
+
autoFocus: !1
|
|
45
48
|
}, {
|
|
46
49
|
default: () => [t("div", {
|
|
47
|
-
class: "h-full
|
|
48
|
-
}, [t(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
class: "text-base"
|
|
52
|
-
}, [e == null ? void 0 : e.title]), t("div", null, [t(m, {
|
|
53
|
-
quaternary: !0,
|
|
54
|
-
size: "small",
|
|
55
|
-
color: "default",
|
|
56
|
-
class: "!px-1 h-6",
|
|
57
|
-
onClick: () => n()
|
|
58
|
-
}, {
|
|
59
|
-
default: () => [t("div", {
|
|
60
|
-
class: "i-tabler:x w-5 h-5"
|
|
61
|
-
}, null)]
|
|
62
|
-
})])]), t(d, null, {
|
|
63
|
-
default: () => t(c, l, null),
|
|
64
|
-
fallback: () => t(b, {
|
|
50
|
+
class: "h-full"
|
|
51
|
+
}, [t(d, null, {
|
|
52
|
+
default: () => t(m, n, null),
|
|
53
|
+
fallback: () => t(s, {
|
|
65
54
|
show: !0
|
|
66
55
|
}, {
|
|
67
56
|
default: () => [t("div", {
|
|
@@ -1,28 +1,65 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NScrollbar as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as t, ref as u, watch as d, nextTick as m, createVNode as a } from "vue";
|
|
2
|
+
import { NButton as o, NScrollbar as x } from "naive-ui";
|
|
3
|
+
const h = /* @__PURE__ */ t({
|
|
4
4
|
name: "DuxDrawerPage",
|
|
5
|
-
props: {
|
|
6
|
-
|
|
5
|
+
props: {
|
|
6
|
+
title: String,
|
|
7
|
+
onClose: Function,
|
|
8
|
+
onConfirm: Function,
|
|
9
|
+
scrollbar: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !0
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(n, {
|
|
7
15
|
slots: e
|
|
8
16
|
}) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
const c = u();
|
|
18
|
+
return d(c, (r) => {
|
|
19
|
+
r && m(() => {
|
|
20
|
+
var i, f;
|
|
21
|
+
(f = (i = r.$el) == null ? void 0 : i.focus) == null || f.call(i);
|
|
22
|
+
});
|
|
23
|
+
}), () => {
|
|
24
|
+
var r, i, f;
|
|
25
|
+
return a("div", {
|
|
26
|
+
class: "h-full flex flex-col"
|
|
27
|
+
}, [a("div", {
|
|
28
|
+
class: "flex justify-between items-center p-2 border-b border-default"
|
|
29
|
+
}, [a("div", {
|
|
30
|
+
class: "text-base"
|
|
31
|
+
}, [n == null ? void 0 : n.title]), a("div", {
|
|
32
|
+
class: "flex items-center gap-2"
|
|
33
|
+
}, [(r = e.header) == null ? void 0 : r.call(e), a(o, {
|
|
34
|
+
quaternary: !0,
|
|
35
|
+
ref: c,
|
|
36
|
+
size: "small",
|
|
37
|
+
color: "default",
|
|
38
|
+
class: "!px-1 h-6",
|
|
39
|
+
onClick: () => {
|
|
40
|
+
var l;
|
|
41
|
+
return (l = n.onClose) == null ? void 0 : l.call(n);
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
default: () => [a("div", {
|
|
45
|
+
class: "i-tabler:x w-5 h-5"
|
|
46
|
+
}, null)]
|
|
47
|
+
})])]), a("div", {
|
|
14
48
|
class: "flex-1 min-h-1"
|
|
15
|
-
}, [
|
|
49
|
+
}, [n.scrollbar ? a(x, null, {
|
|
16
50
|
default: () => {
|
|
17
|
-
var
|
|
18
|
-
return [(
|
|
51
|
+
var l;
|
|
52
|
+
return [(l = e.default) == null ? void 0 : l.call(e)];
|
|
19
53
|
}
|
|
20
|
-
})]),
|
|
21
|
-
class: "flex-none border-t border-
|
|
22
|
-
}, [(
|
|
54
|
+
}) : (i = e.default) == null ? void 0 : i.call(e)]), e.actions && a("div", {
|
|
55
|
+
class: "flex-none border-t border-muted p-4 flex justify-end gap-2"
|
|
56
|
+
}, [(f = e.actions) == null ? void 0 : f.call(e, {
|
|
57
|
+
onClose: n.onClose,
|
|
58
|
+
onConfirm: n.onConfirm
|
|
59
|
+
})])]);
|
|
23
60
|
};
|
|
24
61
|
}
|
|
25
62
|
});
|
|
26
63
|
export {
|
|
27
|
-
|
|
64
|
+
h as DuxDrawerPage
|
|
28
65
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as x, toRef as b, computed as r, watch as
|
|
1
|
+
import { defineComponent as x, toRef as b, computed as r, watch as h, inject as y, createVNode as l, createTextVNode as p } from "vue";
|
|
2
2
|
import { watchThrottled as j } from "@vueuse/core";
|
|
3
|
-
import { useField as
|
|
4
|
-
const
|
|
3
|
+
import { useField as w } from "vee-validate";
|
|
4
|
+
const q = /* @__PURE__ */ x({
|
|
5
5
|
name: "DuxFormItem",
|
|
6
6
|
props: {
|
|
7
7
|
label: String,
|
|
@@ -24,10 +24,10 @@ const p = /* @__PURE__ */ x({
|
|
|
24
24
|
value: m,
|
|
25
25
|
setErrors: f,
|
|
26
26
|
validate: s
|
|
27
|
-
} =
|
|
27
|
+
} = w(e.path || "", e.rule || {}, {
|
|
28
28
|
label: e.label
|
|
29
29
|
}), o = r(() => e.rule ? typeof e.rule == "string" ? e.rule.includes("required") : typeof e.rule == "object" ? "required" in e.rule : !1 : !1), n = r(() => d.value && (c.value || d.value));
|
|
30
|
-
|
|
30
|
+
h(n, (t) => {
|
|
31
31
|
t && f(t);
|
|
32
32
|
}, {
|
|
33
33
|
immediate: !0
|
|
@@ -37,20 +37,20 @@ const p = /* @__PURE__ */ x({
|
|
|
37
37
|
throttle: 300,
|
|
38
38
|
deep: !0
|
|
39
39
|
});
|
|
40
|
-
const u =
|
|
40
|
+
const u = y("dux.form", {
|
|
41
41
|
labelPlacement: "left",
|
|
42
42
|
labelWidth: 70,
|
|
43
43
|
divider: !1
|
|
44
44
|
}), a = r(() => e.labelPlacement || u.labelPlacement), v = r(() => {
|
|
45
45
|
let t = e.labelWidth || u.labelWidth || 70;
|
|
46
|
-
return typeof t == "number" && (t = `${t}px`), a.value
|
|
47
|
-
});
|
|
46
|
+
return typeof t == "number" && (t = `${t}px`), a.value !== "left" ? "auto" : t;
|
|
47
|
+
}), g = r(() => u.divider || a.value === "page");
|
|
48
48
|
return () => {
|
|
49
49
|
var t;
|
|
50
50
|
return l("div", {
|
|
51
|
-
class: [
|
|
51
|
+
class: [a.value !== "top" ? "md:flex-row gap-2" : "gap-1", g.value ? "py-6" : "", a.value === "setting" ? "md:justify-between md:items-start md:gap-4" : "", a.value === "page" ? "grid grid-cols-1 lg:grid-cols-4 px-4" : "flex flex-col lg:items-center"]
|
|
52
52
|
}, [l("div", {
|
|
53
|
-
class: [a.value
|
|
53
|
+
class: [a.value === "left" ? "flex lg:items-center" : ""],
|
|
54
54
|
style: {
|
|
55
55
|
width: v.value
|
|
56
56
|
}
|
|
@@ -60,10 +60,10 @@ const p = /* @__PURE__ */ x({
|
|
|
60
60
|
class: "relative flex items-center gap-1"
|
|
61
61
|
}, [e.label, o.value && l("span", {
|
|
62
62
|
class: "text-error font-mono text-xs"
|
|
63
|
-
}, [
|
|
63
|
+
}, [p("*")])])]), e.description && typeof e.description == "string" && l("div", {
|
|
64
64
|
class: "text-sm text-muted"
|
|
65
65
|
}, [e.description])])]), l("div", {
|
|
66
|
-
class: ["flex flex-col gap-1", a.value !== "left" ? "md:mt-1" : "", a.value === "setting" ? "flex-none" : "flex-1"]
|
|
66
|
+
class: ["flex flex-col gap-1", a.value !== "left" ? "md:mt-1" : "", a.value === "setting" ? "flex-none min-w-200px" : "flex-1", a.value === "page" ? "col-span-3" : ""]
|
|
67
67
|
}, [l("div", null, [(t = i == null ? void 0 : i.default) == null ? void 0 : t.call(i)]), e.description && typeof e.description != "string" && l("div", {
|
|
68
68
|
class: "text-sm text-muted"
|
|
69
69
|
}, [e.description]), n.value && l("div", {
|
|
@@ -73,5 +73,5 @@ const p = /* @__PURE__ */ x({
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
export {
|
|
76
|
-
|
|
76
|
+
q as DuxFormItem
|
|
77
77
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as d, provide as i, createVNode as t } from "vue";
|
|
2
|
+
const m = /* @__PURE__ */ d({
|
|
3
3
|
name: "DuxFormLayout",
|
|
4
4
|
props: {
|
|
5
5
|
labelPlacement: {
|
|
@@ -19,20 +19,20 @@ const r = /* @__PURE__ */ a({
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
setup(e, {
|
|
22
|
-
slots:
|
|
22
|
+
slots: a
|
|
23
23
|
}) {
|
|
24
|
-
return
|
|
24
|
+
return i("dux.form", {
|
|
25
25
|
labelPlacement: e.labelPlacement,
|
|
26
26
|
labelWidth: e.labelWidth,
|
|
27
27
|
divider: e.divider
|
|
28
28
|
}), () => {
|
|
29
|
-
var
|
|
29
|
+
var l;
|
|
30
30
|
return t("div", {
|
|
31
|
-
class: ["flex
|
|
32
|
-
}, [(
|
|
31
|
+
class: ["flex ", e.divider || e.labelPlacement === "page" ? " divide-y divide-default dark:divide-gray-800" : "", e.inline ? "flex-row" : "flex-col", e.labelPlacement === "page" || e.labelPlacement === "setting" ? "container mx-auto" : "gap-4"]
|
|
32
|
+
}, [(l = a == null ? void 0 : a.default) == null ? void 0 : l.call(a)]);
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
m as DuxFormLayout
|
|
38
38
|
};
|