@huyooo/ui 0.6.7 → 0.6.12

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.
@@ -0,0 +1,35 @@
1
+ import { c as s, g as t } from "./auth-bwwc2iT8.js";
2
+ function o(e) {
3
+ return s({
4
+ url: `${t.prefixUrl}/restfulApi/messageCenter/messageNotifications/own`,
5
+ method: "post",
6
+ data: e
7
+ });
8
+ }
9
+ function a(e) {
10
+ return s({
11
+ url: `${t.prefixUrl}/restfulApi/messageCenter/messageNotifications/findOne`,
12
+ method: "post",
13
+ data: e
14
+ });
15
+ }
16
+ function r(e) {
17
+ return s({
18
+ url: `${t.prefixUrl}/restfulApi/messageCenter/messageNotifications/read`,
19
+ method: "post",
20
+ data: e
21
+ });
22
+ }
23
+ function n(e) {
24
+ return s({
25
+ url: `${t.prefixUrl}/restfulApi/messageCenter/messageNotifications/readAll`,
26
+ method: "post",
27
+ data: e
28
+ });
29
+ }
30
+ export {
31
+ n as a,
32
+ r as b,
33
+ a as c,
34
+ o as m
35
+ };
@@ -1,16 +1,15 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
3
  /* empty css */
4
- /* empty css */
5
- import { defineComponent as C, createElementBlock as g, openBlock as s, normalizeStyle as ie, normalizeClass as se, createElementVNode as p, computed as P, createBlock as d, createCommentVNode as m, createVNode as c, unref as o, withCtx as l, createTextVNode as y, toDisplayString as S, mergeModels as D, useModel as re, renderSlot as ae, ref as f, Fragment as De } from "vue";
6
- import { Tag as Ve, Button as le, Avatar as ue, Dropdown as Re, Divider as ce, Doption as h } from "@arco-design/web-vue";
7
- import { S as ze } from "./PaySubscriptions-C9LA8ZeX.js";
8
- import { R as Ne } from "./ReferrerReferees-CnYkGC5r.js";
9
- import { a as N, u as Le } from "./useAuthkitUsersProfile-hZ9L3rYe.js";
10
- import { u as je, g as oe } from "./auth-bwwc2iT8.js";
11
- import { c as He, A as Fe } from "./AuthkitAuthModal-GorxR6ZJ.js";
4
+ import { c as De, A as Ve } from "./AuthkitAuthModal-Bfcu3xeg.js";
5
+ import { defineComponent as C, createElementBlock as g, openBlock as s, normalizeStyle as ie, normalizeClass as se, createElementVNode as p, computed as P, createBlock as d, createCommentVNode as m, createVNode as c, unref as o, withCtx as l, createTextVNode as y, toDisplayString as S, mergeModels as D, useModel as re, renderSlot as ae, ref as f, Fragment as Re } from "vue";
6
+ import { Tag as ze, Button as le, Avatar as ue, Dropdown as Ne, Divider as ce, Doption as h } from "@arco-design/web-vue";
7
+ import { S as Le } from "./PaySubscriptions-C9LA8ZeX.js";
8
+ import { R as je } from "./ReferrerReferees-CnYkGC5r.js";
9
+ import { a as N, u as He } from "./useAuthkitUsersProfile-hZ9L3rYe.js";
10
+ import { u as Fe, g as oe } from "./auth-bwwc2iT8.js";
12
11
  import { d as qe } from "./FeedbackModal-scDtV6-8.js";
13
- import { M as Ee } from "./MessageHandle-BlsLRmdj.js";
12
+ import { M as Ee } from "./MessageHandle-CRKV0GBm.js";
14
13
  /* empty css */
15
14
  /* empty css */
