bilitoolkit-ui 0.1.0 → 0.1.2

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/index.d.ts CHANGED
@@ -164,6 +164,10 @@ declare type __VLS_Props_22 = {
164
164
  small?: boolean;
165
165
  };
166
166
 
167
+ declare type __VLS_Props_23 = {
168
+ content: string;
169
+ };
170
+
167
171
  declare type __VLS_Props_3 = CountdownDialogProps;
168
172
 
169
173
  declare type __VLS_Props_4 = PageRangeDialogProps;
@@ -1344,12 +1348,12 @@ export declare const blackColor = "#000000";
1344
1348
  declare const CountdownDialog_2: DefineComponent<__VLS_PublicProps, {
1345
1349
  show: () => void;
1346
1350
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1347
- onConfirm: (...args: any[]) => void;
1348
1351
  onCancel: (...args: any[]) => void;
1352
+ onConfirm: (...args: any[]) => void;
1349
1353
  "update:modelValue": (value: boolean) => void;
1350
1354
  }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
1351
- onOnConfirm?: ((...args: any[]) => any) | undefined;
1352
1355
  onOnCancel?: ((...args: any[]) => any) | undefined;
1356
+ onOnConfirm?: ((...args: any[]) => any) | undefined;
1353
1357
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
1354
1358
  }>, {
1355
1359
  title: string;
@@ -1455,6 +1459,8 @@ export declare const handleError: (error: unknown) => void;
1455
1459
 
1456
1460
  export declare const handleOpenFolder: (task: DownloadTask) => Promise<void>;
1457
1461
 
1462
+ export declare const handleOpenSpace: (mid: number) => void;
1463
+
1458
1464
  export declare const handlePause: (task: DownloadTask) => Promise<void>;
1459
1465
 
1460
1466
  export declare const handleResume: (task: DownloadTask) => Promise<void>;
@@ -1515,13 +1521,13 @@ export { KeyValueTag_2 as KeyValueTag }
1515
1521
  * 全局加载框
1516
1522
  */
1517
1523
  export declare const loadingDialog: {
1518
- show(options?: LoadingDialogOptions): void;
1524
+ show(options?: LoadingDialogOptions | string): void;
1519
1525
  update(message: string): void;
1520
1526
  close(): void;
1521
1527
  };
1522
1528
 
1523
1529
  declare const LoadingDialog_2: DefineComponent< {}, {
1524
- show: (options?: LoadingDialogOptions) => void;
1530
+ show: (options?: LoadingDialogOptions | string) => void;
1525
1531
  update: (text: string) => void;
1526
1532
  close: () => void;
1527
1533
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
@@ -1537,6 +1543,11 @@ export declare interface LoadingDialogOptions {
1537
1543
  autoCloseDelay?: number;
1538
1544
  }
1539
1545
 
1546
+ declare interface LoadingTaskContext {
1547
+ user: UserInfoWithCookie;
1548
+ signal: AbortSignal;
1549
+ }
1550
+
1540
1551
  declare const LogPrint_2: DefineComponent< {}, {
1541
1552
  addLog: typeof addLog;
1542
1553
  reset: () => void;
@@ -1545,6 +1556,12 @@ logBoxRef: HTMLDivElement;
1545
1556
  }, HTMLDivElement>;
1546
1557
  export { LogPrint_2 as LogPrint }
1547
1558
 
1559
+ declare const OverflowText_2: DefineComponent<__VLS_Props_23, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_23> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
1560
+ containerRef: HTMLDivElement;
1561
+ textRef: HTMLSpanElement;
1562
+ }, any>;
1563
+ export { OverflowText_2 as OverflowText }
1564
+
1548
1565
  export declare interface PageData {
1549
1566
  pageNum: number;
1550
1567
  pageSize: number;
@@ -1906,6 +1923,13 @@ export declare const useElementHeight: <H extends HTMLElement = HTMLElement>(ref
1906
1923
  updateHeight: () => void;
1907
1924
  };
1908
1925
 
1926
+ export declare function useElementScrollbar(el: MaybeRefOrGetter<HTMLElement | undefined>): {
1927
+ hasHorizontalScrollbar: Ref<boolean, boolean>;
1928
+ hasVerticalScrollbar: Ref<boolean, boolean>;
1929
+ hasScrollbar: Ref<boolean, boolean>;
1930
+ checkScrollbar: () => void;
1931
+ };
1932
+
1909
1933
  /**
1910
1934
  * 封装的数据加载函数,方便关联返回的 loading
1911
1935
  */
@@ -1921,6 +1945,21 @@ declare interface UseLoadingDataOptions {
1921
1945
  singleFlight?: boolean;
1922
1946
  }
1923
1947
 
1948
+ /**
1949
+ * 封装异步任务执行,自动管理加载状态
1950
+ */
1951
+ export declare const useLoadingTask: <TArgs extends any[] = [], TReturn = void>(task: (context: LoadingTaskContext, ...args: TArgs) => TReturn | Promise<TReturn>, options?: UseLoadingTaskOptions) => {
1952
+ loading: Ref<boolean, boolean>;
1953
+ execTask: (...args: TArgs) => Promise<TReturn>;
1954
+ isAborted: Ref<boolean, boolean>;
1955
+ };
1956
+
1957
+ declare interface UseLoadingTaskOptions {
1958
+ loading?: Ref<boolean>;
1959
+ initMsg?: string;
1960
+ disableCancel?: boolean;
1961
+ }
1962
+
1924
1963
  export declare const usePageTable: <D, Q = undefined>(options: UsePageTableOptions<D, Q>) => {
1925
1964
  pageData: Ref< {
1926
1965
  pageNum: number;