jb-mobile-ui 1.0.6 → 1.0.7

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/README.md CHANGED
@@ -1,61 +1,61 @@
1
- <h1 align="center">Jb Mobile Ui</h1>
2
-
3
- <p align="center">A public Vue UI library for JinBiWuYe mobile web apps(Vue 3).</p>
4
-
5
- ## Install
6
-
7
- Using `npm` to install:
8
-
9
- ```bash
10
- npm i jb-mobile-ui
11
- ```
12
-
13
- Using `yarn`, `pnpm`, or `bun`:
14
-
15
- ```bash
16
- # with yarn
17
- yarn add jb-mobile-ui
18
-
19
- # with pnpm
20
- pnpm add jb-mobile-ui
21
-
22
- # with Bun
23
- bun add jb-mobile-ui
24
- ```
25
-
26
- ## Usage
27
-
28
- 在 vite.config.ts 中添加配置:
29
-
30
- ```javascript
31
- resolve: {
32
- alias: {
33
- 'jb-mobile-ui': '/node_modules/jb-mobile-ui'
34
- }
35
- }
36
- ```
37
-
38
- 在 main.ts 中引入 css:
39
-
40
- ```javascript
41
- import 'jb-mobile-ui/dist/index.css'
42
- ```
43
-
44
- 如果需要更换主题色,则需要在引入 jb-mobile-ui/dist/index.css 后通过 css 变量 --theme-color 进行修改:
45
-
46
- ```css
47
- :root {
48
- --theme-color: #7B52FE;
49
- }
50
- ```
51
-
52
- 按需引入组件:
53
-
54
- ```javascript
55
- import { JbMobileButton } from 'jb-mobile-ui'
56
- ```
57
-
58
- ## Links
59
-
60
- - [Documentation]()
61
- - [Changelog](https://jinbicloud.coding.net/p/P8/d/jb-mobile-ui/git/tree/main/CHANGELOG.md)
1
+ <h1 align="center">Jb Mobile Ui</h1>
2
+
3
+ <p align="center">A public Vue UI library for JinBiWuYe mobile web apps(Vue 3).</p>
4
+
5
+ ## Install
6
+
7
+ Using `npm` to install:
8
+
9
+ ```bash
10
+ npm i jb-mobile-ui
11
+ ```
12
+
13
+ Using `yarn`, `pnpm`, or `bun`:
14
+
15
+ ```bash
16
+ # with yarn
17
+ yarn add jb-mobile-ui
18
+
19
+ # with pnpm
20
+ pnpm add jb-mobile-ui
21
+
22
+ # with Bun
23
+ bun add jb-mobile-ui
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ 在 vite.config.ts 中添加配置:
29
+
30
+ ```javascript
31
+ resolve: {
32
+ alias: {
33
+ 'jb-mobile-ui': '/node_modules/jb-mobile-ui'
34
+ }
35
+ }
36
+ ```
37
+
38
+ 在 main.ts 中引入 css:
39
+
40
+ ```javascript
41
+ import 'jb-mobile-ui/dist/index.css'
42
+ ```
43
+
44
+ 如果需要更换主题色,则需要在引入 jb-mobile-ui/dist/index.css 后通过 css 变量 --theme-color 进行修改:
45
+
46
+ ```css
47
+ :root {
48
+ --theme-color: #7B52FE;
49
+ }
50
+ ```
51
+
52
+ 按需引入组件:
53
+
54
+ ```javascript
55
+ import { JbMobileButton } from 'jb-mobile-ui'
56
+ ```
57
+
58
+ ## Links
59
+
60
+ - [Documentation]()
61
+ - [Changelog](https://jinbicloud.coding.net/p/P8/d/jb-mobile-ui/git/tree/main/CHANGELOG.md)
package/dist/App.vue.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
2
  export default _default;
@@ -36,9 +36,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
36
36
  };
37
37
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
38
38
  confirm: (...args: any[]) => void;
39
+ changeDateFail: (...args: any[]) => void;
39
40
  "update:datePickerType": (...args: any[]) => void;
40
41
  "update:dateFormatValue": (...args: any[]) => void;
41
- changeDateFail: (...args: any[]) => void;
42
42
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
43
43
  datePickerType: {
44
44
  type: StringConstructor;
@@ -77,15 +77,15 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
77
77
  };
78
78
  }>> & Readonly<{
79
79
  onConfirm?: ((...args: any[]) => any) | undefined;
80
+ onChangeDateFail?: ((...args: any[]) => any) | undefined;
80
81
  "onUpdate:datePickerType"?: ((...args: any[]) => any) | undefined;
81
82
  "onUpdate:dateFormatValue"?: ((...args: any[]) => any) | undefined;
82
- onChangeDateFail?: ((...args: any[]) => any) | undefined;
83
83
  }>, {
84
84
  disabled: boolean;
85
85
  defaultValue: Date | Date[];
86
- datePickerType: string;
87
86
  datePickerTypeList: unknown[];
88
87
  dateFormatValue: string;
88
+ datePickerType: string;
89
89
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
90
90
  timePickerPopupRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
91
91
  visible: {
@@ -127,15 +127,31 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
127
127
  type: StringConstructor;
128
128
  default: string;
129
129
  };
130
+ withSelectTab: {
131
+ type: BooleanConstructor;
132
+ default: boolean;
133
+ };
134
+ datePickerTypeList: {
135
+ type: ArrayConstructor;
136
+ default: () => string[];
137
+ };
138
+ disabledTab: {
139
+ type: BooleanConstructor;
140
+ default: boolean;
141
+ };
130
142
  }>> & Readonly<{
131
143
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
132
144
  onConfirm?: ((...args: any[]) => any) | undefined;
145
+ "onUpdate:timePickerType"?: ((...args: any[]) => any) | undefined;
146
+ onChangeDateFail?: ((...args: any[]) => any) | undefined;
133
147
  }>, {
134
148
  toPrevDate: () => void;
135
149
  toNextDate: () => void;
136
150
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
137
151
  "update:visible": (...args: any[]) => void;
138
152
  confirm: (...args: any[]) => void;
153
+ "update:timePickerType": (...args: any[]) => void;
154
+ changeDateFail: (...args: any[]) => void;
139
155
  }, import('vue').PublicProps, {
140
156
  visible: boolean;
141
157
  timePickerType: string;
@@ -143,6 +159,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
143
159
  minDate: string | number | Date;
144
160
  maxDate: string | number | Date;
145
161
  valueFormat: string;
162
+ withSelectTab: boolean;
163
+ datePickerTypeList: unknown[];
164
+ disabledTab: boolean;
146
165
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
147
166
  timePickerContentRef: HTMLDivElement;
148
167
  calendarRef: ({
@@ -536,9 +555,23 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
536
555
  type: StringConstructor;
537
556
  default: string;
538
557
  };
558
+ withSelectTab: {
559
+ type: BooleanConstructor;
560
+ default: boolean;
561
+ };
562
+ datePickerTypeList: {
563
+ type: ArrayConstructor;
564
+ default: () => string[];
565
+ };
566
+ disabledTab: {
567
+ type: BooleanConstructor;
568
+ default: boolean;
569
+ };
539
570
  }>> & Readonly<{
540
571
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
541
572
  onConfirm?: ((...args: any[]) => any) | undefined;
573
+ "onUpdate:timePickerType"?: ((...args: any[]) => any) | undefined;
574
+ onChangeDateFail?: ((...args: any[]) => any) | undefined;
542
575
  }>, {
543
576
  toPrevDate: () => void;
544
577
  toNextDate: () => void;
@@ -549,6 +582,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
549
582
  minDate: string | number | Date;
550
583
  maxDate: string | number | Date;
551
584
  valueFormat: string;
585
+ withSelectTab: boolean;
586
+ datePickerTypeList: unknown[];
587
+ disabledTab: boolean;
552
588
  }> | null;
553
589
  }, HTMLDivElement>;
554
590
  export default _default;
@@ -1,4 +1,8 @@
1
1
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ tabIndex: {
3
+ type: NumberConstructor;
4
+ default: number;
5
+ };
2
6
  width: {
3
7
  type: NumberConstructor;
4
8
  default: number;
@@ -38,10 +42,16 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
38
42
  type: ObjectConstructor;
39
43
  default: () => {};
40
44
  };
41
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
45
+ }>, {
46
+ handleSelectOptionItem: (item: Record<string, any>) => void;
47
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
42
48
  change: (...args: any[]) => void;
43
49
  "update:modelValue": (...args: any[]) => void;
44
50
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
51
+ tabIndex: {
52
+ type: NumberConstructor;
53
+ default: number;
54
+ };
45
55
  width: {
46
56
  type: NumberConstructor;
47
57
  default: number;
@@ -87,6 +97,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
87
97
  }>, {
88
98
  placeholder: string;
89
99
  modelValue: string | number;
100
+ tabIndex: number;
90
101
  width: number;
91
102
  popupTitle: string;
92
103
  options: Record<string, any>[];
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ slotClick?: () => void;
3
+ };
4
+ declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
6
+ slots: {
7
+ default?(_: {
8
+ onClick: () => void;
9
+ }): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLDivElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -39,12 +39,26 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
39
39
  type: StringConstructor;
40
40
  default: string;
41
41
  };
42
+ withSelectTab: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ datePickerTypeList: {
47
+ type: ArrayConstructor;
48
+ default: () => string[];
49
+ };
50
+ disabledTab: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
42
54
  }>, {
43
55
  toPrevDate: () => void;
44
56
  toNextDate: () => void;
45
57
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
46
58
  "update:visible": (...args: any[]) => void;
47
59
  confirm: (...args: any[]) => void;
60
+ "update:timePickerType": (...args: any[]) => void;
61
+ changeDateFail: (...args: any[]) => void;
48
62
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
49
63
  visible: {
50
64
  type: BooleanConstructor;
@@ -85,9 +99,23 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
85
99
  type: StringConstructor;
86
100
  default: string;
87
101
  };
102
+ withSelectTab: {
103
+ type: BooleanConstructor;
104
+ default: boolean;
105
+ };
106
+ datePickerTypeList: {
107
+ type: ArrayConstructor;
108
+ default: () => string[];
109
+ };
110
+ disabledTab: {
111
+ type: BooleanConstructor;
112
+ default: boolean;
113
+ };
88
114
  }>> & Readonly<{
89
115
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
90
116
  onConfirm?: ((...args: any[]) => any) | undefined;
117
+ "onUpdate:timePickerType"?: ((...args: any[]) => any) | undefined;
118
+ onChangeDateFail?: ((...args: any[]) => any) | undefined;
91
119
  }>, {
92
120
  visible: boolean;
93
121
  timePickerType: string;
@@ -95,6 +123,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
95
123
  minDate: string | number | Date;
96
124
  maxDate: string | number | Date;
97
125
  valueFormat: string;
126
+ withSelectTab: boolean;
127
+ datePickerTypeList: unknown[];
128
+ disabledTab: boolean;
98
129
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
99
130
  timePickerContentRef: HTMLDivElement;
100
131
  calendarRef: ({
@@ -0,0 +1 @@
1
+ export declare const useGlobalLoading: () => import('vue').Ref<boolean, boolean>;
@@ -0,0 +1,37 @@
1
+ import { Ref } from 'vue';
2
+ export interface InfiniteScrollOptions {
3
+ bottomThreshold?: number;
4
+ topThreshold?: number;
5
+ throttleDelay?: number;
6
+ disabled?: Ref<boolean>;
7
+ onLoadMore?: () => Promise<void> | void;
8
+ onLoadPrevious?: () => Promise<void> | void;
9
+ debug?: boolean;
10
+ }
11
+ export interface ScrollInfo {
12
+ scrollTop: number;
13
+ scrollHeight: number;
14
+ clientHeight: number;
15
+ distanceToBottom: number;
16
+ distanceToTop: number;
17
+ isNearBottom: boolean;
18
+ isNearTop: boolean;
19
+ scrollDirection: 'up' | 'down' | 'none';
20
+ }
21
+ export interface InfiniteScrollState {
22
+ isLoadingMore: Ref<boolean>;
23
+ isLoadingPrevious: Ref<boolean>;
24
+ hasMoreData: Ref<boolean>;
25
+ hasPreviousData: Ref<boolean>;
26
+ }
27
+ export interface UseInfiniteScrollReturn extends InfiniteScrollState {
28
+ handleScroll: (event: Event) => void;
29
+ reset: () => void;
30
+ triggerLoadMore: () => void;
31
+ triggerLoadPrevious: () => void;
32
+ setDataState: (options: {
33
+ hasMore?: boolean;
34
+ hasPrevious?: boolean;
35
+ }) => void;
36
+ }
37
+ export declare function useInfiniteScroll(options?: InfiniteScrollOptions): UseInfiniteScrollReturn;