16
15
  import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -182,7 +181,7 @@ const Ze = Object.assign(z, {
182
181
  function u() {
183
182
  r("upgradeHandle");
184
183
  }
185
- return (v, i) => (s(), g("div", et, [p("div", tt, [p("div", nt, [i[0] || (i[0] = p("span", null, "我的订阅:", -1)), c(o(Ve), {
184
+ return (v, i) => (s(), g("div", et, [p("div", tt, [p("div", nt, [i[0] || (i[0] = p("span", null, "我的订阅:", -1)), c(o(ze), {
186
185
  color: "arcoblue",
187
186
  style: {
188
187
  "border-radius": "6px"
@@ -300,7 +299,7 @@ const Ze = Object.assign(z, {
300
299
  r("toSignIn");
301
300
  }
302
301
  const b = re(e, "modelValue");
303
- return ($, k) => o(v) ? (s(), d(o(Re), {
302
+ return ($, k) => o(v) ? (s(), d(o(Ne), {
304
303
  key: 1,
305
304
  popupVisible: b.value,
306
305
  "onUpdate:popupVisible": k[0] || (k[0] = (_) => b.value = _),
@@ -389,7 +388,7 @@ const Ze = Object.assign(z, {
389
388
  addSignInCallback: _,
390
389
  initializeAuth: B,
391
390
  clearAuth: A
392
- } = Le();
391
+ } = He();
393
392
  B() && b();
394
393
  const O = f(), L = f(Symbol("key")), j = f(), H = f(), me = f(Symbol("key")), ve = f(), ke = f(Symbol("key"));
395
394
  function ye(q) {
@@ -402,7 +401,7 @@ const Ze = Object.assign(z, {
402
401
  }
403
402
  const {
404
403
  show: _e
405
- } = je(), F = re(e, "modelValue");
404
+ } = Fe(), F = re(e, "modelValue");
406
405
  function be() {
407
406
  L.value = Symbol("key");
408
407
  }
@@ -553,27 +552,27 @@ const Ze = Object.assign(z, {
553
552
  })) : m("", !0)];
554
553
  }),
555
554
  _: 1
556
- }, 8, ["modelValue", "position", "dropdown-offset-x", "dropdown-offset-y"]), (s(), d(He, {
555
+ }, 8, ["modelValue", "position", "dropdown-offset-x", "dropdown-offset-y"]), (s(), d(De, {
557
556
  ref_key: "AuthModalRef",
558
557
  ref: ve,
559
558
  key: ke.value,
560
559
  size: "large",
561
560
  onToPrivacyPolicy: ye,
562
561
  onToUserServiceAgreement: ge
563
- })), o(k) ? (s(), g(De, {
562
+ })), o(k) ? (s(), g(Re, {
564
563
  key: 0
565
- }, [(s(), d(Fe, {
564
+ }, [(s(), d(Ve, {
566
565
  ref_key: "AppSettingRef",
567
566
  ref: V,
568
567
  key: M.value,
569
568
  onConfirm: Ie,
570
569
  onCancel: we
571
- })), (s(), d(Ne, {
570
+ })), (s(), d(je, {
572
571
  ref_key: "RefereesRef",
573
572
  ref: O,
574
573
  key: L.value,
575
574
  onCancel: be
576
- })), (s(), d(ze, {
575
+ })), (s(), d(Le, {
577
576
  ref_key: "SubscriptionsRef",
578
577
  ref: H,
579
578
  key: me.value,
@@ -591,7 +590,7 @@ const Ze = Object.assign(z, {
591
590
  onCancel: he
592
591
  }))], 64)) : m("", !0)]));
593
592
  }
594
- }), Xt = /* @__PURE__ */ I(St, [["__scopeId", "data-v-656b2ccb"]]), Ct = {
593
+ }), Wt = /* @__PURE__ */ I(St, [["__scopeId", "data-v-656b2ccb"]]), Ct = {
595
594
  class: "UserAccountMenu"
596
595
  }, ht = {
597
596
  class: "avatar"
@@ -623,12 +622,12 @@ const Ze = Object.assign(z, {
623
622
  })])]);
624
623
  };
625
624
  }
626
- }), Yt = /* @__PURE__ */ I(Ot, [["__scopeId", "data-v-b801e222"]]);
625
+ }), Xt = /* @__PURE__ */ I(Ot, [["__scopeId", "data-v-b801e222"]]);
627
626
  export {
628
627
  it as S,
629
628
  lt as U,
630
629
  vt as a,
631
630
  _t as b,
632
- Xt as c,
633
- Yt as d
631
+ Wt as c,
632
+ Xt as d
634
633
  };
@@ -10,11 +10,11 @@ import "./useUploadCos-EWMNJjRf.js";
10
10
  import { useRouter as j, useRoute as J } from "vue-router";
11
11
  /* empty css */
12
12
  /* empty css */
13
- import { d as re, c as Q } from "./UserAccountMenu-DYrrql9-.js";
14
- /* empty css */
13
+ import { d as re, c as Q } from "./UserAccountMenu-B8dw6I3n.js";
15
14
  /* empty css */
16
15
  /* empty css */
17
16
  /* empty css */
17
+ import "./AuthkitAuthModal-Bfcu3xeg.js";
18
18
  import { M as ce } from "./Menu-BjWB9hre.js";
19
19
  import "./CollapseItem-Cw1vcdLu.js";
20
20
  /* empty css */
@@ -1,2 +1,46 @@
1
- export declare function changelogNotificationsFind(data: any): Promise<import('axios').AxiosResponse<any, any>>;
2
- export declare function changelogNotificationsFindOne(data: any): Promise<import('axios').AxiosResponse<any, any>>;
1
+ /** 更新类型 */
2
+ type ChangeType = 'feature' | 'improvement' | 'fix' | 'security' | 'breaking';
3
+ /** 操作者信息 */
4
+ interface OperatorInfo {
5
+ id: string;
6
+ email?: string;
7
+ phone?: string;
8
+ avatar?: string;
9
+ avatarUrl?: string;
10
+ nickname?: string;
11
+ }
12
+ /** 更新日志 */
13
+ interface ChangelogNotification {
14
+ id: string;
15
+ appId: string;
16
+ title: string;
17
+ version: string;
18
+ description: string;
19
+ content: Record<string, unknown> | null;
20
+ changeType: ChangeType;
21
+ publishedAt: string | null;
22
+ creator: OperatorInfo | null;
23
+ updator: OperatorInfo | null;
24
+ createAt: string;
25
+ updateAt: string;
26
+ }
27
+ /** 查询参数 */
28
+ interface FindParams {
29
+ current: number;
30
+ pageSize: number;
31
+ where?: {
32
+ title?: string;
33
+ version?: string;
34
+ changeType?: ChangeType;
35
+ };
36
+ }
37
+ /** 查询结果 */
38
+ interface FindResult {
39
+ items: ChangelogNotification[];
40
+ count: number;
41
+ }
42
+ export declare function changelogNotificationsFind(data: FindParams): Promise<import('axios').AxiosResponse<FindResult, any>>;
43
+ export declare function changelogNotificationsFindOne(data: {
44
+ id: string;
45
+ }): Promise<import('axios').AxiosResponse<ChangelogNotification, any>>;
46
+ export {};
@@ -1,2 +1,49 @@
1
- export declare function eventNotificationsFind(data: any): Promise<import('axios').AxiosResponse<any, any>>;
2
- export declare function eventNotificationsFindOne(data: any): Promise<import('axios').AxiosResponse<any, any>>;
1
+ /** 活动状态(存储用) */
2
+ type EventStatus = 'draft' | 'published';
3
+ /** 活动显示状态(展示用) */
4
+ type EventDisplayStatus = 'draft' | 'upcoming' | 'ongoing' | 'ended' | 'published';
5
+ /** 操作者信息 */
6
+ interface OperatorInfo {
7
+ id: string;
8
+ email?: string;
9
+ phone?: string;
10
+ avatar?: string;
11
+ avatarUrl?: string;
12
+ nickname?: string;
13
+ }
14
+ /** 活动通知 */
15
+ interface EventNotification {
16
+ id: string;
17
+ appId: string;
18
+ title: string;
19
+ description: string;
20
+ content: Record<string, unknown> | null;
21
+ status: EventStatus;
22
+ displayStatus: EventDisplayStatus;
23
+ startAt: string | null;
24
+ endAt: string | null;
25
+ pinned: boolean;
26
+ creator: OperatorInfo | null;
27
+ updator: OperatorInfo | null;
28
+ createAt: string;
29
+ updateAt: string;
30
+ }
31
+ /** 查询参数 */
32
+ interface FindParams {
33
+ current: number;
34
+ pageSize: number;
35
+ where?: {
36
+ title?: string;
37
+ status?: EventStatus;
38
+ };
39
+ }
40
+ /** 查询结果 */
41
+ interface FindResult {
42
+ items: EventNotification[];
43
+ count: number;
44
+ }
45
+ export declare function eventNotificationsFind(data: FindParams): Promise<import('axios').AxiosResponse<FindResult, any>>;
46
+ export declare function eventNotificationsFindOne(data: {
47
+ id: string;
48
+ }): Promise<import('axios').AxiosResponse<EventNotification, any>>;
49
+ export {};
@@ -1,5 +1,55 @@
1
- export declare function messageNotificationsFind(data: any): Promise<import('axios').AxiosResponse<any, any>>;
2
- export declare function messageNotificationsOwn(data: any): Promise<import('axios').AxiosResponse<any, any>>;
3
- export declare function messageNotificationsFindOne(data: any): Promise<import('axios').AxiosResponse<any, any>>;
4
- export declare function messageNotificationsRead(data: any): Promise<import('axios').AxiosResponse<any, any>>;
5
- export declare function messageNotificationsReadAll(data: any): Promise<import('axios').AxiosResponse<any, any>>;
1
+ /** 消息优先级 */
2
+ type MessagePriority = 'urgent' | 'high' | 'normal' | 'low';
3
+ /** 操作者信息 */
4
+ interface OperatorInfo {
5
+ id: string;
6
+ email?: string;
7
+ phone?: string;
8
+ avatar?: string;
9
+ avatarUrl?: string;
10
+ nickname?: string;
11
+ }
12
+ /** 消息通知 */
13
+ interface MessageNotification {
14
+ id: string;
15
+ appId: string;
16
+ title: string;
17
+ description: string;
18
+ content: Record<string, unknown> | null;
19
+ type: string;
20
+ priority: MessagePriority;
21
+ creator: OperatorInfo | null;
22
+ updator: OperatorInfo | null;
23
+ createAt: string;
24
+ updateAt: string;
25
+ read?: boolean;
26
+ readAt?: string | null;
27
+ }
28
+ /** 查询参数 */
29
+ interface FindParams {
30
+ current: number;
31
+ pageSize: number;
32
+ where: {
33
+ title?: string;
34
+ type?: string;
35
+ priority?: MessagePriority;
36
+ read?: boolean;
37
+ };
38
+ }
39
+ /** 查询结果 */
40
+ interface FindResult {
41
+ items: MessageNotification[];
42
+ count: number;
43
+ }
44
+ export declare function messageNotificationsFind(data: FindParams): Promise<import('axios').AxiosResponse<FindResult, any>>;
45
+ export declare function messageNotificationsOwn(data: FindParams): Promise<import('axios').AxiosResponse<FindResult, any>>;
46
+ export declare function messageNotificationsFindOne(data: {
47
+ id: string;
48
+ }): Promise<import('axios').AxiosResponse<MessageNotification, any>>;
49
+ export declare function messageNotificationsRead(data: {
50
+ messageId: string;
51
+ }): Promise<import('axios').AxiosResponse<any, any>>;
52
+ export declare function messageNotificationsReadAll(data: {
53
+ type: string;
54
+ }): Promise<import('axios').AxiosResponse<any, any>>;
55
+ export {};
@@ -1,2 +1,54 @@
1
- export declare function noticeNotificationsFind(data: any): Promise<import('axios').AxiosResponse<any, any>>;
2
- export declare function noticeNotificationsFindOne(data: any): Promise<import('axios').AxiosResponse<any, any>>;
1
+ /** 公告优先级 */
2
+ type NoticePriority = 'urgent' | 'important' | 'normal';
3
+ /** 公告状态(存储用) */
4
+ type NoticeStatus = 'draft' | 'published';
5
+ /** 公告显示状态(展示用) */
6
+ type NoticeDisplayStatus = 'draft' | 'published' | 'expired';
7
+ /** 操作者信息 */
8
+ interface OperatorInfo {
9
+ id: string;
10
+ email?: string;
11
+ phone?: string;
12
+ avatar?: string;
13
+ avatarUrl?: string;
14
+ nickname?: string;
15
+ }
16
+ /** 公告通知 */
17
+ interface NoticeNotification {
18
+ id: string;
19
+ appId: string;
20
+ title: string;
21
+ description: string;
22
+ content: Record<string, unknown> | null;
23
+ priority: NoticePriority;
24
+ status: NoticeStatus;
25
+ displayStatus: NoticeDisplayStatus;
26
+ pinned: boolean;
27
+ requireConfirm: boolean;
28
+ expireAt: string | null;
29
+ publishedAt: string | null;
30
+ creator: OperatorInfo | null;
31
+ updator: OperatorInfo | null;
32
+ createAt: string;
33
+ updateAt: string;
34
+ }
35
+ /** 查询参数 */
36
+ interface FindParams {
37
+ current: number;
38
+ pageSize: number;
39
+ where?: {
40
+ title?: string;
41
+ priority?: NoticePriority;
42
+ status?: NoticeStatus;
43
+ };
44
+ }
45
+ /** 查询结果 */
46
+ interface FindResult {
47
+ items: NoticeNotification[];
48
+ count: number;
49
+ }
50
+ export declare function noticeNotificationsFind(data: FindParams): Promise<import('axios').AxiosResponse<FindResult, any>>;
51
+ export declare function noticeNotificationsFindOne(data: {
52
+ id: string;
53
+ }): Promise<import('axios').AxiosResponse<NoticeNotification, any>>;
54
+ export {};
package/dist/authkit.js CHANGED
@@ -1,5 +1,5 @@
1
- import { A as i, a as u, c as s, b as h, n as A, E as e, k, l as o, _ as r, O as n, _ as d, O as p, f as m, o as P, P as f, j as l, R as S, S as g, i as O, m as c, d as w, e as U, g as I, h as b, p as x, u as C } from "./AuthkitAuthModal-GorxR6ZJ.js";
2
- import { A as y, a as B, c as R, d as V, b as v, b as L, f as M, e as _ } from "./AuthkitSignInPhone-CLW_u8AY.js";
1
+ import { A as i, a as u, c as s, b as h, n as A, E as e, k, l as o, _ as r, O as n, _ as d, O as p, f as m, o as P, P as f, j as l, R as S, S as g, i as O, m as c, d as w, e as U, g as I, h as b, p as x, u as C } from "./AuthkitAuthModal-Bfcu3xeg.js";
2
+ import { A as y, a as B, c as R, d as V, b as v, b as L, f as M, e as _ } from "./AuthkitSignInPhone-CZGGn8Ax.js";
3
3
  import { u as z } from "./useAuthkitAppsAuthPageInfo-CzZmhPMm.js";
4
4
  import { u as T, a as q } from "./useAuthkitUsersProfile-hZ9L3rYe.js";
5
5
  import { u as F } from "./auth-bwwc2iT8.js";
package/dist/common.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as s, a as o, C as t, D as r, G as p, H as n, b as l, L as u, S as C, W as d } from "./WidthContainer-DwmXFEFt.js";
1
+ import { A as s, a as o, C as t, D as r, G as p, H as n, b as l, L as u, S as C, W as d } from "./WidthContainer-CdCvKjzU.js";
2
2
  import { C as i, a as f } from "./CollapseItem-Cw1vcdLu.js";
3
3
  import { C as x, E as H } from "./CustomTable-BCOwLyRJ.js";
4
4
  import { M, a as g } from "./Menu-BjWB9hre.js";
@@ -24,8 +24,8 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
24
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
25
25
  email: string;
26
26
  phone: string;
27
- address: string;
28
27
  title: string;
28
+ address: string;
29
29
  subTitle: string;
30
30
  contact: {
31
31
  title?: string;
@@ -0,0 +1,40 @@
1
+ declare const _default: <T extends {
2
+ id: string;
3
+ title: string;
4
+ description: string;
5
+ createAt: string;
6
+ pinned?: boolean;
7
+ read?: boolean;
8
+ priority?: string;
9
+ }>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
11
+ readonly onClick?: ((item: T) => any) | undefined;
12
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onClick"> & {
13
+ item: T;
14
+ showReadStatus?: boolean;
15
+ showViewButton?: boolean;
16
+ } & Partial<{}>> & import('vue').PublicProps;
17
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
18
+ attrs: any;
19
+ slots: {
20
+ tags?(_: {
21
+ item: T;
22
+ }): any;
23
+ description?(_: {
24
+ item: T;
25
+ }): any;
26
+ footer?(_: {
27
+ item: T;
28
+ }): any;
29
+ actions?(_: {
30
+ item: T;
31
+ }): any;
32
+ };
33
+ emit: (evt: "click", item: T) => void;
34
+ }>) => import('vue').VNode & {
35
+ __ctx?: Awaited<typeof __VLS_setup>;
36
+ };
37
+ export default _default;
38
+ type __VLS_PrettifyLocal<T> = {
39
+ [K in keyof T]: T[K];
40
+ } & {};
@@ -1,101 +1,40 @@
1
- import { PropType } from 'vue';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
1
+ declare const _default: <T extends {
2
+ id: string;
3
+ title: string;
4
+ description: string;
5
+ createAt: string;
6
+ }>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
8
+ readonly onItemClick?: ((item: T) => any) | undefined;
9
+ readonly onLoadMore?: (() => any) | undefined;
10
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onItemClick" | "onLoadMore"> & {
11
+ messageList: T[];
12
+ loading?: boolean;
13
+ finished?: boolean;
14
+ showReadStatus?: boolean;
15
+ showViewButton?: boolean;
16
+ } & Partial<{}>> & import('vue').PublicProps;
17
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
18
+ attrs: any;
4
19
  slots: {
5
- title?(_: {
6
- item: {
7
- title: string;
8
- description: string;
9
- createAt: string;
10
- };
11
- index: number;
20
+ tags?(_: {
21
+ item: T;
12
22
  }): any;
13
23
  description?(_: {
14
- item: {
15
- title: string;
16
- description: string;
17
- createAt: string;
18
- };
19
- index: number;
24
+ item: T;
20
25
  }): any;
21
- createAt?(_: {
22
- item: {
23
- title: string;
24
- description: string;
25
- createAt: string;
26
- };
27
- index: number;
26
+ footer?(_: {
27
+ item: T;
28
28
  }): any;
29
- handle?(_: {
30
- item: {
31
- title: string;
32
- description: string;
33
- createAt: string;
34
- };
35
- index: number;
29
+ actions?(_: {
30
+ item: T;
36
31
  }): any;
37
32
  };
38
- refs: {};
39
- rootEl: any;
33
+ emit: ((evt: "itemClick", item: T) => void) & ((evt: "loadMore") => void);
34
+ }>) => import('vue').VNode & {
35
+ __ctx?: Awaited<typeof __VLS_setup>;
40
36
  };
41
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
42
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
43
- messageList: {
44
- type: PropType<Array<{
45
- title: string;
46
- description: string;
47
- createAt: string;
48
- }>>;
49
- required: true;
50
- };
51
- loading: {
52
- type: BooleanConstructor;
53
- default: boolean;
54
- };
55
- finished: {
56
- type: BooleanConstructor;
57
- default: boolean;
58
- };
59
- showButton: {
60
- type: BooleanConstructor;
61
- default: boolean;
62
- };
63
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
64
- infinite: (...args: any[]) => void;
65
- openDetails: (...args: any[]) => void;
66
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
67
- messageList: {
68
- type: PropType<Array<{
69
- title: string;
70
- description: string;
71
- createAt: string;
72
- }>>;
73
- required: true;
74
- };
75
- loading: {
76
- type: BooleanConstructor;
77
- default: boolean;
78
- };
79
- finished: {
80
- type: BooleanConstructor;
81
- default: boolean;
82
- };
83
- showButton: {
84
- type: BooleanConstructor;
85
- default: boolean;
86
- };
87
- }>> & Readonly<{
88
- onInfinite?: ((...args: any[]) => any) | undefined;
89
- onOpenDetails?: ((...args: any[]) => any) | undefined;
90
- }>, {
91
- loading: boolean;
92
- finished: boolean;
93
- showButton: boolean;
94
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
95
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
96
37
  export default _default;
97
- type __VLS_WithTemplateSlots<T, S> = T & {
98
- new (): {
99
- $slots: S;
100
- };
101
- };
38
+ type __VLS_PrettifyLocal<T> = {
39
+ [K in keyof T]: T[K];
40
+ } & {};
@@ -0,0 +1,52 @@
1
+ import { Ref } from 'vue';
2
+ /** 分页参数 */
3
+ interface PaginationParams {
4
+ current: number;
5
+ pageSize: number;
6
+ }
7
+ /** API 返回结果 */
8
+ interface FetchResult<T> {
9
+ data: {
10
+ items: T[];
11
+ count: number;
12
+ };
13
+ }
14
+ /** 获取数据函数类型 */
15
+ type FetchFunction<T> = (params: {
16
+ current: number;
17
+ pageSize: number;
18
+ where: Record<string, unknown>;
19
+ }) => Promise<FetchResult<T>>;
20
+ /**
21
+ * 消息列表通用 composable
22
+ * 统一处理列表加载、分页、滚动加载等逻辑
23
+ */
24
+ export declare function useMessageList<T>(fetchFn: FetchFunction<T>, options?: {
25
+ pageSize?: number;
26
+ where?: Record<string, unknown>;
27
+ }): {
28
+ isList: Ref<boolean, boolean>;
29
+ detailId: Ref<string, string>;
30
+ loading: Ref<boolean, boolean>;
31
+ finished: Ref<boolean, boolean>;
32
+ messageList: Ref<T[], T[]>;
33
+ pagination: Ref<{
34
+ current: number;
35
+ pageSize: number;
36
+ total: number;
37
+ }, (PaginationParams & {
38
+ total: number;
39
+ }) | {
40
+ current: number;
41
+ pageSize: number;
42
+ total: number;
43
+ }>;
44
+ loadData: () => Promise<void>;
45
+ loadMore: () => Promise<void>;
46
+ refresh: () => Promise<void>;
47
+ toList: () => void;
48
+ openDetail: (item: {
49
+ id: string;
50
+ }) => void;
51
+ };
52
+ export {};