@owocow/saber-ui 0.1.13 → 0.1.14
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/{SaberAppLayout.vue_vue_type_script_setup_true_lang-R7F5K7kj.js → SaberAppLayout.vue_vue_type_script_setup_true_lang-DaxscIFe.js} +2 -2
- package/dist/{SaberDictSelect.vue_vue_type_script_setup_true_lang-B8PTKNKX.js → SaberDictSelect.vue_vue_type_script_setup_true_lang-BKdOdlFX.js} +1 -1
- package/dist/SaberDistrictSelect.vue_vue_type_script_setup_true_lang-jkl2AOay.js +272 -0
- package/dist/SaberPopSelect.vue_vue_type_script_setup_true_lang-eH8jkkzK.js +162 -0
- package/dist/SaberSwitchBar.vue_vue_type_script_setup_true_lang-CIbFBx5r.js +47 -0
- package/dist/components/SaberAppLayout.mjs +1 -1
- package/dist/components/SaberPagination.vue.d.ts +49 -0
- package/dist/components/SaberSwitchBar.mjs +1 -1
- package/dist/control-size.d.ts +33 -0
- package/dist/forms/components/SaberFilterBar.vue.d.ts +3 -0
- package/dist/forms/components/SaberFormModal.vue.d.ts +2 -0
- package/dist/forms/components/fields/SaberDistrictSelect.vue.d.ts +5 -0
- package/dist/forms/components/fields/SaberInput.vue.d.ts +5 -0
- package/dist/forms/components/fields/SaberInputNumber.vue.d.ts +10 -2
- package/dist/forms/components/fields/SaberPopSelect.vue.d.ts +4 -1
- package/dist/forms/components/fields/SaberSelect.vue.d.ts +10 -2
- package/dist/forms/dict-select.mjs +1 -1
- package/dist/forms/district-select.mjs +1 -1
- package/dist/forms/index.d.ts +1 -0
- package/dist/forms/pop-select.mjs +1 -1
- package/dist/forms.mjs +4 -4
- package/dist/index.d.ts +4 -1
- package/dist/index.mjs +176 -98
- package/dist/plugin-DvH6j00c.js +442 -0
- package/package.json +1 -1
- package/dist/SaberDistrictSelect.vue_vue_type_script_setup_true_lang-BX8nLC35.js +0 -257
- package/dist/SaberPopSelect.vue_vue_type_script_setup_true_lang-BcS27NXI.js +0 -125
- package/dist/SaberSwitchBar.vue_vue_type_script_setup_true_lang-CDx3Dcas.js +0 -47
- package/dist/plugin-Dr3z0YFg.js +0 -396
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { SaberControlSize } from '../../../control-size';
|
|
2
|
+
type SaberInputUI = Record<string, string | undefined>;
|
|
1
3
|
type __VLS_Props = {
|
|
2
4
|
clearable?: boolean;
|
|
5
|
+
size?: SaberControlSize;
|
|
6
|
+
ui?: SaberInputUI;
|
|
3
7
|
};
|
|
4
8
|
type __VLS_PublicProps = {
|
|
5
9
|
modelValue?: string | number | undefined;
|
|
@@ -11,6 +15,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
11
15
|
onChange?: ((value: string | number | undefined) => any) | undefined;
|
|
12
16
|
"onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
|
|
13
17
|
}>, {
|
|
18
|
+
size: SaberControlSize;
|
|
14
19
|
clearable: boolean;
|
|
15
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
21
|
export default _default;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
import { SaberControlSize } from '../../../control-size';
|
|
2
|
+
type SaberInputNumberUI = Record<string, string | undefined>;
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
size?: SaberControlSize;
|
|
5
|
+
ui?: SaberInputNumberUI;
|
|
6
|
+
};
|
|
1
7
|
type __VLS_PublicProps = {
|
|
2
8
|
modelValue?: number | undefined;
|
|
3
|
-
};
|
|
9
|
+
} & __VLS_Props;
|
|
4
10
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
11
|
change: (value: number | undefined) => any;
|
|
6
12
|
"update:modelValue": (value: number | undefined) => any;
|
|
7
13
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
8
14
|
onChange?: ((value: number | undefined) => any) | undefined;
|
|
9
15
|
"onUpdate:modelValue"?: ((value: number | undefined) => any) | undefined;
|
|
10
|
-
}>, {
|
|
16
|
+
}>, {
|
|
17
|
+
size: SaberControlSize;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
19
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SaberControlSize } from '../../../control-size';
|
|
1
2
|
import { PopSelectOption } from '../../types';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
items?: PopSelectOption[];
|
|
@@ -5,6 +6,7 @@ type __VLS_Props = {
|
|
|
5
6
|
multiple?: boolean;
|
|
6
7
|
clearable?: boolean;
|
|
7
8
|
disabled?: boolean;
|
|
9
|
+
size?: SaberControlSize;
|
|
8
10
|
};
|
|
9
11
|
type __VLS_PublicProps = {
|
|
10
12
|
modelValue?: any;
|
|
@@ -17,9 +19,10 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
17
19
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
18
20
|
}>, {
|
|
19
21
|
placeholder: string;
|
|
22
|
+
size: SaberControlSize;
|
|
23
|
+
items: PopSelectOption[];
|
|
20
24
|
disabled: boolean;
|
|
21
25
|
multiple: boolean;
|
|
22
26
|
clearable: boolean;
|
|
23
|
-
items: PopSelectOption[];
|
|
24
27
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
28
|
export default _default;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
import { SaberControlSize } from '../../../control-size';
|
|
2
|
+
type SaberSelectUI = Record<string, string | undefined>;
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
size?: SaberControlSize;
|
|
5
|
+
ui?: SaberSelectUI;
|
|
6
|
+
};
|
|
1
7
|
type __VLS_PublicProps = {
|
|
2
8
|
modelValue?: any;
|
|
3
|
-
};
|
|
9
|
+
} & __VLS_Props;
|
|
4
10
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
11
|
change: (value: any) => any;
|
|
6
12
|
"update:modelValue": (value: any) => any;
|
|
7
13
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
8
14
|
onChange?: ((value: any) => any) | undefined;
|
|
9
15
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
10
|
-
}>, {
|
|
16
|
+
}>, {
|
|
17
|
+
size: SaberControlSize;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
19
|
export default _default;
|
package/dist/forms/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { SaberControlSize } from '../control-size';
|
|
1
2
|
export { default as SaberFilterBar } from './components/SaberFilterBar.vue';
|
|
2
3
|
export { default as SaberFormModal } from './components/SaberFormModal.vue';
|
|
3
4
|
export { default as SaberModal } from './components/SaberModal.vue';
|
package/dist/forms.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { F as r, _ as s, a as o, b as t, c as i, d as c, e as m, f as S, g as p, h as b, i as l, j as u, k as D, l as f, r as x, u as n } from "./plugin-
|
|
1
|
+
import { F as r, _ as s, a as o, b as t, c as i, d as c, e as m, f as S, g as p, h as b, i as l, j as u, k as D, l as f, r as x, u as n } from "./plugin-DvH6j00c.js";
|
|
2
2
|
import { _ } from "./SaberModal.vue_vue_type_script_setup_true_lang-DJno3jA3.js";
|
|
3
3
|
import { _ as g } from "./SaberDictCheckbox.vue_vue_type_script_setup_true_lang-DUbzy_C6.js";
|
|
4
4
|
import { _ as v, a as R } from "./SaberDictRadio.vue_vue_type_script_setup_true_lang-DR6-jSID.js";
|
|
5
|
-
import { _ as C } from "./SaberDictSelect.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as K } from "./SaberPopSelect.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as U } from "./SaberDistrictSelect.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as C } from "./SaberDictSelect.vue_vue_type_script_setup_true_lang-BKdOdlFX.js";
|
|
6
|
+
import { _ as K } from "./SaberPopSelect.vue_vue_type_script_setup_true_lang-eH8jkkzK.js";
|
|
7
|
+
import { _ as U } from "./SaberDistrictSelect.vue_vue_type_script_setup_true_lang-jkl2AOay.js";
|
|
8
8
|
import { _ as k } from "./SaberUploadImage.vue_vue_type_script_setup_true_lang-CAwci2Vr.js";
|
|
9
9
|
import { D as G, u as j } from "./use-dict-options-DjtbYYIa.js";
|
|
10
10
|
import { U as N } from "./upload-image-source-On8NHgmx.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { default as SaberConfirmProvider } from './components/SaberConfirmProvid
|
|
|
6
6
|
import { default as SaberInfo } from './components/SaberInfo.vue';
|
|
7
7
|
import { default as SaberInfoProvider } from './components/SaberInfoProvider.vue';
|
|
8
8
|
import { default as SaberModalWithMobile } from './components/SaberModalWithMobile.vue';
|
|
9
|
+
import { default as SaberPagination } from './components/SaberPagination.vue';
|
|
9
10
|
import { default as SaberStatus } from './components/SaberStatus.vue';
|
|
10
11
|
import { default as SaberSwitchBar } from './components/SaberSwitchBar.vue';
|
|
11
12
|
import { default as SaberAppLayout } from './components/layout/SaberAppLayout.vue';
|
|
@@ -25,6 +26,7 @@ import { default as SaberRadioGroup } from './forms/components/fields/SaberRadio
|
|
|
25
26
|
import { default as SaberSelect } from './forms/components/fields/SaberSelect.vue';
|
|
26
27
|
import { default as SaberTextarea } from './forms/components/fields/SaberTextarea.vue';
|
|
27
28
|
import { SaberFormsOptions } from './forms/plugin';
|
|
29
|
+
export type { SaberControlSize } from './control-size';
|
|
28
30
|
export interface SaberUIOptions {
|
|
29
31
|
forms?: SaberFormsOptions;
|
|
30
32
|
}
|
|
@@ -34,7 +36,7 @@ export { BadgeStatus as SaberBadgeStatus };
|
|
|
34
36
|
export type { BadgeStatusProps } from './BadgeStatus.types';
|
|
35
37
|
export { SaberNoData };
|
|
36
38
|
export type { SaberNoDataProps } from './SaberNoData.types';
|
|
37
|
-
export { SaberConfirmModal, SaberConfirmProvider, SaberInfo, SaberInfoProvider, SaberModalWithMobile, SaberAppLayout, SaberAppSidebar, SaberNavigationSearch, SaberStatus, SaberSwitchBar, };
|
|
39
|
+
export { SaberConfirmModal, SaberConfirmProvider, SaberInfo, SaberInfoProvider, SaberModalWithMobile, SaberPagination, SaberAppLayout, SaberAppSidebar, SaberNavigationSearch, SaberStatus, SaberSwitchBar, };
|
|
38
40
|
export type { SaberInfoContext, SaberInfoMode, SaberInfoProps, SaberInfoVariant } from './components/SaberInfo.types';
|
|
39
41
|
export type { SaberStatusType } from './components/SaberStatus.types';
|
|
40
42
|
export type { SaberSwitchBarItem, SaberSwitchBarUI, SaberSwitchBarValue } from './components/SaberSwitchBar.types';
|
|
@@ -53,6 +55,7 @@ declare module 'vue' {
|
|
|
53
55
|
SaberInfo: typeof SaberInfo;
|
|
54
56
|
SaberInfoProvider: typeof SaberInfoProvider;
|
|
55
57
|
SaberModalWithMobile: typeof SaberModalWithMobile;
|
|
58
|
+
SaberPagination: typeof SaberPagination;
|
|
56
59
|
SaberStatus: typeof SaberStatus;
|
|
57
60
|
SaberSwitchBar: typeof SaberSwitchBar;
|
|
58
61
|
SaberAppSidebar: typeof SaberAppSidebar;
|
package/dist/index.mjs
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import {
|
|
16
|
-
import { _ as
|
|
17
|
-
import { _ as
|
|
18
|
-
import { _ as
|
|
19
|
-
import {
|
|
20
|
-
import { _ as
|
|
21
|
-
import { _ as
|
|
22
|
-
import { _ as
|
|
23
|
-
|
|
1
|
+
import A from "@nuxt/ui/vue-plugin";
|
|
2
|
+
import V from "@nuxt/ui/components/Badge.vue";
|
|
3
|
+
import { defineComponent as h, computed as m, openBlock as u, createBlock as F, normalizeStyle as L, withCtx as O, createTextVNode as v, toDisplayString as S, createElementBlock as d, normalizeClass as c, createElementVNode as p, createVNode as $, createCommentVNode as b, renderSlot as y } from "vue";
|
|
4
|
+
import R from "@nuxt/ui/runtime/vue/components/Icon.vue";
|
|
5
|
+
import { _ as E } from "./SaberConfirmModal.vue_vue_type_script_setup_true_lang-Cqp9krYl.js";
|
|
6
|
+
import { _ as T } from "./SaberConfirmProvider.vue_vue_type_script_setup_true_lang-DUJ6ftNJ.js";
|
|
7
|
+
import { _ as W } from "./SaberInfo.vue_vue_type_script_setup_true_lang-B3W5VsGR.js";
|
|
8
|
+
import { _ as j } from "./SaberInfoProvider.vue_vue_type_script_setup_true_lang-3rF6bSCn.js";
|
|
9
|
+
import { _ as H } from "./SaberModalWithMobile.vue_vue_type_script_setup_true_lang-aQlToncY.js";
|
|
10
|
+
import G from "@nuxt/ui/components/Pagination.vue";
|
|
11
|
+
import K from "@nuxt/ui/components/Select.vue";
|
|
12
|
+
import { S as Z } from "./SaberPopSelect.vue_vue_type_script_setup_true_lang-eH8jkkzK.js";
|
|
13
|
+
import { _ as De } from "./SaberPopSelect.vue_vue_type_script_setup_true_lang-eH8jkkzK.js";
|
|
14
|
+
import { _ as q } from "./SaberStatus.vue_vue_type_script_setup_true_lang-D9aRVCow.js";
|
|
15
|
+
import { _ as J } from "./SaberSwitchBar.vue_vue_type_script_setup_true_lang-CIbFBx5r.js";
|
|
16
|
+
import { _ as Q } from "./SaberAppLayout.vue_vue_type_script_setup_true_lang-DaxscIFe.js";
|
|
17
|
+
import { _ as X } from "./SaberAppSidebar.vue_vue_type_script_setup_true_lang-Cwuj9VNi.js";
|
|
18
|
+
import { _ as Y } from "./SaberNavigationSearch.vue_vue_type_script_setup_true_lang-Bj96kMla.js";
|
|
19
|
+
import { k as ee } from "./plugin-DvH6j00c.js";
|
|
20
|
+
import { _ as Ae, a as Ve, b as Fe, c as Le, d as Oe, e as Re } from "./plugin-DvH6j00c.js";
|
|
21
|
+
import { _ as Te } from "./SaberModal.vue_vue_type_script_setup_true_lang-DJno3jA3.js";
|
|
22
|
+
import { _ as je } from "./SaberDictCheckbox.vue_vue_type_script_setup_true_lang-DUbzy_C6.js";
|
|
23
|
+
import { _ as Ge, a as Ke } from "./SaberDictRadio.vue_vue_type_script_setup_true_lang-DR6-jSID.js";
|
|
24
|
+
import { _ as qe } from "./SaberDictSelect.vue_vue_type_script_setup_true_lang-BKdOdlFX.js";
|
|
25
|
+
import { _ as Qe } from "./SaberDistrictSelect.vue_vue_type_script_setup_true_lang-jkl2AOay.js";
|
|
26
|
+
const z = {
|
|
24
27
|
red: { 500: "#ef4444", 600: "#dc2626" },
|
|
25
28
|
orange: { 500: "#f97316", 600: "#ea580c" },
|
|
26
29
|
amber: { 500: "#f59e0b", 600: "#d97706" },
|
|
@@ -43,16 +46,16 @@ const d = {
|
|
|
43
46
|
zinc: { 500: "#71717a", 600: "#52525b" },
|
|
44
47
|
neutral: { 500: "#737373", 600: "#525252" },
|
|
45
48
|
stone: { 500: "#78716c", 600: "#57534e" }
|
|
46
|
-
},
|
|
47
|
-
function
|
|
48
|
-
var
|
|
49
|
-
return ((
|
|
49
|
+
}, te = z.gray;
|
|
50
|
+
function D(e, a) {
|
|
51
|
+
var t, s;
|
|
52
|
+
return ((t = z[e]) == null ? void 0 : t[a]) ?? ((s = z[e]) == null ? void 0 : s[500]) ?? te[500];
|
|
50
53
|
}
|
|
51
|
-
function
|
|
52
|
-
const
|
|
53
|
-
return `rgba(${
|
|
54
|
+
function ae(e, a) {
|
|
55
|
+
const t = parseInt(e.slice(1, 3), 16), s = parseInt(e.slice(3, 5), 16), n = parseInt(e.slice(5, 7), 16);
|
|
56
|
+
return `rgba(${t}, ${s}, ${n}, ${a / 100})`;
|
|
54
57
|
}
|
|
55
|
-
const
|
|
58
|
+
const oe = /* @__PURE__ */ h({
|
|
56
59
|
__name: "BadgeStatus",
|
|
57
60
|
props: {
|
|
58
61
|
value: {},
|
|
@@ -61,40 +64,40 @@ const T = /* @__PURE__ */ _({
|
|
|
61
64
|
textColorWeight: { default: 500 }
|
|
62
65
|
},
|
|
63
66
|
setup(e) {
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
for (const
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
return { label:
|
|
67
|
+
const a = e, t = m(() => {
|
|
68
|
+
const n = String(a.value);
|
|
69
|
+
for (const l of a.config) {
|
|
70
|
+
const r = l.split(":");
|
|
71
|
+
if (r.length < 2) continue;
|
|
72
|
+
const g = r[0], _ = r[1], o = r[2] || "gray";
|
|
73
|
+
if (_ === n)
|
|
74
|
+
return { label: g, color: o };
|
|
72
75
|
}
|
|
73
|
-
return { label:
|
|
74
|
-
}),
|
|
75
|
-
const { color:
|
|
76
|
+
return { label: n, color: "gray" };
|
|
77
|
+
}), s = m(() => {
|
|
78
|
+
const { color: n } = t.value, l = D(n, 500), r = D(n, a.textColorWeight);
|
|
76
79
|
return {
|
|
77
|
-
backgroundColor:
|
|
78
|
-
color:
|
|
80
|
+
backgroundColor: ae(l, a.bgOpacity),
|
|
81
|
+
color: r
|
|
79
82
|
};
|
|
80
83
|
});
|
|
81
|
-
return (
|
|
82
|
-
const
|
|
83
|
-
return
|
|
84
|
-
style:
|
|
84
|
+
return (n, l) => {
|
|
85
|
+
const r = V;
|
|
86
|
+
return u(), F(r, {
|
|
87
|
+
style: L(s.value),
|
|
85
88
|
class: "inline-flex items-center rounded-full border-0 pt-0.75 pb-0.75 px-2 text-xs font-medium"
|
|
86
89
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
|
|
90
|
+
default: O(() => [
|
|
91
|
+
v(S(t.value.label), 1)
|
|
89
92
|
]),
|
|
90
93
|
_: 1
|
|
91
94
|
}, 8, ["style"]);
|
|
92
95
|
};
|
|
93
96
|
}
|
|
94
|
-
}),
|
|
97
|
+
}), re = { class: "rounded-md border border-accented p-3" }, se = { class: "flex flex-col gap-1" }, ne = { class: "text-base font-semibold mb-2 text-highlighted w-60" }, ie = {
|
|
95
98
|
key: 0,
|
|
96
99
|
class: "text-sm text-muted w-60"
|
|
97
|
-
},
|
|
100
|
+
}, le = { key: 0 }, ce = { key: 1 }, me = /* @__PURE__ */ h({
|
|
98
101
|
name: "SaberNoData",
|
|
99
102
|
__name: "SaberNoData",
|
|
100
103
|
props: {
|
|
@@ -105,65 +108,140 @@ const T = /* @__PURE__ */ _({
|
|
|
105
108
|
description: { default: "当前列表为空,还没有任何数据" }
|
|
106
109
|
},
|
|
107
110
|
setup(e) {
|
|
108
|
-
return (
|
|
109
|
-
const
|
|
110
|
-
return
|
|
111
|
-
class:
|
|
111
|
+
return (a, t) => {
|
|
112
|
+
const s = R;
|
|
113
|
+
return u(), d("div", {
|
|
114
|
+
class: c([
|
|
112
115
|
"flex flex-col items-center justify-center gap-6 rounded-md p-10 text-center bg-default",
|
|
113
116
|
e.border && "border border-accented",
|
|
114
|
-
|
|
117
|
+
a.$props.class
|
|
115
118
|
])
|
|
116
119
|
}, [
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
p("div", re, [
|
|
121
|
+
$(s, {
|
|
119
122
|
name: e.icon,
|
|
120
123
|
class: "size-5"
|
|
121
124
|
}, null, 8, ["name"])
|
|
122
125
|
]),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
e.description ? (
|
|
126
|
+
p("div", se, [
|
|
127
|
+
p("h4", ne, S(e.title), 1),
|
|
128
|
+
e.description ? (u(), d("p", ie, S(e.description), 1)) : b("", !0)
|
|
126
129
|
]),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
])) :
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
])) :
|
|
130
|
+
a.$slots.default ? (u(), d("div", le, [
|
|
131
|
+
y(a.$slots, "default")
|
|
132
|
+
])) : b("", !0),
|
|
133
|
+
a.$slots.extra ? (u(), d("p", ce, [
|
|
134
|
+
y(a.$slots, "extra")
|
|
135
|
+
])) : b("", !0)
|
|
133
136
|
], 2);
|
|
134
137
|
};
|
|
135
138
|
}
|
|
136
|
-
}),
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
}), ue = /* @__PURE__ */ h({
|
|
140
|
+
__name: "SaberPagination",
|
|
141
|
+
props: {
|
|
142
|
+
page: { default: 1 },
|
|
143
|
+
pageSize: { default: 10 },
|
|
144
|
+
total: {},
|
|
145
|
+
pageSizes: { default: () => [10, 20, 50, 100] },
|
|
146
|
+
size: { default: "lg" },
|
|
147
|
+
ui: {}
|
|
148
|
+
},
|
|
149
|
+
emits: ["update:page", "update:pageSize"],
|
|
150
|
+
setup(e, { emit: a }) {
|
|
151
|
+
const t = e, s = a, n = m({
|
|
152
|
+
get: () => t.page,
|
|
153
|
+
set: (o) => s("update:page", o)
|
|
154
|
+
}), l = m({
|
|
155
|
+
get: () => t.pageSize,
|
|
156
|
+
set: (o) => s("update:pageSize", o)
|
|
157
|
+
}), r = m(() => Z[t.size]), g = m(() => t.pageSizes.map((o) => ({ label: `${o} 条/页`, value: o }))), _ = m(() => {
|
|
158
|
+
var o, i, f;
|
|
159
|
+
return {
|
|
160
|
+
...(o = t.ui) == null ? void 0 : o.pageSizeUi,
|
|
161
|
+
base: [r.value.height, "text-sm rounded-sm saberButton", (f = (i = t.ui) == null ? void 0 : i.pageSizeUi) == null ? void 0 : f.base].filter(Boolean).join(" ")
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
return (o, i) => {
|
|
165
|
+
var B, C, I, k, N, U, P, w;
|
|
166
|
+
const f = K, M = G;
|
|
167
|
+
return u(), d("div", {
|
|
168
|
+
class: c(["flex w-full items-center justify-between", (B = t.ui) == null ? void 0 : B.root])
|
|
169
|
+
}, [
|
|
170
|
+
p("div", {
|
|
171
|
+
class: c(["flex flex-col gap-1", (C = t.ui) == null ? void 0 : C.info])
|
|
172
|
+
}, [
|
|
173
|
+
p("span", {
|
|
174
|
+
class: c(["text-xs mr-4", (I = t.ui) == null ? void 0 : I.total])
|
|
175
|
+
}, [
|
|
176
|
+
i[2] || (i[2] = v("总计 ", -1)),
|
|
177
|
+
p("b", null, S(t.total), 1),
|
|
178
|
+
i[3] || (i[3] = v(" 条", -1))
|
|
179
|
+
], 2),
|
|
180
|
+
o.$slots.tips ? (u(), d("div", {
|
|
181
|
+
key: 0,
|
|
182
|
+
class: c((k = t.ui) == null ? void 0 : k.tips)
|
|
183
|
+
}, [
|
|
184
|
+
y(o.$slots, "tips")
|
|
185
|
+
], 2)) : b("", !0)
|
|
186
|
+
], 2),
|
|
187
|
+
p("div", {
|
|
188
|
+
class: c(["flex items-center gap-2", (N = t.ui) == null ? void 0 : N.controls])
|
|
189
|
+
}, [
|
|
190
|
+
$(f, {
|
|
191
|
+
modelValue: l.value,
|
|
192
|
+
"onUpdate:modelValue": i[0] || (i[0] = (x) => l.value = x),
|
|
193
|
+
items: g.value,
|
|
194
|
+
ui: _.value,
|
|
195
|
+
size: r.value.nuxtSize,
|
|
196
|
+
class: c(["w-28", (U = t.ui) == null ? void 0 : U.pageSize])
|
|
197
|
+
}, null, 8, ["modelValue", "items", "ui", "size", "class"]),
|
|
198
|
+
$(M, {
|
|
199
|
+
page: n.value,
|
|
200
|
+
"onUpdate:page": i[1] || (i[1] = (x) => n.value = x),
|
|
201
|
+
size: r.value.nuxtSize,
|
|
202
|
+
"active-color": "primary",
|
|
203
|
+
"active-variant": "subtle",
|
|
204
|
+
total: t.total,
|
|
205
|
+
"items-per-page": l.value,
|
|
206
|
+
ui: (P = t.ui) == null ? void 0 : P.paginationUi,
|
|
207
|
+
class: c([r.value.paginationButtons, (w = t.ui) == null ? void 0 : w.pagination])
|
|
208
|
+
}, null, 8, ["page", "size", "total", "items-per-page", "ui", "class"])
|
|
209
|
+
], 2)
|
|
210
|
+
], 2);
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}), Ue = {
|
|
214
|
+
install(e, a = {}) {
|
|
215
|
+
e.use(A), e.component("SaberBadgeStatus", oe), e.component("SaberNoData", me), e.component("SaberConfirmModal", E), e.component("SaberConfirmProvider", T), e.component("SaberInfo", W), e.component("SaberInfoProvider", j), e.component("SaberModalWithMobile", H), e.component("SaberPagination", ue), e.component("SaberStatus", q), e.component("SaberSwitchBar", J), e.component("SaberAppSidebar", X), e.component("SaberNavigationSearch", Y), e.component("SaberAppLayout", Q), ee(e, a.forms);
|
|
139
216
|
}
|
|
140
217
|
};
|
|
141
218
|
export {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
219
|
+
Q as SaberAppLayout,
|
|
220
|
+
X as SaberAppSidebar,
|
|
221
|
+
oe as SaberBadgeStatus,
|
|
222
|
+
E as SaberConfirmModal,
|
|
223
|
+
T as SaberConfirmProvider,
|
|
224
|
+
je as SaberDictCheckbox,
|
|
225
|
+
Ge as SaberDictRadio,
|
|
226
|
+
qe as SaberDictSelect,
|
|
227
|
+
Qe as SaberDistrictSelect,
|
|
228
|
+
Ae as SaberFilterBar,
|
|
229
|
+
Ve as SaberFormModal,
|
|
230
|
+
W as SaberInfo,
|
|
231
|
+
j as SaberInfoProvider,
|
|
232
|
+
Fe as SaberInput,
|
|
233
|
+
Le as SaberInputNumber,
|
|
234
|
+
Te as SaberModal,
|
|
235
|
+
H as SaberModalWithMobile,
|
|
236
|
+
Y as SaberNavigationSearch,
|
|
237
|
+
me as SaberNoData,
|
|
238
|
+
ue as SaberPagination,
|
|
239
|
+
De as SaberPopSelect,
|
|
240
|
+
Ke as SaberRadioGroup,
|
|
241
|
+
Oe as SaberSelect,
|
|
242
|
+
q as SaberStatus,
|
|
243
|
+
J as SaberSwitchBar,
|
|
244
|
+
Re as SaberTextarea,
|
|
245
|
+
Ue as default,
|
|
246
|
+
ee as installSaberForms
|
|
169
247
|
};
|