@duxweb/dvha-pro 1.0.22 → 1.0.24
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/card/store.cjs +1 -1
- package/dist/cjs/components/carousel/carousel.cjs +1 -1
- package/dist/cjs/components/crop/imageCrop.cjs +1 -1
- package/dist/cjs/components/crop/imageCropModal.cjs +1 -1
- package/dist/cjs/components/dashboard/hello.cjs +1 -1
- package/dist/cjs/components/dashboard/helloBig.cjs +1 -1
- package/dist/cjs/components/dashboard/quick.cjs +1 -1
- package/dist/cjs/components/data/dynamicData.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/dialog/dialog.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/editor/aiEditor.cjs +1 -1
- package/dist/cjs/components/form/drawerForm.cjs +1 -0
- 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/iconPicker.cjs +1 -1
- package/dist/cjs/components/layout/filter.cjs +1 -1
- package/dist/cjs/components/layout/filterLayout.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/layout/tools.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/media/media.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/panel/alert.cjs +1 -1
- package/dist/cjs/components/panel/collapse.cjs +1 -1
- package/dist/cjs/components/panel/setting.cjs +1 -1
- package/dist/cjs/components/select/cardSelect.cjs +1 -1
- package/dist/cjs/components/status/listEmpty.cjs +1 -1
- 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 -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/components/widget/connect.cjs +1 -1
- package/dist/cjs/dvha-pro.css +1 -1
- package/dist/cjs/hooks/action.cjs +1 -1
- package/dist/cjs/hooks/download.cjs +1 -1
- package/dist/cjs/hooks/echart.cjs +1 -1
- package/dist/cjs/hooks/image.cjs +1 -1
- package/dist/cjs/hooks/level.cjs +1 -1
- package/dist/cjs/hooks/table/color.cjs +1 -0
- package/dist/cjs/hooks/table/column.cjs +1 -1
- package/dist/cjs/hooks/table/image.cjs +1 -1
- package/dist/cjs/hooks/table/input.cjs +1 -1
- package/dist/cjs/hooks/table/map.cjs +1 -1
- package/dist/cjs/hooks/table/status.cjs +1 -1
- package/dist/cjs/hooks/table/switch.cjs +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/pages/layout/global.cjs +1 -1
- package/dist/cjs/pages/layout/tab.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/page.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/stores/ui.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +2 -1
- package/dist/esm/component.js +3 -3
- package/dist/esm/components/card/card.js +24 -27
- package/dist/esm/components/card/store.js +33 -39
- package/dist/esm/components/carousel/carousel.js +16 -19
- package/dist/esm/components/crop/imageCrop.js +32 -35
- package/dist/esm/components/crop/imageCropModal.js +36 -37
- package/dist/esm/components/dashboard/hello.js +27 -30
- package/dist/esm/components/dashboard/helloBig.js +328 -331
- package/dist/esm/components/dashboard/quick.js +30 -33
- package/dist/esm/components/data/dynamicData.js +86 -98
- package/dist/esm/components/data/dynamicSelect.js +29 -31
- package/dist/esm/components/data/selectModal.js +45 -49
- package/dist/esm/components/dialog/dialog.js +54 -55
- package/dist/esm/components/drawer/drawer.js +23 -22
- package/dist/esm/components/drawer/drawerPage.js +39 -49
- package/dist/esm/components/editor/aiEditor.js +64 -70
- package/dist/esm/components/form/drawerForm.js +149 -0
- package/dist/esm/components/form/formItem.js +44 -50
- package/dist/esm/components/form/formLayout.js +7 -10
- package/dist/esm/components/form/modalForm.js +50 -50
- package/dist/esm/components/form/pageForm.js +47 -50
- package/dist/esm/components/form/settingForm.js +34 -37
- package/dist/esm/components/icon/iconPicker.js +54 -58
- package/dist/esm/components/layout/filter.js +13 -16
- package/dist/esm/components/layout/filterLayout.js +7 -10
- package/dist/esm/components/layout/list.js +299 -326
- package/dist/esm/components/layout/table.js +268 -283
- package/dist/esm/components/layout/tools.js +38 -41
- package/dist/esm/components/list/card.js +35 -38
- package/dist/esm/components/list/list.js +15 -18
- package/dist/esm/components/media/media.js +35 -36
- package/dist/esm/components/modal/modal.js +10 -10
- package/dist/esm/components/modal/modalPage.js +32 -36
- package/dist/esm/components/modal/modalTab.js +39 -45
- package/dist/esm/components/panel/alert.js +19 -22
- package/dist/esm/components/panel/collapse.js +33 -36
- package/dist/esm/components/panel/setting.js +25 -31
- package/dist/esm/components/select/cardSelect.js +27 -28
- package/dist/esm/components/status/listEmpty.js +13 -13
- package/dist/esm/components/table/tablePage.js +25 -25
- package/dist/esm/components/tree/treeFilter.js +137 -147
- package/dist/esm/components/upload/config.js +15 -27
- package/dist/esm/components/upload/file.js +90 -94
- package/dist/esm/components/upload/image.js +116 -123
- package/dist/esm/components/upload/manage/item.js +44 -47
- package/dist/esm/components/upload/manager.js +190 -207
- package/dist/esm/components/widget/connect.js +103 -106
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +141 -157
- package/dist/esm/hooks/download.js +55 -56
- package/dist/esm/hooks/echart.js +156 -179
- package/dist/esm/hooks/image.js +14 -15
- package/dist/esm/hooks/level.js +7 -7
- package/dist/esm/hooks/table/color.js +19 -0
- package/dist/esm/hooks/table/column.js +25 -23
- package/dist/esm/hooks/table/image.js +2 -2
- package/dist/esm/hooks/table/input.js +28 -28
- package/dist/esm/hooks/table/map.js +7 -7
- package/dist/esm/hooks/table/status.js +8 -9
- package/dist/esm/hooks/table/switch.js +19 -19
- package/dist/esm/hooks/table.js +27 -31
- package/dist/esm/index.js +162 -158
- package/dist/esm/pages/layout/global.js +12 -15
- package/dist/esm/pages/layout/tab.js +58 -71
- package/dist/esm/pages/login.js +81 -85
- package/dist/esm/pages/menu/avatar.js +136 -149
- package/dist/esm/pages/menu/button.js +16 -20
- package/dist/esm/pages/menu/cmd.js +68 -74
- package/dist/esm/pages/page.js +21 -25
- package/dist/esm/pages/pageStatus.js +21 -24
- package/dist/esm/stores/ui.js +15 -15
- package/dist/esm/theme/uno.css.js +2 -1
- package/dist/types/components/drawer/drawerPage.d.ts +1 -1
- package/dist/types/components/form/drawerForm.d.ts +104 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/modalForm.d.ts +6 -0
- package/dist/types/components/form/pageForm.d.ts +6 -0
- package/dist/types/components/form/settingForm.d.ts +6 -0
- package/dist/types/components/layout/table.d.ts +9 -0
- package/dist/types/components/table/tablePage.d.ts +9 -0
- package/dist/types/hooks/table/color.d.ts +13 -0
- package/dist/types/hooks/table/column.d.ts +1 -0
- package/dist/types/hooks/table/index.d.ts +1 -0
- package/dist/types/hooks/table/types.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { NButton as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as d, computed as o, createVNode as e, Transition as c, Fragment as p } from "vue";
|
|
2
|
+
import { useI18n as m } from "@duxweb/dvha-core";
|
|
3
|
+
import { NButton as r, NDropdown as y } from "naive-ui";
|
|
4
|
+
const v = /* @__PURE__ */ d({
|
|
5
5
|
name: "DuxTableTools",
|
|
6
6
|
props: {
|
|
7
7
|
number: {
|
|
@@ -19,11 +19,11 @@ const x = /* @__PURE__ */ c({
|
|
|
19
19
|
},
|
|
20
20
|
setup(t) {
|
|
21
21
|
const {
|
|
22
|
-
t:
|
|
23
|
-
} =
|
|
22
|
+
t: s
|
|
23
|
+
} = m(), n = o(() => t.group ? t.group : [t.options]), u = o(() => t.number && t.number > 0);
|
|
24
24
|
return () => e("div", {
|
|
25
25
|
class: "absolute bottom-0 left-0 right-0 pointer-events-none"
|
|
26
|
-
}, [e(
|
|
26
|
+
}, [e(c, {
|
|
27
27
|
name: "slide-up",
|
|
28
28
|
appear: !0,
|
|
29
29
|
enterActiveClass: "transition-all duration-200 ease-out",
|
|
@@ -33,46 +33,43 @@ const x = /* @__PURE__ */ c({
|
|
|
33
33
|
leaveFromClass: "transform translate-y-0 opacity-100",
|
|
34
34
|
leaveToClass: "transform translate-y-full opacity-0"
|
|
35
35
|
}, {
|
|
36
|
-
default: () => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
default: () => [u.value ? e("div", {
|
|
37
|
+
class: "flex h-12 px-1 justify-between lg:justify-center gap-2 pointer-events-auto backdrop-blur"
|
|
38
|
+
}, [n.value?.map((i, l) => e("div", {
|
|
39
|
+
class: "h-10 mt-1 bg-gray-800 rounded px-4 py-1 shadow-lg flex items-center gap-4"
|
|
40
|
+
}, [l === n.value.length - 1 && e(p, null, [e("span", {
|
|
41
|
+
class: "text-gray-300"
|
|
42
|
+
}, [s("components.list.selectedItems", {
|
|
43
|
+
num: t.number || 0
|
|
44
|
+
})]), e("div", {
|
|
45
|
+
class: "w-px h-4 bg-gray-600"
|
|
46
|
+
}, null)]), i?.map((a) => e(r, {
|
|
47
|
+
text: !0,
|
|
48
|
+
onClick: a.onClick,
|
|
49
|
+
class: "text-gray-300",
|
|
50
|
+
loading: a.loading,
|
|
51
|
+
disabled: a.disabled,
|
|
52
|
+
type: a.type
|
|
53
|
+
}, {
|
|
54
|
+
default: () => a.label,
|
|
55
|
+
icon: () => e("div", {
|
|
56
|
+
class: a.icon
|
|
57
|
+
}, null)
|
|
58
|
+
})), l === n.value.length - 1 && t.dropdown && t.dropdown.length > 0 && e(y, {
|
|
59
|
+
options: t.dropdown
|
|
60
|
+
}, {
|
|
61
|
+
default: () => [e(r, {
|
|
49
62
|
text: !0,
|
|
50
|
-
|
|
51
|
-
class: "text-gray-300",
|
|
52
|
-
loading: a.loading,
|
|
53
|
-
disabled: a.disabled,
|
|
54
|
-
type: a.type
|
|
63
|
+
class: "text-gray-300"
|
|
55
64
|
}, {
|
|
56
|
-
default: () => a.label,
|
|
57
65
|
icon: () => e("div", {
|
|
58
|
-
class:
|
|
66
|
+
class: "i-tabler:dots-vertical size-4"
|
|
59
67
|
}, null)
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
}, {
|
|
63
|
-
default: () => [e(u, {
|
|
64
|
-
text: !0,
|
|
65
|
-
class: "text-gray-300"
|
|
66
|
-
}, {
|
|
67
|
-
icon: () => e("div", {
|
|
68
|
-
class: "i-tabler:dots-vertical size-4"
|
|
69
|
-
}, null)
|
|
70
|
-
})]
|
|
71
|
-
})]))]) : null];
|
|
72
|
-
}
|
|
68
|
+
})]
|
|
69
|
+
})]))]) : null]
|
|
73
70
|
})]);
|
|
74
71
|
}
|
|
75
72
|
});
|
|
76
73
|
export {
|
|
77
|
-
|
|
74
|
+
v as DuxTableTools
|
|
78
75
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as v, ref as W, computed as
|
|
1
|
+
import { defineComponent as v, ref as W, computed as r, toRef as S, createVNode as m } from "vue";
|
|
2
2
|
import { useElementSize as y, useWindowSize as z, watchDebounced as M } from "@vueuse/core";
|
|
3
|
-
import { DuxListLayout as
|
|
3
|
+
import { DuxListLayout as g } from "../layout/list.js";
|
|
4
4
|
const j = /* @__PURE__ */ v({
|
|
5
5
|
name: "DuxCardPage",
|
|
6
6
|
props: {
|
|
@@ -25,61 +25,58 @@ const j = /* @__PURE__ */ v({
|
|
|
25
25
|
default: ""
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
extends:
|
|
28
|
+
extends: g,
|
|
29
29
|
slots: Object,
|
|
30
|
-
setup(
|
|
31
|
-
slots:
|
|
30
|
+
setup(t, {
|
|
31
|
+
slots: a
|
|
32
32
|
}) {
|
|
33
33
|
const f = W(), {
|
|
34
|
-
width:
|
|
34
|
+
width: s
|
|
35
35
|
} = y(f), {
|
|
36
36
|
width: h
|
|
37
|
-
} = z(), p =
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
},
|
|
37
|
+
} = z(), p = r(() => t.colWidth || 320), u = (e = 0) => {
|
|
38
|
+
const i = e || h.value || 1024, c = t.colWidth || 320, n = t.rows || 4, b = t.maxRows || 10, d = 0.25 * 16 * 3, l = Math.max(1, Math.floor((i + d) / (c + d))), x = Math.floor((1920 + d) / (c + d)) * n, C = Math.ceil(x / l), R = Math.min(Math.max(C, n), b);
|
|
39
|
+
return l * R;
|
|
40
|
+
}, o = S(t.pagination && typeof t.pagination == "object" ? t.pagination : {
|
|
41
41
|
page: 1,
|
|
42
|
-
pageSize:
|
|
42
|
+
pageSize: u()
|
|
43
43
|
});
|
|
44
|
-
M([
|
|
45
|
-
if (
|
|
44
|
+
M([s], () => {
|
|
45
|
+
if (t.pagination && typeof t.pagination == "object")
|
|
46
46
|
return;
|
|
47
|
-
const
|
|
48
|
-
|
|
47
|
+
const e = u(s.value);
|
|
48
|
+
e !== o.value.pageSize && (o.value.pageSize = e, o.value.page = 1);
|
|
49
49
|
}, {
|
|
50
50
|
debounce: 300
|
|
51
51
|
});
|
|
52
|
-
const w =
|
|
52
|
+
const w = r(() => {
|
|
53
53
|
const {
|
|
54
|
-
maxRows:
|
|
55
|
-
rows:
|
|
56
|
-
colWidth:
|
|
57
|
-
...
|
|
58
|
-
} =
|
|
54
|
+
maxRows: e,
|
|
55
|
+
rows: i,
|
|
56
|
+
colWidth: c,
|
|
57
|
+
...n
|
|
58
|
+
} = t;
|
|
59
59
|
return {
|
|
60
|
-
...
|
|
61
|
-
pagination:
|
|
60
|
+
...n,
|
|
61
|
+
pagination: o.value
|
|
62
62
|
};
|
|
63
63
|
});
|
|
64
|
-
return () => g
|
|
65
|
-
default: (
|
|
64
|
+
return () => m(g, w.value, {
|
|
65
|
+
default: (e) => m("div", {
|
|
66
66
|
class: "grid gap-3",
|
|
67
67
|
style: {
|
|
68
68
|
"grid-template-columns": `repeat(auto-fit, minmax(${p.value}px, 1fr))`
|
|
69
69
|
}
|
|
70
|
-
}, [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
bottom: t.bottom,
|
|
81
|
-
sideLeft: t.sideLeft,
|
|
82
|
-
sideRight: t.sideRight
|
|
70
|
+
}, [e.list.value.map((i) => a?.default?.({
|
|
71
|
+
item: i,
|
|
72
|
+
isChecked: e.isChecked,
|
|
73
|
+
toggleChecked: e.toggleChecked
|
|
74
|
+
}))]),
|
|
75
|
+
actions: a.actions,
|
|
76
|
+
tools: a.tools,
|
|
77
|
+
bottom: a.bottom,
|
|
78
|
+
sideLeft: a.sideLeft,
|
|
79
|
+
sideRight: a.sideRight
|
|
83
80
|
});
|
|
84
81
|
}
|
|
85
82
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DuxListLayout as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as c, computed as n, createVNode as i } from "vue";
|
|
2
|
+
import { DuxListLayout as o } from "../layout/list.js";
|
|
3
|
+
const f = /* @__PURE__ */ c({
|
|
4
4
|
name: "DuxListPage",
|
|
5
5
|
props: {
|
|
6
6
|
sideLeftTitle: {
|
|
@@ -12,30 +12,27 @@ const u = /* @__PURE__ */ p({
|
|
|
12
12
|
default: ""
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
extends:
|
|
15
|
+
extends: o,
|
|
16
16
|
slots: Object,
|
|
17
|
-
setup(
|
|
17
|
+
setup(d, {
|
|
18
18
|
slots: e
|
|
19
19
|
}) {
|
|
20
|
-
const
|
|
20
|
+
const s = n(() => {
|
|
21
21
|
const {
|
|
22
22
|
...t
|
|
23
|
-
} =
|
|
23
|
+
} = d;
|
|
24
24
|
return {
|
|
25
25
|
...t
|
|
26
26
|
};
|
|
27
27
|
});
|
|
28
|
-
return () =>
|
|
29
|
-
default: (t) =>
|
|
28
|
+
return () => i(o, s.value, {
|
|
29
|
+
default: (t) => i("div", {
|
|
30
30
|
class: "flex flex-col gap-3"
|
|
31
|
-
}, [t.list.value.map((
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
toggleChecked: t.toggleChecked
|
|
37
|
-
});
|
|
38
|
-
})]),
|
|
31
|
+
}, [t.list.value.map((a) => e?.default?.({
|
|
32
|
+
item: a,
|
|
33
|
+
isChecked: t.isChecked,
|
|
34
|
+
toggleChecked: t.toggleChecked
|
|
35
|
+
}))]),
|
|
39
36
|
actions: e.actions,
|
|
40
37
|
tools: e.tools,
|
|
41
38
|
bottom: e.bottom,
|
|
@@ -45,5 +42,5 @@ const u = /* @__PURE__ */ p({
|
|
|
45
42
|
}
|
|
46
43
|
});
|
|
47
44
|
export {
|
|
48
|
-
|
|
45
|
+
f as DuxListPage
|
|
49
46
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { NImageGroup as
|
|
4
|
-
import { DuxAvatar as
|
|
5
|
-
import { DuxImage as
|
|
6
|
-
function
|
|
7
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1
|
+
import { defineComponent as u, computed as m, createVNode as t, Fragment as g, isVNode as x } from "vue";
|
|
2
|
+
import f from "clsx";
|
|
3
|
+
import { NImageGroup as o } from "naive-ui";
|
|
4
|
+
import { DuxAvatar as d } from "../widget/avatar.js";
|
|
5
|
+
import { DuxImage as v } from "../widget/image.js";
|
|
6
|
+
function s(e) {
|
|
7
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !x(e);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const S = /* @__PURE__ */ u({
|
|
10
10
|
name: "DuxMedia",
|
|
11
11
|
props: {
|
|
12
12
|
title: String,
|
|
@@ -17,63 +17,62 @@ const I = /* @__PURE__ */ h({
|
|
|
17
17
|
onClick: Function,
|
|
18
18
|
imageWidth: {
|
|
19
19
|
type: Number,
|
|
20
|
-
default:
|
|
20
|
+
default: 42
|
|
21
21
|
},
|
|
22
22
|
imageHeight: {
|
|
23
23
|
type: Number,
|
|
24
|
-
default:
|
|
24
|
+
default: 42
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
setup(e, {
|
|
28
28
|
slots: a
|
|
29
29
|
}) {
|
|
30
|
-
const
|
|
30
|
+
const l = m(() => Array.isArray(e.image) ? e.image : e.image ? [e.image] : []), c = m(() => Array.isArray(e.desc) ? e.desc : e.desc ? [e.desc] : []);
|
|
31
31
|
return () => {
|
|
32
|
-
var u, d, g, x, f, v, l;
|
|
33
32
|
let r;
|
|
34
|
-
return
|
|
33
|
+
return t("div", {
|
|
35
34
|
class: "flex gap-2 items-center"
|
|
36
|
-
}, [
|
|
35
|
+
}, [a?.image && t("div", {
|
|
37
36
|
class: "flex-none flex items-center gap-2"
|
|
38
|
-
}, [
|
|
37
|
+
}, [a?.image?.()]), (e.avatar || l?.value.length > 0) && t("div", {
|
|
39
38
|
class: "flex-none flex items-center gap-2"
|
|
40
|
-
}, [e.avatar ?
|
|
41
|
-
key:
|
|
42
|
-
src:
|
|
39
|
+
}, [e.avatar ? t(g, null, [l.value.length > 0 ? l.value.map((i, n) => t(d, {
|
|
40
|
+
key: n,
|
|
41
|
+
src: i,
|
|
43
42
|
round: !0,
|
|
44
43
|
size: e.imageWidth
|
|
45
|
-
}, null))
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
}, null)) : t(d, {
|
|
45
|
+
round: !0,
|
|
46
|
+
size: e.imageWidth
|
|
47
|
+
}, null)]) : t(o, null, s(r = l.value.map((i, n) => t(v, {
|
|
48
|
+
key: n,
|
|
49
|
+
src: i,
|
|
48
50
|
class: "rounded",
|
|
49
51
|
objectFit: "cover",
|
|
50
52
|
width: e.imageWidth,
|
|
51
53
|
height: e.imageHeight
|
|
52
54
|
}, null))) ? r : {
|
|
53
55
|
default: () => [r]
|
|
54
|
-
})]),
|
|
56
|
+
})]), t("div", {
|
|
55
57
|
class: "flex-1 flex-col gap-2 min-w-0 truncate items-center"
|
|
56
|
-
}, [
|
|
58
|
+
}, [t("div", {
|
|
57
59
|
class: "flex gap-2 items-center"
|
|
58
|
-
}, [
|
|
59
|
-
onClick: () =>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
class: b(["transition-all truncate", (e == null ? void 0 : e.onClick) && "hover:text-primary cursor-pointer"])
|
|
64
|
-
}, [e.title || ((g = a.default) == null ? void 0 : g.call(a))])]), ((t == null ? void 0 : t.value.length) > 0 || a.desc) && i("div", {
|
|
60
|
+
}, [a.prefix?.(), (e.title || a.default) && t("div", {
|
|
61
|
+
onClick: () => e.onClick?.(),
|
|
62
|
+
class: f(["transition-all truncate", e?.onClick && "hover:text-primary cursor-pointer"])
|
|
63
|
+
}, [e.title || a.default?.()])]), (c?.value.length > 0 || a.desc) && t("div", {
|
|
65
64
|
class: "text-sm text-muted flex flex-col gap-0"
|
|
66
|
-
}, [
|
|
67
|
-
key:
|
|
65
|
+
}, [c?.value.map?.((i, n) => t("div", {
|
|
66
|
+
key: n,
|
|
68
67
|
class: "truncate"
|
|
69
|
-
}, [
|
|
68
|
+
}, [i])), a.desc?.()])]), e?.extend && t("div", {
|
|
70
69
|
class: "flex-none flex items-center gap-2 text-gray-7"
|
|
71
|
-
}, [e
|
|
70
|
+
}, [e?.extend]), a?.extend && t("div", {
|
|
72
71
|
class: "flex-none flex items-center gap-2 text-gray-7"
|
|
73
|
-
}, [
|
|
72
|
+
}, [a?.extend?.()])]);
|
|
74
73
|
};
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
76
|
export {
|
|
78
|
-
|
|
77
|
+
S as DuxMedia
|
|
79
78
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as s, defineAsyncComponent as c, createVNode as t, mergeProps as n, Suspense as m } from "vue";
|
|
2
2
|
import { useExtendOverlay as f } from "@overlastic/vue";
|
|
3
3
|
import { NModal as g, NSpin as b } from "naive-ui";
|
|
4
|
-
const
|
|
4
|
+
const w = /* @__PURE__ */ s({
|
|
5
5
|
name: "DuxModal",
|
|
6
6
|
props: {
|
|
7
7
|
title: {
|
|
@@ -28,17 +28,17 @@ const v = /* @__PURE__ */ c({
|
|
|
28
28
|
visible: l,
|
|
29
29
|
resolve: d,
|
|
30
30
|
reject: a,
|
|
31
|
-
vanish:
|
|
31
|
+
vanish: r
|
|
32
32
|
} = f({
|
|
33
33
|
duration: 1e3
|
|
34
|
-
}), o =
|
|
34
|
+
}), o = e?.componentProps || {};
|
|
35
35
|
o.title = e.title, o.onConfirm = d, o.onClose = a;
|
|
36
|
-
const
|
|
36
|
+
const i = typeof e.component == "function" ? c(e.component) : e.component;
|
|
37
37
|
return () => t(g, n({
|
|
38
38
|
displayDirective: "show",
|
|
39
39
|
show: l.value,
|
|
40
40
|
onAfterLeave: () => {
|
|
41
|
-
|
|
41
|
+
r();
|
|
42
42
|
},
|
|
43
43
|
onClose: () => {
|
|
44
44
|
a();
|
|
@@ -60,8 +60,8 @@ const v = /* @__PURE__ */ c({
|
|
|
60
60
|
style: {
|
|
61
61
|
width: typeof e.width == "number" ? `${e.width}px` : e.width
|
|
62
62
|
}
|
|
63
|
-
}, [t(
|
|
64
|
-
default: () => t(
|
|
63
|
+
}, [t(m, null, {
|
|
64
|
+
default: () => t(i, n(o, {
|
|
65
65
|
title: e.title,
|
|
66
66
|
handle: u
|
|
67
67
|
}), null),
|
|
@@ -77,6 +77,6 @@ const v = /* @__PURE__ */ c({
|
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
w as DuxModal,
|
|
81
|
+
w as default
|
|
82
82
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NButton as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as o, ref as r, watch as n, nextTick as i, createVNode as e } from "vue";
|
|
2
|
+
import { NButton as f } from "naive-ui";
|
|
3
|
+
const c = /* @__PURE__ */ o({
|
|
4
4
|
name: "DuxModalPage",
|
|
5
5
|
props: {
|
|
6
6
|
title: {
|
|
@@ -20,42 +20,38 @@ const x = /* @__PURE__ */ f({
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
slots:
|
|
23
|
+
setup(t, {
|
|
24
|
+
slots: a
|
|
25
25
|
}) {
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
(r = (d = t.$el) == null ? void 0 : d.focus) == null || r.call(d);
|
|
26
|
+
const l = r();
|
|
27
|
+
return n(l, (d) => {
|
|
28
|
+
d && i(() => {
|
|
29
|
+
d.$el?.focus?.();
|
|
31
30
|
});
|
|
32
|
-
}), () => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
class: "flex justify-end gap-2 p-3 rounded-b border-t border-muted bg-muted dark:bg-gray-800/50"
|
|
55
|
-
}, [(r = e.footer) == null ? void 0 : r.call(e)])]);
|
|
56
|
-
};
|
|
31
|
+
}), () => e("div", {
|
|
32
|
+
class: "flex flex-col"
|
|
33
|
+
}, [e("div", {
|
|
34
|
+
class: ["px-4 py-3 border-b border-muted rounded-t flex justify-between items-center bg-white dark:bg-gray-800/50", t.draggable && "cursor-move", t.handle]
|
|
35
|
+
}, [e("div", {
|
|
36
|
+
class: "text-base font-bold"
|
|
37
|
+
}, [t.title]), e("div", {
|
|
38
|
+
class: "flex justify-end gap-2"
|
|
39
|
+
}, [e(f, {
|
|
40
|
+
text: !0,
|
|
41
|
+
onClick: t.onClose,
|
|
42
|
+
"aria-label": "close",
|
|
43
|
+
ref: l
|
|
44
|
+
}, {
|
|
45
|
+
icon: () => e("div", {
|
|
46
|
+
class: "i-tabler:x"
|
|
47
|
+
}, null)
|
|
48
|
+
})])]), e("div", {
|
|
49
|
+
class: "p-4"
|
|
50
|
+
}, [a.default?.()]), a.footer?.() && e("div", {
|
|
51
|
+
class: "flex justify-end gap-2 p-3 rounded-b border-t border-muted bg-muted dark:bg-gray-800/50"
|
|
52
|
+
}, [a.footer?.()])]);
|
|
57
53
|
}
|
|
58
54
|
});
|
|
59
55
|
export {
|
|
60
|
-
|
|
56
|
+
c as default
|
|
61
57
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NTabs as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as t, ref as d, createVNode as e } from "vue";
|
|
2
|
+
import { NTabs as r, NButton as n } from "naive-ui";
|
|
3
|
+
const f = /* @__PURE__ */ t({
|
|
4
4
|
name: "ModalTab",
|
|
5
5
|
props: {
|
|
6
6
|
draggable: {
|
|
@@ -13,7 +13,7 @@ const o = /* @__PURE__ */ n({
|
|
|
13
13
|
},
|
|
14
14
|
handle: {
|
|
15
15
|
type: Object,
|
|
16
|
-
default: () =>
|
|
16
|
+
default: () => d()
|
|
17
17
|
},
|
|
18
18
|
onClose: {
|
|
19
19
|
type: Function,
|
|
@@ -21,50 +21,44 @@ const o = /* @__PURE__ */ n({
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
setup(
|
|
25
|
-
slots:
|
|
24
|
+
setup(a, {
|
|
25
|
+
slots: l
|
|
26
26
|
}) {
|
|
27
|
-
return () => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
return () => e("div", {
|
|
28
|
+
class: "flex flex-col"
|
|
29
|
+
}, [e(r, {
|
|
30
|
+
type: "line",
|
|
31
|
+
defaultValue: a.defaultTab,
|
|
32
|
+
class: "app-modal-tabs",
|
|
33
|
+
size: "large",
|
|
34
|
+
style: {
|
|
35
|
+
"--n-pane-padding-right": "16px",
|
|
36
|
+
"--n-pane-padding-left": "16px"
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
39
|
+
default: () => l.default?.(),
|
|
40
|
+
prefix: () => a.draggable ? e("div", {
|
|
41
|
+
class: "pl-4 cursor-move flex items-center",
|
|
42
|
+
ref: a.handle
|
|
43
|
+
}, [e("div", {
|
|
44
|
+
class: "i-tabler:grid-dots size-4"
|
|
45
|
+
}, null)]) : null,
|
|
46
|
+
suffix: () => e("div", {
|
|
47
|
+
class: "pr-4 flex items-center"
|
|
48
|
+
}, [e(n, {
|
|
49
|
+
text: !0,
|
|
50
|
+
onClick: a.onClose,
|
|
51
|
+
"aria-label": "close"
|
|
40
52
|
}, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, [a("div", {
|
|
49
|
-
class: "i-tabler:grid-dots size-4"
|
|
50
|
-
}, null)]) : null,
|
|
51
|
-
suffix: () => a("div", {
|
|
52
|
-
class: "pr-4 flex items-center"
|
|
53
|
-
}, [a(u, {
|
|
54
|
-
text: !0,
|
|
55
|
-
onClick: d.onClose,
|
|
56
|
-
"aria-label": "close"
|
|
57
|
-
}, {
|
|
58
|
-
icon: () => a("div", {
|
|
59
|
-
class: "i-tabler:x size-4"
|
|
60
|
-
}, null)
|
|
61
|
-
})])
|
|
62
|
-
}), ((l = e.footer) == null ? void 0 : l.call(e)) && a("div", {
|
|
63
|
-
class: "flex justify-end gap-2 p-3 rounded-b border-t border-muted bg-muted dark:bg-gray-800/50"
|
|
64
|
-
}, [(t = e.footer) == null ? void 0 : t.call(e)])]);
|
|
65
|
-
};
|
|
53
|
+
icon: () => e("div", {
|
|
54
|
+
class: "i-tabler:x size-4"
|
|
55
|
+
}, null)
|
|
56
|
+
})])
|
|
57
|
+
}), l.footer?.() && e("div", {
|
|
58
|
+
class: "flex justify-end gap-2 p-3 rounded-b border-t border-muted bg-muted dark:bg-gray-800/50"
|
|
59
|
+
}, [l.footer?.()])]);
|
|
66
60
|
}
|
|
67
61
|
});
|
|
68
62
|
export {
|
|
69
|
-
|
|
63
|
+
f as default
|
|
70
64
|
};
|