@tarojs/components 3.4.5 → 3.5.0-alpha.0
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/index-47a1959e.js +34 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-canvas-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-image-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-input-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-navigator-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +79 -3
- package/dist/cjs/taro-picker-view-core.cjs.entry.js +71 -2
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +1 -1
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +5 -13
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +5 -13
- package/dist/cjs/taro-tabbar.cjs.entry.js +34 -35
- package/dist/cjs/taro-text-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-textarea-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-video-control_3.cjs.entry.js +102 -115
- package/dist/cjs/taro-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-web-view-core.cjs.entry.js +1 -1
- package/dist/collection/components/button/style/index.css +49 -49
- package/dist/collection/components/canvas/canvas.js +1 -1
- package/dist/collection/components/canvas/style/index.css +6 -6
- package/dist/collection/components/checkbox/style/index.css +21 -22
- package/dist/collection/components/image/style/index.css +4 -4
- package/dist/collection/components/input/index.css +2 -2
- package/dist/collection/components/navigator/navigator.js +2 -2
- package/dist/collection/components/navigator/{navigator.css → style/index.css} +3 -3
- package/dist/collection/components/picker/style/index.css +2 -1
- package/dist/collection/components/picker-view/picker-view-column.js +218 -4
- package/dist/collection/components/picker-view/picker-view.js +217 -3
- package/dist/collection/components/picker-view/style/column.css +12 -0
- package/dist/collection/components/picker-view/style/index.css +28 -0
- package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/dist/collection/components/pull-to-refresh/style/index.css +53 -50
- package/dist/collection/components/scroll-view/scroll-view.js +3 -11
- package/dist/collection/components/swiper/swiper.js +2 -10
- package/dist/collection/components/tabbar/style/index.css +7 -6
- package/dist/collection/components/tabbar/tabbar.js +11 -12
- package/dist/collection/components/text/style/index.css +0 -6
- package/dist/collection/components/textarea/style/index.css +5 -5
- package/dist/collection/components/video/style/index.css +89 -109
- package/dist/collection/components/video/utils.js +95 -109
- package/dist/collection/components/video/video.js +2 -1
- package/dist/collection/components/view/style/index.css +3 -5
- package/dist/collection/components/web-view/style/index.css +1 -1
- package/dist/collection/utils/index.js +23 -83
- package/dist/collection/utils/style.js +10 -0
- package/dist/collection/utils/url.js +67 -0
- package/dist/esm/index-cad8203e.js +31 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-button-core.entry.js +1 -1
- package/dist/esm/taro-canvas-core.entry.js +1 -1
- package/dist/esm/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-image-core.entry.js +1 -1
- package/dist/esm/taro-input-core.entry.js +1 -1
- package/dist/esm/taro-navigator-core.entry.js +2 -2
- package/dist/esm/taro-picker-view-column-core.entry.js +80 -4
- package/dist/esm/taro-picker-view-core.entry.js +72 -3
- package/dist/esm/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm/taro-scroll-view-core.entry.js +3 -11
- package/dist/esm/taro-swiper-core_2.entry.js +1 -9
- package/dist/esm/taro-tabbar.entry.js +34 -35
- package/dist/esm/taro-text-core.entry.js +1 -1
- package/dist/esm/taro-textarea-core.entry.js +1 -1
- package/dist/esm/taro-video-control_3.entry.js +96 -109
- package/dist/esm/taro-view-core.entry.js +1 -1
- package/dist/esm/taro-web-view-core.entry.js +1 -1
- package/dist/esm-es5/index-cad8203e.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
- package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-column-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js +1 -1
- package/dist/esm-es5/taro-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-web-view-core.entry.js +1 -1
- package/dist/taro-components/{p-4dbed323.entry.js → p-07062966.entry.js} +1 -1
- package/dist/taro-components/p-078230a0.system.entry.js +1 -0
- package/dist/taro-components/p-08aba8db.system.entry.js +1 -0
- package/dist/taro-components/p-08ea5931.system.entry.js +1 -0
- package/dist/taro-components/{p-9fc88fc1.system.entry.js → p-0c18bd18.system.entry.js} +1 -1
- package/dist/taro-components/{p-17cf8b5b.entry.js → p-1b48afb1.entry.js} +1 -1
- package/dist/taro-components/p-1c625d7d.entry.js +1 -0
- package/dist/taro-components/p-33ee636a.system.js +1 -1
- package/dist/taro-components/p-34188530.system.entry.js +1 -0
- package/dist/taro-components/{p-71e14298.entry.js → p-4039bcb5.entry.js} +1 -1
- package/dist/taro-components/p-44b60b72.entry.js +1 -0
- package/dist/taro-components/p-4aa4de0f.system.entry.js +1 -0
- package/dist/taro-components/{p-50066d5e.system.entry.js → p-4cd044c4.system.entry.js} +1 -1
- package/dist/taro-components/p-5746d7ce.js +1 -0
- package/dist/taro-components/{p-2b0d5c90.system.entry.js → p-58623cdd.system.entry.js} +1 -1
- package/dist/taro-components/{p-d041b413.entry.js → p-5c6aeb55.entry.js} +1 -1
- package/dist/taro-components/{p-1c1336f5.entry.js → p-5d5baadf.entry.js} +1 -1
- package/dist/taro-components/p-663d1bb9.system.js +1 -0
- package/dist/taro-components/{p-d567b95e.entry.js → p-758fb1ba.entry.js} +1 -1
- package/dist/taro-components/p-786653af.system.entry.js +1 -0
- package/dist/taro-components/p-7fdd59f0.entry.js +1 -0
- package/dist/taro-components/{p-fd8312e5.system.entry.js → p-8e0150eb.system.entry.js} +1 -1
- package/dist/taro-components/p-92a31933.system.entry.js +1 -0
- package/dist/taro-components/p-a05d66d1.system.entry.js +1 -0
- package/dist/taro-components/p-a1863c96.entry.js +1 -0
- package/dist/taro-components/p-aae3e479.entry.js +1 -0
- package/dist/taro-components/p-c5a86c19.system.entry.js +1 -0
- package/dist/taro-components/p-cc36cee7.entry.js +1 -0
- package/dist/taro-components/{p-8bc82aaa.entry.js → p-d0c608a8.entry.js} +1 -1
- package/dist/taro-components/{p-293531af.system.entry.js → p-d91ab597.system.entry.js} +1 -1
- package/dist/taro-components/{p-fe156231.system.entry.js → p-da8edf69.system.entry.js} +1 -1
- package/dist/taro-components/p-e0ad978e.entry.js +1 -0
- package/dist/taro-components/p-e35230e0.entry.js +1 -0
- package/dist/taro-components/p-e61d2113.system.entry.js +1 -0
- package/dist/taro-components/{p-4e54216b.entry.js → p-f5fe8711.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/picker-view/picker-view-column.d.ts +15 -1
- package/dist/types/components/picker-view/picker-view.d.ts +24 -0
- package/dist/types/components/scroll-view/scroll-view.d.ts +1 -1
- package/dist/types/components/swiper/swiper.d.ts +2 -2
- package/dist/types/components/tabbar/tabbar.d.ts +3 -2
- package/dist/types/components/video/utils.d.ts +7 -0
- package/dist/types/components.d.ts +22 -0
- package/dist/types/utils/index.d.ts +4 -8
- package/dist/types/utils/style.d.ts +1 -0
- package/dist/types/utils/url.d.ts +6 -0
- package/package.json +3 -3
- package/types/Input.d.ts +5 -4
- package/types/PickerViewColumn.d.ts +2 -2
- package/types/index.vue3.d.ts +159 -0
- package/dist/taro-components/p-32937866.entry.js +0 -1
- package/dist/taro-components/p-431197bc.entry.js +0 -1
- package/dist/taro-components/p-43de2f12.system.entry.js +0 -1
- package/dist/taro-components/p-5ae86835.system.entry.js +0 -1
- package/dist/taro-components/p-5c420456.entry.js +0 -1
- package/dist/taro-components/p-6de12779.entry.js +0 -1
- package/dist/taro-components/p-83dedaa2.entry.js +0 -1
- package/dist/taro-components/p-8486c251.system.entry.js +0 -1
- package/dist/taro-components/p-95529dc0.entry.js +0 -1
- package/dist/taro-components/p-b15d0302.system.entry.js +0 -1
- package/dist/taro-components/p-b32442fc.system.entry.js +0 -1
- package/dist/taro-components/p-cc818a13.entry.js +0 -1
- package/dist/taro-components/p-d394a61f.system.entry.js +0 -1
- package/dist/taro-components/p-d5971476.entry.js +0 -1
- package/dist/taro-components/p-e0af1d0d.system.entry.js +0 -1
- package/dist/taro-components/p-fb2252b7.system.entry.js +0 -1
- package/dist/taro-components/p-fd0d1168.system.entry.js +0 -1
- package/dist/taro-components/p-fde3a009.system.entry.js +0 -1
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
1
2
|
export declare class PickerViewColumn {
|
|
2
|
-
|
|
3
|
+
el: HTMLElement;
|
|
4
|
+
col: string;
|
|
5
|
+
initialPosition: string;
|
|
6
|
+
paddingVertical: number;
|
|
7
|
+
isInit: boolean;
|
|
8
|
+
isMove: boolean;
|
|
9
|
+
onChange: EventEmitter;
|
|
10
|
+
onSelectStart: EventEmitter;
|
|
11
|
+
onSelectEnd: EventEmitter;
|
|
12
|
+
onScroll(_event: UIEvent): void;
|
|
13
|
+
onMouseEnd(): void;
|
|
14
|
+
onTouchEnd(): void;
|
|
15
|
+
componentDidUpdate(): void;
|
|
16
|
+
handleSelected: (...args: any[]) => void;
|
|
3
17
|
render(): any;
|
|
4
18
|
}
|
|
@@ -1,4 +1,28 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
1
2
|
export declare class PickerView {
|
|
3
|
+
private indicator;
|
|
4
|
+
el: HTMLElement;
|
|
5
|
+
indicatorStyle: string;
|
|
6
|
+
indicatorClass: string;
|
|
7
|
+
value: number[];
|
|
8
|
+
maskStyle: string;
|
|
9
|
+
maskClass: string;
|
|
10
|
+
onChange: EventEmitter;
|
|
11
|
+
onPickStart: EventEmitter;
|
|
12
|
+
onPickEnd: EventEmitter;
|
|
13
|
+
onSelect(e: CustomEvent<{
|
|
14
|
+
curIndex: string;
|
|
15
|
+
selectedIndex: string;
|
|
16
|
+
}>): void;
|
|
17
|
+
onSelectStart(e: CustomEvent<{
|
|
18
|
+
curIndex: string;
|
|
19
|
+
selectedIndex: string;
|
|
20
|
+
}>): void;
|
|
21
|
+
onPickerColEnd(e: CustomEvent<{
|
|
22
|
+
curIndex: string;
|
|
23
|
+
selectedIndex: string;
|
|
24
|
+
}>): void;
|
|
2
25
|
componentDidLoad(): void;
|
|
26
|
+
componentDidRender(): void;
|
|
3
27
|
render(): any;
|
|
4
28
|
}
|
|
@@ -19,6 +19,6 @@ export declare class ScrollView implements ComponentInterface {
|
|
|
19
19
|
watchScrollIntoView(newVal: any): void;
|
|
20
20
|
componentDidLoad(): void;
|
|
21
21
|
handleScroll: (e: any) => void;
|
|
22
|
-
|
|
22
|
+
upperAndLower: (...args: any[]) => void;
|
|
23
23
|
render(): any;
|
|
24
24
|
}
|
|
@@ -74,8 +74,8 @@ export declare class Swiper implements ComponentInterface {
|
|
|
74
74
|
componentDidRender(): void;
|
|
75
75
|
disconnectedCallback(): void;
|
|
76
76
|
handleSwiperLoopListen: () => void;
|
|
77
|
-
handleSwiperLoop: (...
|
|
78
|
-
handleSwiperSize: (...
|
|
77
|
+
handleSwiperLoop: (...args: any[]) => void;
|
|
78
|
+
handleSwiperSize: (...args: any[]) => void;
|
|
79
79
|
handleInit(): void;
|
|
80
80
|
render(): any;
|
|
81
81
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { IH5RouterConfig } from '@tarojs/taro/types/compile';
|
|
2
3
|
interface RouterHandler {
|
|
3
4
|
index: string;
|
|
4
5
|
text: string;
|
|
@@ -16,7 +17,7 @@ export interface Conf {
|
|
|
16
17
|
position?: 'bottom' | 'top';
|
|
17
18
|
custom: boolean;
|
|
18
19
|
customRoutes: Record<string, string | string[]>;
|
|
19
|
-
mode: '
|
|
20
|
+
mode: IH5RouterConfig['mode'];
|
|
20
21
|
basename: string;
|
|
21
22
|
homePage: string;
|
|
22
23
|
currentPagename: string;
|
|
@@ -44,7 +45,7 @@ export declare class Tabbar implements ComponentInterface {
|
|
|
44
45
|
onLongPress: EventEmitter;
|
|
45
46
|
tabbar: HTMLDivElement;
|
|
46
47
|
constructor();
|
|
47
|
-
getCurrentUrl():
|
|
48
|
+
getCurrentUrl(): string;
|
|
48
49
|
getOriginUrl: (url: string) => string;
|
|
49
50
|
getSelectedIndex: (url: string) => number;
|
|
50
51
|
switchTab: (index: number) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const formatTime: (time: number | null) => string;
|
|
2
|
+
export declare const calcDist: (x: number, y: number) => number;
|
|
3
|
+
export declare const normalizeNumber: (number: number) => number;
|
|
4
|
+
/**
|
|
5
|
+
* @returns: {requestFullscreen: 'requestFullscreen', exitFullscreen: 'exitFullscreen', ...}
|
|
6
|
+
*/
|
|
7
|
+
export declare const screenFn: Record<string, any>;
|
|
@@ -152,8 +152,16 @@ export namespace Components {
|
|
|
152
152
|
"updateHeight": (height: number, columnId: string, needRevise?: boolean) => void;
|
|
153
153
|
}
|
|
154
154
|
interface TaroPickerViewColumnCore {
|
|
155
|
+
"col": string;
|
|
156
|
+
"initialPosition": string;
|
|
157
|
+
"paddingVertical": number;
|
|
155
158
|
}
|
|
156
159
|
interface TaroPickerViewCore {
|
|
160
|
+
"indicatorClass": string;
|
|
161
|
+
"indicatorStyle": string;
|
|
162
|
+
"maskClass": string;
|
|
163
|
+
"maskStyle": string;
|
|
164
|
+
"value": number[];
|
|
157
165
|
}
|
|
158
166
|
interface TaroProgressCore {
|
|
159
167
|
"active": boolean;
|
|
@@ -1009,8 +1017,22 @@ declare namespace LocalJSX {
|
|
|
1009
1017
|
"updateHeight"?: (height: number, columnId: string, needRevise?: boolean) => void;
|
|
1010
1018
|
}
|
|
1011
1019
|
interface TaroPickerViewColumnCore {
|
|
1020
|
+
"col"?: string;
|
|
1021
|
+
"initialPosition"?: string;
|
|
1022
|
+
"onOnselect"?: (event: CustomEvent<any>) => void;
|
|
1023
|
+
"onOnselectend"?: (event: CustomEvent<any>) => void;
|
|
1024
|
+
"onOnselectstart"?: (event: CustomEvent<any>) => void;
|
|
1025
|
+
"paddingVertical"?: number;
|
|
1012
1026
|
}
|
|
1013
1027
|
interface TaroPickerViewCore {
|
|
1028
|
+
"indicatorClass"?: string;
|
|
1029
|
+
"indicatorStyle"?: string;
|
|
1030
|
+
"maskClass"?: string;
|
|
1031
|
+
"maskStyle"?: string;
|
|
1032
|
+
"onChange"?: (event: CustomEvent<any>) => void;
|
|
1033
|
+
"onPickend"?: (event: CustomEvent<any>) => void;
|
|
1034
|
+
"onPickstart"?: (event: CustomEvent<any>) => void;
|
|
1035
|
+
"value"?: number[];
|
|
1014
1036
|
}
|
|
1015
1037
|
interface TaroProgressCore {
|
|
1016
1038
|
"active"?: boolean;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export declare function throttle(fn: any,
|
|
2
|
-
export declare
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
query: null;
|
|
6
|
-
fragment: null;
|
|
7
|
-
};
|
|
8
|
-
export declare const isNumber: (obj: any) => boolean;
|
|
1
|
+
export declare function throttle(fn: any, threshold?: number, scope?: any): (...args: any[]) => void;
|
|
2
|
+
export declare function debounce(fn: any, ms?: number, scope?: any): (...args: any[]) => void;
|
|
3
|
+
export * from './style';
|
|
4
|
+
export * from './url';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function convertStyle(style?: string): Record<string, string> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main:h5": "src/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@stencil/core": "2.9.0",
|
|
41
|
-
"@tarojs/taro": "3.
|
|
41
|
+
"@tarojs/taro": "3.5.0-alpha.0",
|
|
42
42
|
"better-scroll": "^1.14.1",
|
|
43
43
|
"classnames": "^2.2.5",
|
|
44
44
|
"intersection-observer": "^0.7.0",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"simulant": "^0.2.2",
|
|
56
56
|
"workbox-build": "4.3.1"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "8b2acf55c5f98e54bb2788a723a2ef0e0a1b75b6"
|
|
59
59
|
}
|
package/types/Input.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ interface InputProps extends StandardProps, FormItemProps {
|
|
|
25
25
|
placeholder?: string
|
|
26
26
|
|
|
27
27
|
/** 指定 placeholder 的样式
|
|
28
|
-
* @supported weapp
|
|
28
|
+
* @supported weapp, rn
|
|
29
29
|
*/
|
|
30
30
|
placeholderStyle?: string
|
|
31
31
|
|
|
@@ -35,10 +35,11 @@ interface InputProps extends StandardProps, FormItemProps {
|
|
|
35
35
|
*/
|
|
36
36
|
placeholderClass?: string
|
|
37
37
|
|
|
38
|
-
/** 指定 placeholder
|
|
38
|
+
/** 指定 placeholder 的文本颜色
|
|
39
39
|
* @supported rn
|
|
40
40
|
*/
|
|
41
41
|
placeholderTextColor?: string
|
|
42
|
+
|
|
42
43
|
/** 是否禁用
|
|
43
44
|
* @supported weapp, h5, rn
|
|
44
45
|
*/
|
|
@@ -243,7 +244,7 @@ declare namespace InputProps {
|
|
|
243
244
|
* <Text>可以自动聚焦的 input</Text>
|
|
244
245
|
* <Input type='text' placeholder='将会获取焦点' focus/>
|
|
245
246
|
* <Text>控制最大输入长度的 input</Text>
|
|
246
|
-
* <Input type='text' placeholder='最大输入长度为 10'
|
|
247
|
+
* <Input type='text' placeholder='最大输入长度为 10' maxLength='10'/>
|
|
247
248
|
* <Text>数字输入的 input</Text>
|
|
248
249
|
* <Input type='number' placeholder='这是一个数字输入框'/>
|
|
249
250
|
* <Text>密码输入的 input</Text>
|
|
@@ -266,7 +267,7 @@ declare namespace InputProps {
|
|
|
266
267
|
* <text>可以自动聚焦的 input</text>
|
|
267
268
|
* <input type="text" placeholder="将会获取焦点" :focus="true" />
|
|
268
269
|
* <text>控制最大输入长度的 input</text>
|
|
269
|
-
* <input type="text" placeholder="最大输入长度为 10"
|
|
270
|
+
* <input type="text" placeholder="最大输入长度为 10" maxLength="10"/>
|
|
270
271
|
* <text>数字输入的 input</text>
|
|
271
272
|
* <input type="number" placeholder="这是一个数字输入框"/>
|
|
272
273
|
* <text>密码输入的 input</text>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
|
-
import { StandardProps
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
3
|
|
|
4
4
|
/** 滚动选择器子项
|
|
5
5
|
* 仅可放置于 `<PickerView />` 中,其孩子节点的高度会自动设置成与 picker-view 的选中框的高度一致
|
|
6
6
|
* @classification forms
|
|
7
|
-
* @supported weapp, swan, alipay, tt, rn
|
|
7
|
+
* @supported weapp, swan, alipay, tt, h5, rn
|
|
8
8
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/picker-view-column.html
|
|
9
9
|
*/
|
|
10
10
|
declare const PickerViewColumn: ComponentType<StandardProps>
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vue tsx @tarojs/components 类型提示文件
|
|
3
|
+
* 如何使用?
|
|
4
|
+
* 请在醒目全局的类型文件中写入以下代码,覆盖默认的组件类型提示
|
|
5
|
+
* ```typescript
|
|
6
|
+
* export declare module '@tarojs/components' {
|
|
7
|
+
* export * from '@tarojs/components/types/index.vue3'
|
|
8
|
+
* }
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
import { TaroElement } from '@tarojs/runtime'
|
|
12
|
+
import { StandardProps } from './common'
|
|
13
|
+
import * as CSS from 'csstype'
|
|
14
|
+
/** 视图容器 */
|
|
15
|
+
import { CoverImageProps } from './CoverImage'
|
|
16
|
+
import { CoverViewProps } from './CoverView'
|
|
17
|
+
import { MatchMediaProps } from './MatchMedia'
|
|
18
|
+
import { MovableAreaProps } from './MovableArea'
|
|
19
|
+
import { MovableViewProps } from './MovableView'
|
|
20
|
+
import { PageContainerProps } from './PageContainer'
|
|
21
|
+
import { ScrollViewProps } from './ScrollView'
|
|
22
|
+
import { ShareElementProps } from './ShareElement'
|
|
23
|
+
import { SwiperProps } from './Swiper'
|
|
24
|
+
import { SwiperItemProps } from './SwiperItem'
|
|
25
|
+
import { ViewProps } from './View'
|
|
26
|
+
/** 基础内容 */
|
|
27
|
+
import { IconProps } from './Icon'
|
|
28
|
+
import { ProgressProps } from './Progress'
|
|
29
|
+
import { RichTextProps } from './RichText'
|
|
30
|
+
import { TextProps } from './Text'
|
|
31
|
+
/** 表单组件 */
|
|
32
|
+
import { ButtonProps } from './Button'
|
|
33
|
+
import { CheckboxProps } from './Checkbox'
|
|
34
|
+
import { CheckboxGroupProps } from './CheckboxGroup'
|
|
35
|
+
import { EditorProps } from './Editor'
|
|
36
|
+
import { FormProps } from './Form'
|
|
37
|
+
import { InputProps } from './Input'
|
|
38
|
+
import { KeyboardAccessoryProps } from './KeyboardAccessory'
|
|
39
|
+
import { LabelProps } from './Label'
|
|
40
|
+
import { PickerDateProps, PickerTimeProps, PickerRegionProps, PickerSelectorProps, PickerMultiSelectorProps } from './Picker'
|
|
41
|
+
import { PickerViewProps } from './PickerView'
|
|
42
|
+
import { RadioProps } from './Radio'
|
|
43
|
+
import { RadioGroupProps } from './RadioGroup'
|
|
44
|
+
import { SliderProps } from './Slider'
|
|
45
|
+
import { SwitchProps } from './Switch'
|
|
46
|
+
import { TextareaProps } from './Textarea'
|
|
47
|
+
/** 导航 */
|
|
48
|
+
import { FunctionalPageNavigatorProps } from './FunctionalPageNavigator'
|
|
49
|
+
import { NavigatorProps } from './Navigator'
|
|
50
|
+
import { NavigationBarProps } from './NavigationBar'
|
|
51
|
+
/** 媒体组件 */
|
|
52
|
+
import { AudioProps } from './Audio'
|
|
53
|
+
import { CameraProps } from './Camera'
|
|
54
|
+
import { ImageProps } from './Image'
|
|
55
|
+
import { LivePlayerProps } from './LivePlayer'
|
|
56
|
+
import { LivePusherProps } from './LivePusher'
|
|
57
|
+
import { VideoProps } from './Video'
|
|
58
|
+
import { VoipRoomProps } from './VoipRoom'
|
|
59
|
+
/** 地图 */
|
|
60
|
+
import { MapProps } from './Map'
|
|
61
|
+
/** 画布 */
|
|
62
|
+
import { CanvasProps } from './Canvas'
|
|
63
|
+
/** 开放能力 */
|
|
64
|
+
import { AdProps } from './Ad'
|
|
65
|
+
import { AdCustomProps } from './AdCustom'
|
|
66
|
+
import { OfficialAccountProps } from './OfficialAccount'
|
|
67
|
+
import { OpenDataProps } from './OpenData'
|
|
68
|
+
import { WebViewProps } from './WebView'
|
|
69
|
+
/** 配置节点 */
|
|
70
|
+
import { PageMetaProps } from './PageMeta'
|
|
71
|
+
|
|
72
|
+
import { CustomWrapperProps } from './CustomWrapper'
|
|
73
|
+
import { SlotProps } from './Slot'
|
|
74
|
+
|
|
75
|
+
// 联合类型不能用omit(比如picker)
|
|
76
|
+
type DistributiveOmit<T, K extends keyof T> = T extends unknown
|
|
77
|
+
? Omit<T, K>
|
|
78
|
+
: never;
|
|
79
|
+
|
|
80
|
+
type SlimProps = {
|
|
81
|
+
class?: any
|
|
82
|
+
style?: CSS.Properties<string | number>
|
|
83
|
+
innerHTML?: string
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** 转换react的类型到vue */
|
|
87
|
+
type RemoveReactAttribute = keyof Omit<StandardProps, 'id' | 'hidden' | 'animation'>
|
|
88
|
+
export type TransformReact2VueType<P extends StandardProps = Record<string, never>> = DistributiveOmit<P, RemoveReactAttribute> & SlimProps
|
|
89
|
+
|
|
90
|
+
export declare class VueComponentType<P = Record<string, never>> extends TaroElement {
|
|
91
|
+
$props: TransformReact2VueType<P>
|
|
92
|
+
/** WebStorm 提示貌似找的是props */
|
|
93
|
+
props: this['$props']
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** 视图容器 */
|
|
97
|
+
export declare class Block extends VueComponentType {}
|
|
98
|
+
export declare class CoverImage extends VueComponentType<CoverImageProps> {}
|
|
99
|
+
export declare class CoverView extends VueComponentType<CoverViewProps> {}
|
|
100
|
+
export declare class MatchMedia extends VueComponentType<MatchMediaProps> {}
|
|
101
|
+
export declare class MovableArea extends VueComponentType<MovableAreaProps> {}
|
|
102
|
+
export declare class MovableView extends VueComponentType<MovableViewProps> {}
|
|
103
|
+
export declare class PageContainer extends VueComponentType<PageContainerProps> {}
|
|
104
|
+
export declare class ScrollView extends VueComponentType<ScrollViewProps> {}
|
|
105
|
+
export declare class ShareElement extends VueComponentType<ShareElementProps> {}
|
|
106
|
+
export declare class Swiper extends VueComponentType<SwiperProps> {}
|
|
107
|
+
export declare class SwiperItem extends VueComponentType<SwiperItemProps> {}
|
|
108
|
+
export declare class View extends VueComponentType<ViewProps> {}
|
|
109
|
+
/** 基础内容 */
|
|
110
|
+
export declare class Icon extends VueComponentType<IconProps> {}
|
|
111
|
+
export declare class Progress extends VueComponentType<ProgressProps> {}
|
|
112
|
+
export declare class RichText extends VueComponentType<RichTextProps> {}
|
|
113
|
+
export declare class Text extends VueComponentType<TextProps> {}
|
|
114
|
+
/** 表单组件 */
|
|
115
|
+
export declare class Button extends VueComponentType<ButtonProps> {}
|
|
116
|
+
export declare class Checkbox extends VueComponentType<CheckboxProps> {}
|
|
117
|
+
export declare class CheckboxGroup extends VueComponentType<CheckboxGroupProps> {}
|
|
118
|
+
export declare class Editor extends VueComponentType<EditorProps> {}
|
|
119
|
+
export declare class Form extends VueComponentType<FormProps> {}
|
|
120
|
+
export declare class Input extends VueComponentType<InputProps> {}
|
|
121
|
+
export declare class KeyboardAccessory extends VueComponentType<KeyboardAccessoryProps> {}
|
|
122
|
+
export declare class Label extends VueComponentType<LabelProps> {}
|
|
123
|
+
export declare class Picker extends VueComponentType<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps> {}
|
|
124
|
+
export declare class PickerView extends VueComponentType<PickerViewProps> {}
|
|
125
|
+
export declare class PickerViewColumn extends VueComponentType {}
|
|
126
|
+
export declare class Radio extends VueComponentType<RadioProps> {}
|
|
127
|
+
export declare class RadioGroup extends VueComponentType<RadioGroupProps> {}
|
|
128
|
+
export declare class Slider extends VueComponentType<SliderProps> {}
|
|
129
|
+
export declare class Switch extends VueComponentType<SwitchProps> {}
|
|
130
|
+
export declare class Textarea extends VueComponentType<TextareaProps> {}
|
|
131
|
+
/** 导航 */
|
|
132
|
+
export declare class FunctionalPageNavigator extends VueComponentType<FunctionalPageNavigatorProps> {}
|
|
133
|
+
export declare class Navigator extends VueComponentType<NavigatorProps> {}
|
|
134
|
+
export declare class NavigationBar extends VueComponentType<NavigationBarProps> {}
|
|
135
|
+
/** 媒体组件 */
|
|
136
|
+
export declare class Audio extends VueComponentType<AudioProps> {}
|
|
137
|
+
export declare class Camera extends VueComponentType<CameraProps> {}
|
|
138
|
+
export declare class Image extends VueComponentType<ImageProps> {}
|
|
139
|
+
export declare class LivePlayer extends VueComponentType<LivePlayerProps> {}
|
|
140
|
+
export declare class LivePusher extends VueComponentType<LivePusherProps> {}
|
|
141
|
+
export declare class Video extends VueComponentType<VideoProps> {}
|
|
142
|
+
export declare class VoipRoom extends VueComponentType<VoipRoomProps> {}
|
|
143
|
+
/** 地图 */
|
|
144
|
+
export declare class Map extends VueComponentType<MapProps> {}
|
|
145
|
+
/** 画布 */
|
|
146
|
+
export declare class Canvas extends VueComponentType<CanvasProps> {}
|
|
147
|
+
/** 开放能力 */
|
|
148
|
+
export declare class Ad extends VueComponentType<AdProps> {}
|
|
149
|
+
export declare class AdCustom extends VueComponentType<AdCustomProps> {}
|
|
150
|
+
export declare class OfficialAccount extends VueComponentType<OfficialAccountProps> {}
|
|
151
|
+
export declare class OpenData extends VueComponentType<OpenDataProps> {}
|
|
152
|
+
export declare class WebView extends VueComponentType<WebViewProps> {}
|
|
153
|
+
/** 配置节点 */
|
|
154
|
+
export declare class PageMeta extends VueComponentType<PageMetaProps> {}
|
|
155
|
+
|
|
156
|
+
export declare class CustomWrapper extends VueComponentType<CustomWrapperProps> {}
|
|
157
|
+
export declare class Slot extends VueComponentType<SlotProps> {}
|
|
158
|
+
|
|
159
|
+
export * from './index'
|