@tarojs/components 3.5.7 → 3.5.9
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/loader.cjs.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +5 -0
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-movable-view-core.cjs.entry.js +18 -43
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +5 -0
- package/dist/cjs/taro-video-control_3.cjs.entry.js +98 -181
- package/dist/collection/components/button/button.js +11 -0
- package/dist/collection/components/movable-area/area.css +2 -2
- package/dist/collection/components/movable-area/movable-view.js +18 -33
- package/dist/collection/components/swiper/swiper.js +23 -0
- package/dist/collection/components/video/video-control.js +22 -39
- package/dist/collection/components/video/video-danmu.js +39 -52
- package/dist/collection/components/video/video.js +37 -60
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-button-core.entry.js +5 -0
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-movable-area-core.entry.js +1 -1
- package/dist/esm/taro-movable-view-core.entry.js +18 -43
- package/dist/esm/taro-swiper-core_2.entry.js +5 -0
- package/dist/esm/taro-video-control_3.entry.js +98 -181
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +55 -55
- package/dist/taro-components/p-0380841f.system.js +1 -1
- package/dist/taro-components/{p-a94524c9.system.entry.js → p-06b9d39c.system.entry.js} +1 -1
- package/dist/taro-components/{p-63a0c6b0.entry.js → p-34178401.entry.js} +1 -1
- package/dist/taro-components/p-3549b6d2.entry.js +1 -0
- package/dist/taro-components/p-4262d1b6.entry.js +1 -0
- package/dist/taro-components/{p-f8b9c4b0.entry.js → p-42630f45.entry.js} +1 -1
- package/dist/taro-components/{p-f81a74bb.system.entry.js → p-4c1a7cae.system.entry.js} +81 -81
- package/dist/taro-components/{p-3744e978.entry.js → p-99d17a1a.entry.js} +52 -52
- package/dist/taro-components/{p-13f0b11f.system.entry.js → p-a5496bf5.system.entry.js} +1 -1
- package/dist/taro-components/p-f40e1218.system.entry.js +1 -0
- package/dist/taro-components/{p-1c775a11.system.entry.js → p-f5f1c3b7.system.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/button/button.d.ts +1 -0
- package/dist/types/components/swiper/swiper.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +15 -12
- package/types/Ad.d.ts +21 -22
- package/types/AnimationVideo.d.ts +62 -0
- package/types/AnimationView.d.ts +45 -0
- package/types/ArCamera.d.ts +50 -0
- package/types/Audio.d.ts +6 -6
- package/types/AwemeData.d.ts +43 -0
- package/types/Button.d.ts +68 -71
- package/types/Camera.d.ts +16 -17
- package/types/Canvas.d.ts +23 -28
- package/types/Checkbox.d.ts +8 -8
- package/types/CheckboxGroup.d.ts +1 -1
- package/types/CommentDetail.d.ts +72 -0
- package/types/CommentList.d.ts +128 -0
- package/types/ContactButton.d.ts +53 -0
- package/types/CoverImage.d.ts +16 -16
- package/types/CoverView.d.ts +105 -7
- package/types/CustomWrapper.d.ts +1 -1
- package/types/FollowSwan.d.ts +28 -0
- package/types/Form.d.ts +11 -11
- package/types/Icon.d.ts +1 -1
- package/types/Image.d.ts +21 -21
- package/types/InlinePaymentPanel.d.ts +58 -0
- package/types/Input.d.ts +93 -28
- package/types/Lifestyle.d.ts +26 -0
- package/types/Like.d.ts +107 -0
- package/types/LivePlayer.d.ts +32 -26
- package/types/LivePusher.d.ts +6 -6
- package/types/Login.d.ts +45 -0
- package/types/Lottie.d.ts +113 -0
- package/types/Map.d.ts +67 -72
- package/types/MatchMedia.d.ts +1 -1
- package/types/MovableArea.d.ts +2 -2
- package/types/MovableView.d.ts +20 -29
- package/types/NativeSlot.d.ts +32 -0
- package/types/Navigator.d.ts +11 -11
- package/types/OpenData.d.ts +6 -6
- package/types/PageContainer.d.ts +31 -24
- package/types/PageMeta.d.ts +15 -15
- package/types/Picker.d.ts +2 -6
- package/types/PickerView.d.ts +12 -22
- package/types/Progress.d.ts +6 -6
- package/types/Radio.d.ts +1 -1
- package/types/RadioGroup.d.ts +6 -6
- package/types/RichText.d.ts +17 -17
- package/types/RootPortal.d.ts +11 -2
- package/types/RtcRoom.d.ts +104 -0
- package/types/RtcRoomItem.d.ts +26 -0
- package/types/ScrollView.d.ts +47 -31
- package/types/ShareElement.d.ts +20 -10
- package/types/Slider.d.ts +11 -11
- package/types/Slot.d.ts +1 -1
- package/types/Swiper.d.ts +32 -20
- package/types/SwiperItem.d.ts +3 -2
- package/types/Switch.d.ts +6 -6
- package/types/TabItem.d.ts +35 -0
- package/types/Tabs.d.ts +58 -0
- package/types/Text.d.ts +1 -1
- package/types/Textarea.d.ts +39 -33
- package/types/Video.d.ts +123 -108
- package/types/View.d.ts +21 -14
- package/types/VoipRoom.d.ts +5 -5
- package/types/WebView.d.ts +12 -6
- package/types/index.vue3.d.ts +268 -259
- package/dist/taro-components/p-6800ac6f.entry.js +0 -1
- package/dist/taro-components/p-7f93fa08.entry.js +0 -1
- package/dist/taro-components/p-9e1572c5.system.entry.js +0 -1
package/types/Like.d.ts
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
|
+
interface LikeProps extends StandardProps {
|
|
4
|
+
/** 是否已被点赞
|
|
5
|
+
* @supported swan
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
isLiked?: boolean
|
|
9
|
+
|
|
10
|
+
/** 按钮模式。icon:表示仅有图标;mixture:表示图标文字结合
|
|
11
|
+
* @supported swan
|
|
12
|
+
* @default "icon"
|
|
13
|
+
*/
|
|
14
|
+
mode?: string
|
|
15
|
+
|
|
16
|
+
/** 图标类型。hand:表示手形;heart:表示心形
|
|
17
|
+
* @supported swan
|
|
18
|
+
* @default "hand"
|
|
19
|
+
*/
|
|
20
|
+
iconType?: string
|
|
21
|
+
|
|
22
|
+
/** 点赞按钮上的文案。默认为赞,仅在 mode 属性值为'mixture'时有效
|
|
23
|
+
* @supported swan
|
|
24
|
+
* @default "赞"
|
|
25
|
+
*/
|
|
26
|
+
likeText?: string
|
|
27
|
+
|
|
28
|
+
/** 点赞数量
|
|
29
|
+
* @supported swan
|
|
30
|
+
* @default 0
|
|
31
|
+
*/
|
|
32
|
+
likeNum?: number
|
|
33
|
+
|
|
34
|
+
/** 被点赞的对象类型。0:表示对文章内容进行点赞;1:表示对评论内容进行点赞
|
|
35
|
+
* @supported swan
|
|
36
|
+
* @default 0
|
|
37
|
+
*/
|
|
38
|
+
likeType?: number
|
|
39
|
+
|
|
40
|
+
/** 点赞动效形式。0:无动效;1:轻动效;2:强动效
|
|
41
|
+
* @supported swan
|
|
42
|
+
* @default 1
|
|
43
|
+
*/
|
|
44
|
+
animationType?: number
|
|
45
|
+
|
|
46
|
+
/** 点赞后是否弹出 toast 提示
|
|
47
|
+
* @supported swan
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
isShowToast?: boolean
|
|
51
|
+
|
|
52
|
+
/** toast 文案,默认为已点赞、已取消
|
|
53
|
+
* @supported swan
|
|
54
|
+
* @default ['已点赞', '已取消']
|
|
55
|
+
*/
|
|
56
|
+
toastText?: string[]
|
|
57
|
+
|
|
58
|
+
/** 点赞服务需要的必要参数
|
|
59
|
+
* @supported swan
|
|
60
|
+
*/
|
|
61
|
+
likeParam: LikeProps.ILikeParam
|
|
62
|
+
|
|
63
|
+
/** 使用 npm 方式引入点赞组件时,点击按钮时在用户未登录状态下会触发此事件;使用动态库方式引入点赞组件时,点击按钮时在用户未登录状态下不会触发此事件
|
|
64
|
+
* @supported swan
|
|
65
|
+
*/
|
|
66
|
+
onError?: CommonEventFunction
|
|
67
|
+
|
|
68
|
+
/** 点击点赞按钮,在点赞服务成功后将状态返回给使用组件者
|
|
69
|
+
* @supported swan
|
|
70
|
+
*/
|
|
71
|
+
onSuccess?: CommonEventFunction
|
|
72
|
+
|
|
73
|
+
/** 点击点赞按钮,在点赞服务失败后将状态返回给使用组件者
|
|
74
|
+
* @supported swan
|
|
75
|
+
*/
|
|
76
|
+
onFail?: CommonEventFunction
|
|
77
|
+
}
|
|
78
|
+
declare namespace LikeProps {
|
|
79
|
+
interface ILikeParam {
|
|
80
|
+
/** 用户身份唯一标识 */
|
|
81
|
+
openid: string
|
|
82
|
+
|
|
83
|
+
/** 被点赞的文章的 id,与 path 参数一一对应
|
|
84
|
+
* @example "20200101"
|
|
85
|
+
*/
|
|
86
|
+
snid: string
|
|
87
|
+
|
|
88
|
+
/** 被点赞的评论 id */
|
|
89
|
+
spid?: string
|
|
90
|
+
|
|
91
|
+
/** 文章标题 */
|
|
92
|
+
title: string
|
|
93
|
+
|
|
94
|
+
/** 智能小程序内页链接,最长不能超过 194 字符
|
|
95
|
+
* @example "/pages/index/index"
|
|
96
|
+
*/
|
|
97
|
+
path: string
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** 点赞
|
|
102
|
+
* @classification open
|
|
103
|
+
* @supported swan
|
|
104
|
+
* @see https://smartprogram.baidu.com/docs/develop/extended/component-content/like/
|
|
105
|
+
*/
|
|
106
|
+
declare const Like: ComponentType<LikeProps>
|
|
107
|
+
export { Like, LikeProps }
|
package/types/LivePlayer.d.ts
CHANGED
|
@@ -72,6 +72,37 @@ interface LivePlayerProps extends StandardProps {
|
|
|
72
72
|
*/
|
|
73
73
|
pictureInPictureMode?: ('push' | 'pop')[] | 'push' | 'pop' | ''
|
|
74
74
|
|
|
75
|
+
/** 当跳转到其它微信原生页面时,是否自动暂停本页面的实时音视频播放
|
|
76
|
+
* @supported weapp, qq
|
|
77
|
+
*/
|
|
78
|
+
autoPauseIfOpenNative?: string
|
|
79
|
+
|
|
80
|
+
/** 格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;
|
|
81
|
+
* @supported weapp
|
|
82
|
+
*/
|
|
83
|
+
referrerPolicy?: 'origin' | 'no-referrer'
|
|
84
|
+
|
|
85
|
+
/** 设置署名水印
|
|
86
|
+
* @supported tt
|
|
87
|
+
*/
|
|
88
|
+
signature?: string
|
|
89
|
+
|
|
90
|
+
/** 是否回调metadata
|
|
91
|
+
* @supported qq
|
|
92
|
+
*/
|
|
93
|
+
enableMetadata?: string
|
|
94
|
+
|
|
95
|
+
/** live-player 属性的唯一标志符
|
|
96
|
+
* @supported swan
|
|
97
|
+
*/
|
|
98
|
+
id?: string
|
|
99
|
+
|
|
100
|
+
/** 是否开启手机横屏时自动全屏,当系统设置开启自动旋转时生效
|
|
101
|
+
* @supported weapp
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
104
|
+
enableAutoRotation?: string
|
|
105
|
+
|
|
75
106
|
/** 播放状态变化事件,detail = {code}
|
|
76
107
|
* @supported weapp, swan, tt, qq, jd
|
|
77
108
|
*/
|
|
@@ -102,40 +133,15 @@ interface LivePlayerProps extends StandardProps {
|
|
|
102
133
|
*/
|
|
103
134
|
onLeavePictureInPicture?: CommonEventFunction
|
|
104
135
|
|
|
105
|
-
/** 当跳转到其它微信原生页面时,是否自动暂停本页面的实时音视频播放
|
|
106
|
-
* @supported weapp, qq
|
|
107
|
-
*/
|
|
108
|
-
autoPauseIfOpenNative?: string
|
|
109
|
-
|
|
110
|
-
/** 格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;
|
|
111
|
-
* @supported weapp
|
|
112
|
-
*/
|
|
113
|
-
referrerPolicy?: 'origin' | 'no-referrer'
|
|
114
|
-
|
|
115
|
-
/** 设置署名水印
|
|
116
|
-
* @supported tt
|
|
117
|
-
*/
|
|
118
|
-
signature?: string
|
|
119
|
-
|
|
120
136
|
/** 播放错误事件
|
|
121
137
|
* @supported tt
|
|
122
138
|
*/
|
|
123
139
|
onError?: CommonEventFunction
|
|
124
140
|
|
|
125
|
-
/** 是否回调metadata
|
|
126
|
-
* @supported qq
|
|
127
|
-
*/
|
|
128
|
-
enableMetadata?: string
|
|
129
|
-
|
|
130
141
|
/** metadata通知,detail = {info}
|
|
131
142
|
* @supported qq
|
|
132
143
|
*/
|
|
133
144
|
onMetaDataChange?: CommonEventFunction
|
|
134
|
-
|
|
135
|
-
/** live-player 属性的唯一标志符
|
|
136
|
-
* @supported swan
|
|
137
|
-
*/
|
|
138
|
-
id?: string
|
|
139
145
|
}
|
|
140
146
|
declare namespace LivePlayerProps {
|
|
141
147
|
/** mode 的合法值 */
|
|
@@ -265,7 +271,7 @@ declare namespace LivePlayerProps {
|
|
|
265
271
|
*
|
|
266
272
|
* 需要先通过类目审核,再在小程序管理后台,“设置”-“接口设置”中自助开通该组件权限。
|
|
267
273
|
* @classification media
|
|
268
|
-
* @supported weapp, tt
|
|
274
|
+
* @supported weapp, swan, tt, qq, jd
|
|
269
275
|
* @example_react
|
|
270
276
|
* ```tsx
|
|
271
277
|
* class App extends Components {
|
package/types/LivePusher.d.ts
CHANGED
|
@@ -186,6 +186,11 @@ interface LivePusherProps extends StandardProps {
|
|
|
186
186
|
*/
|
|
187
187
|
filter?: keyof LivePusherProps.FilterType
|
|
188
188
|
|
|
189
|
+
/** 设置小窗模式: push, pop,空字符串或通过数组形式设置多种模式(如: ["push", "pop"])
|
|
190
|
+
* @supported weapp
|
|
191
|
+
*/
|
|
192
|
+
pictureInPictureMode?: string | any[]
|
|
193
|
+
|
|
189
194
|
/** 状态变化事件,detail = {code}
|
|
190
195
|
* @supported weapp, qq
|
|
191
196
|
*/
|
|
@@ -211,11 +216,6 @@ interface LivePusherProps extends StandardProps {
|
|
|
211
216
|
*/
|
|
212
217
|
onAudioVolumeNotify?: CommonEventFunction
|
|
213
218
|
|
|
214
|
-
/** 设置小窗模式: push, pop,空字符串或通过数组形式设置多种模式(如: ["push", "pop"])
|
|
215
|
-
* @supported weapp
|
|
216
|
-
*/
|
|
217
|
-
pictureInPictureMode?: string | any[]
|
|
218
|
-
|
|
219
219
|
/** 网络状态通知,detail = {info}
|
|
220
220
|
* @supported weapp, qq
|
|
221
221
|
*/
|
|
@@ -365,7 +365,7 @@ declare namespace LivePusherProps {
|
|
|
365
365
|
/** 实时音视频录制。需要用户授权 scope.camera、scope.record
|
|
366
366
|
* 需要先通过类目审核,再在小程序管理后台,「开发」-「接口设置」中自助开通该组件权限。
|
|
367
367
|
* @classification media
|
|
368
|
-
* @supported weapp
|
|
368
|
+
* @supported weapp, qq
|
|
369
369
|
* @example_react
|
|
370
370
|
* ```tsx
|
|
371
371
|
* class App extends Components {
|
package/types/Login.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
|
+
interface LoginProps extends StandardProps {
|
|
4
|
+
/** 组件中用户授权按钮的类名,可用于自定义样式
|
|
5
|
+
* @supported swan
|
|
6
|
+
*/
|
|
7
|
+
buttonClass?: string
|
|
8
|
+
|
|
9
|
+
/** 组件中用户授权勾选框选中时的颜色,同 CSS 的 color
|
|
10
|
+
* @supported swan
|
|
11
|
+
* @default "#3388FF"
|
|
12
|
+
*/
|
|
13
|
+
checkedColor?: string
|
|
14
|
+
|
|
15
|
+
/** 主题颜色,设置后将应用于 “用户授权按钮背景色” 和 “用户授权勾选框选中时的颜色”
|
|
16
|
+
* 注:theme-color 的优先级低于 button-class 和 checked-color,且当 button-class 存在时,theme-color 不生效
|
|
17
|
+
* @supported swan
|
|
18
|
+
* @default "#3388FF"
|
|
19
|
+
*/
|
|
20
|
+
themeColor?: string
|
|
21
|
+
|
|
22
|
+
/** 用户完成授权后,获取用户手机号:
|
|
23
|
+
* detail.errMsg 值为"getPhoneNumber:ok" 时代表用户信息获取成功;
|
|
24
|
+
* detail.errMsg 值为"getPhoneNumber:fail auth deny"时代表用户信息获取失败。
|
|
25
|
+
* 参考 用户数据的签名验证和加解密 对用户数据进行处理获得用户手机号。
|
|
26
|
+
* 用户手机号信息解密后数据示例:{"mobile":"15000000000"}
|
|
27
|
+
* 1. 非个人开发者可申请;
|
|
28
|
+
* 2. 审核通过后,进入小程序首页,在左侧导航栏单击“设置 -> 开发设置”。下拉页面,在“获取用户手机号权限申请”中单击“申请开通”
|
|
29
|
+
* @supported swan
|
|
30
|
+
*/
|
|
31
|
+
onGetPhoneNumber?: CommonEventFunction
|
|
32
|
+
|
|
33
|
+
/** 组件加载失败回调
|
|
34
|
+
* @supported swan
|
|
35
|
+
*/
|
|
36
|
+
onLoadError?: CommonEventFunction
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** 联合登录 / 手机号授权内嵌组件
|
|
40
|
+
* @classification open
|
|
41
|
+
* @supported swan
|
|
42
|
+
* @see https://smartprogram.baidu.com/docs/develop/component/login/
|
|
43
|
+
*/
|
|
44
|
+
declare const Login: ComponentType<LoginProps>
|
|
45
|
+
export { Login, LoginProps }
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
|
+
interface LottieProps extends StandardProps {
|
|
4
|
+
/** 是否自动播放。
|
|
5
|
+
* @supported alipay
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
autoplay?: boolean
|
|
9
|
+
|
|
10
|
+
/** Lottie 资源地址。包含近端(包内地址)和远端(网络)的 JSON 文件地址。
|
|
11
|
+
* 与 djangoId 二选一。
|
|
12
|
+
* @supported alipay
|
|
13
|
+
*/
|
|
14
|
+
path?: string
|
|
15
|
+
|
|
16
|
+
/** 播放速度。正数为正向播放,负数负向播放。
|
|
17
|
+
* @supported alipay
|
|
18
|
+
* @default 1.0
|
|
19
|
+
*/
|
|
20
|
+
speed?: number
|
|
21
|
+
|
|
22
|
+
/** 循环次数。
|
|
23
|
+
*
|
|
24
|
+
* 如果是负数表示无限次。
|
|
25
|
+
* 如果是 0 表示不循环,播放一次。
|
|
26
|
+
* 如果是 1 表示循环一次,播放两次。
|
|
27
|
+
* @supported alipay
|
|
28
|
+
* @default 0
|
|
29
|
+
*/
|
|
30
|
+
repeatCount?: number
|
|
31
|
+
|
|
32
|
+
/** 是否自动回播。
|
|
33
|
+
* @supported alipay
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
autoReverse?: boolean
|
|
37
|
+
|
|
38
|
+
/** 资源地址。"/" 表明是小程序根目录。
|
|
39
|
+
* @supported alipay
|
|
40
|
+
*/
|
|
41
|
+
assetsPath?: string
|
|
42
|
+
|
|
43
|
+
/** 兜底图或者降级图地址。
|
|
44
|
+
*
|
|
45
|
+
* 1. 支持本地资源,案例:'/image/lottie/lottie2_default.png'。
|
|
46
|
+
* 支持 http 的 cdn 地址、近端地址。
|
|
47
|
+
* 小程序场景不支持 djangoId。
|
|
48
|
+
* @supported alipay
|
|
49
|
+
*/
|
|
50
|
+
placeholder?: string
|
|
51
|
+
|
|
52
|
+
/** 在线资源的 md5 校验。
|
|
53
|
+
* djangoId=https://b.zip。
|
|
54
|
+
* 可以使用 b.zip 加密 获取 md5 值
|
|
55
|
+
* md5="77c6c86fc89ba94cc0a9271b77ae77d2"
|
|
56
|
+
* @supported alipay
|
|
57
|
+
*/
|
|
58
|
+
md5?: string
|
|
59
|
+
|
|
60
|
+
/** 降级。降级是指如遇低端设备,Lottie 会降级展示为 placeholder。
|
|
61
|
+
* 当 optimize 为 true ,并且传入了 placeholder 时,在低端设备上只会展示 placeholder,不展示 Lottie。
|
|
62
|
+
* 低端设备如下所示:
|
|
63
|
+
*
|
|
64
|
+
* iOS :小于等于 iPhone6P
|
|
65
|
+
* Android:内存容量小于 3G
|
|
66
|
+
* @supported alipay
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
optimize?: boolean
|
|
70
|
+
|
|
71
|
+
/** 当数据下载+视图创建完成时触发。
|
|
72
|
+
* @supported alipay
|
|
73
|
+
*/
|
|
74
|
+
onDataReady?: CommonEventFunction
|
|
75
|
+
|
|
76
|
+
/** 数据加载失败时触发。
|
|
77
|
+
* @supported alipay
|
|
78
|
+
*/
|
|
79
|
+
onDataFailed?: CommonEventFunction
|
|
80
|
+
|
|
81
|
+
/** 动画开始时触发。
|
|
82
|
+
* @supported alipay
|
|
83
|
+
*/
|
|
84
|
+
onAnimationStart?: CommonEventFunction
|
|
85
|
+
|
|
86
|
+
/** 动画结束时触发。
|
|
87
|
+
* @supported alipay
|
|
88
|
+
*/
|
|
89
|
+
onAnimationEnd?: CommonEventFunction
|
|
90
|
+
|
|
91
|
+
/** 动画一次重播结束。
|
|
92
|
+
* @supported alipay
|
|
93
|
+
*/
|
|
94
|
+
onAnimationRepeat?: CommonEventFunction
|
|
95
|
+
|
|
96
|
+
/** 动画取消。业务调用 Cancel 时回调。
|
|
97
|
+
* @supported alipay
|
|
98
|
+
*/
|
|
99
|
+
onAnimationCancel?: CommonEventFunction
|
|
100
|
+
|
|
101
|
+
/** 参数化时,数据准备完成,等待业务传入参数化值。
|
|
102
|
+
* @supported alipay
|
|
103
|
+
*/
|
|
104
|
+
onDataLoadReady?: CommonEventFunction
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Lottie
|
|
108
|
+
* @classification media
|
|
109
|
+
* @supported alipay
|
|
110
|
+
* @see https://opendocs.alipay.com/mini/component/lottie
|
|
111
|
+
*/
|
|
112
|
+
declare const Lottie: ComponentType<LottieProps>
|
|
113
|
+
export { Lottie, LottieProps }
|
package/types/Map.d.ts
CHANGED
|
@@ -155,6 +155,65 @@ interface MapProps extends StandardProps {
|
|
|
155
155
|
[key: string]: number | string | any
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
/** 视野在地图 padding 范围内展示
|
|
159
|
+
* @supported alipay
|
|
160
|
+
*/
|
|
161
|
+
includePadding?: { [key in 'left' | 'right' | 'top' | 'bottom']: number | string }
|
|
162
|
+
|
|
163
|
+
/** 覆盖物,自定义贴图
|
|
164
|
+
* @supported alipay
|
|
165
|
+
*/
|
|
166
|
+
groundOverlays?: any[]
|
|
167
|
+
|
|
168
|
+
/** 覆盖物,网格贴图
|
|
169
|
+
* @supported alipay
|
|
170
|
+
*/
|
|
171
|
+
tileOverlay?: any[]
|
|
172
|
+
|
|
173
|
+
/** 是否展示 POI 点
|
|
174
|
+
* @supported weapp, alipay, tt
|
|
175
|
+
*/
|
|
176
|
+
enablePoi?: string
|
|
177
|
+
|
|
178
|
+
/** 是否展示建筑物
|
|
179
|
+
* @supported weapp, alipay, tt
|
|
180
|
+
*/
|
|
181
|
+
enableBuilding?: string
|
|
182
|
+
|
|
183
|
+
/** 覆盖物,多边形。
|
|
184
|
+
* @supported alipay
|
|
185
|
+
*/
|
|
186
|
+
polygon?: string
|
|
187
|
+
|
|
188
|
+
/** 设置地图样式。
|
|
189
|
+
*
|
|
190
|
+
* default:默认样式
|
|
191
|
+
* light:精简样式
|
|
192
|
+
* @supported alipay
|
|
193
|
+
*/
|
|
194
|
+
customMapStyle?: string
|
|
195
|
+
|
|
196
|
+
/** 基于 map 高级定制渲染,设置覆盖在地图上的 view。
|
|
197
|
+
* @supported alipay
|
|
198
|
+
*/
|
|
199
|
+
panels?: string
|
|
200
|
+
|
|
201
|
+
/** 否
|
|
202
|
+
* @supported jd
|
|
203
|
+
*/
|
|
204
|
+
theme?: string
|
|
205
|
+
|
|
206
|
+
/** 内联样式。
|
|
207
|
+
* @supported alipay
|
|
208
|
+
*/
|
|
209
|
+
optimize?: string
|
|
210
|
+
|
|
211
|
+
/** 展示3D楼块
|
|
212
|
+
* @supported weapp, swan, tt, qq
|
|
213
|
+
* @default false
|
|
214
|
+
*/
|
|
215
|
+
enable3D?: boolean
|
|
216
|
+
|
|
158
217
|
/** 点击地图时触发
|
|
159
218
|
* @supported weapp, alipay, swan, tt, qq, jd
|
|
160
219
|
*/
|
|
@@ -188,42 +247,13 @@ interface MapProps extends StandardProps {
|
|
|
188
247
|
/** 视野发生变化时触发
|
|
189
248
|
* @supported weapp, alipay, swan, tt, qq, jd
|
|
190
249
|
*/
|
|
191
|
-
onRegionChange?: CommonEventFunction<
|
|
192
|
-
MapProps.onRegionEventDetail<'begin'> | MapProps.onRegionEventDetail<'end'>
|
|
193
|
-
>
|
|
250
|
+
onRegionChange?: CommonEventFunction<MapProps.onRegionEventDetail<'begin'> | MapProps.onRegionEventDetail<'end'>>
|
|
194
251
|
|
|
195
252
|
/** 点击地图poi点时触发,e.detail = {name, longitude, latitude}
|
|
196
253
|
* @supported weapp, swan, qq
|
|
197
254
|
*/
|
|
198
255
|
onPoiTap?: CommonEventFunction<MapProps.onPoiTapEventDetail>
|
|
199
256
|
|
|
200
|
-
/** 视野在地图 padding 范围内展示
|
|
201
|
-
* @supported alipay
|
|
202
|
-
*/
|
|
203
|
-
includePadding?: {
|
|
204
|
-
[key in 'left' | 'right' | 'top' | 'bottom']: number | string
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/** 覆盖物,自定义贴图
|
|
208
|
-
* @supported alipay
|
|
209
|
-
*/
|
|
210
|
-
groundOverlays?: any[]
|
|
211
|
-
|
|
212
|
-
/** 覆盖物,网格贴图
|
|
213
|
-
* @supported alipay
|
|
214
|
-
*/
|
|
215
|
-
tileOverlay?: any[]
|
|
216
|
-
|
|
217
|
-
/** 是否展示 POI 点
|
|
218
|
-
* @supported weapp, alipay, tt
|
|
219
|
-
*/
|
|
220
|
-
enablePoi?: string
|
|
221
|
-
|
|
222
|
-
/** 是否展示建筑物
|
|
223
|
-
* @supported weapp, alipay, tt
|
|
224
|
-
*/
|
|
225
|
-
enableBuilding?: string
|
|
226
|
-
|
|
227
257
|
/** 点击标记点对应的气泡时触发e.detail = {markerId}
|
|
228
258
|
* @supported weapp, swan, tt, jd
|
|
229
259
|
*/
|
|
@@ -234,49 +264,18 @@ interface MapProps extends StandardProps {
|
|
|
234
264
|
*/
|
|
235
265
|
onAnchorPointTap?: CommonEventFunction
|
|
236
266
|
|
|
237
|
-
/** 覆盖物,多边形。
|
|
238
|
-
* @supported alipay
|
|
239
|
-
*/
|
|
240
|
-
polygon?: string
|
|
241
|
-
|
|
242
|
-
/** 设置地图样式。
|
|
243
|
-
*
|
|
244
|
-
* default:默认样式
|
|
245
|
-
* light:精简样式
|
|
246
|
-
* @supported alipay
|
|
247
|
-
*/
|
|
248
|
-
customMapStyle?: string
|
|
249
|
-
|
|
250
|
-
/** 基于 map 高级定制渲染,设置覆盖在地图上的 view。
|
|
251
|
-
* @supported alipay
|
|
252
|
-
*/
|
|
253
|
-
panels?: string
|
|
254
|
-
|
|
255
267
|
/** 点击 panel 时触发。
|
|
256
268
|
* @supported alipay
|
|
257
269
|
*/
|
|
258
|
-
onPanelTap?: CommonEventFunction<{
|
|
270
|
+
onPanelTap?: CommonEventFunction<{
|
|
271
|
+
panelId
|
|
272
|
+
layoutId
|
|
273
|
+
}>
|
|
259
274
|
|
|
260
275
|
/** 地图初始化完成即将开始渲染第一帧时触发。
|
|
261
276
|
* @supported alipay
|
|
262
277
|
*/
|
|
263
278
|
onInitComplete?: CommonEventFunction
|
|
264
|
-
|
|
265
|
-
/** 否
|
|
266
|
-
* @supported jd
|
|
267
|
-
*/
|
|
268
|
-
theme?: string
|
|
269
|
-
|
|
270
|
-
/** 内联样式。
|
|
271
|
-
* @supported alipay
|
|
272
|
-
*/
|
|
273
|
-
optimize?: string
|
|
274
|
-
|
|
275
|
-
/** 展示3D楼块
|
|
276
|
-
* @supported weapp, swan, tt, qq
|
|
277
|
-
* @default false
|
|
278
|
-
*/
|
|
279
|
-
enable3D?: string
|
|
280
279
|
}
|
|
281
280
|
declare namespace MapProps {
|
|
282
281
|
/** 标记点用于在地图上显示标记的位置 */
|
|
@@ -633,9 +632,7 @@ declare namespace MapProps {
|
|
|
633
632
|
/** 导致视野变化的原因
|
|
634
633
|
* @remarks 有效值为 gesture(手势触发)、update(接口触发或调用更新接口导致)、drag(拖动导致)、scale(缩放导致)
|
|
635
634
|
*/
|
|
636
|
-
causedBy: keyof (T extends 'begin'
|
|
637
|
-
? RegionChangeDetail.CausedByBegin
|
|
638
|
-
: RegionChangeDetail.CausedByEnd)
|
|
635
|
+
causedBy: keyof (T extends 'begin' ? RegionChangeDetail.CausedByBegin : RegionChangeDetail.CausedByEnd)
|
|
639
636
|
|
|
640
637
|
/** 视野改变详情 */
|
|
641
638
|
detail: regionChangeDetail<RegionChangeDetail.type>
|
|
@@ -646,9 +643,7 @@ declare namespace MapProps {
|
|
|
646
643
|
|
|
647
644
|
/** 倾斜角度 */
|
|
648
645
|
skew: number
|
|
649
|
-
causedBy: keyof (T extends 'begin'
|
|
650
|
-
? RegionChangeDetail.CausedByBegin
|
|
651
|
-
: RegionChangeDetail.CausedByEnd)
|
|
646
|
+
causedBy: keyof (T extends 'begin' ? RegionChangeDetail.CausedByBegin : RegionChangeDetail.CausedByEnd)
|
|
652
647
|
type: T | string
|
|
653
648
|
scale: number
|
|
654
649
|
centerLocation: point
|
|
@@ -666,7 +661,7 @@ declare namespace MapProps {
|
|
|
666
661
|
|
|
667
662
|
/** 地图。相关api Taro.createMapContext。
|
|
668
663
|
* @classification maps
|
|
669
|
-
* @supported weapp, alipay, swan
|
|
664
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
670
665
|
* @example_react
|
|
671
666
|
* ```tsx
|
|
672
667
|
* class App extends Component {
|
package/types/MatchMedia.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ interface MatchMediaProps extends StandardProps {
|
|
|
39
39
|
|
|
40
40
|
/** media query 匹配检测节点。可以指定一组 media query 规则,满足时,这个节点才会被展示。
|
|
41
41
|
* 通过这个节点可以实现“页面宽高在某个范围时才展示某个区域”这样的效果。
|
|
42
|
-
* @supported weapp
|
|
42
|
+
* @supported weapp, alipay
|
|
43
43
|
* @classification viewContainer
|
|
44
44
|
* @example_react
|
|
45
45
|
* ```tsx
|
package/types/MovableArea.d.ts
CHANGED
|
@@ -3,14 +3,14 @@ import { StandardProps } from './common'
|
|
|
3
3
|
interface MovableAreaProps extends StandardProps {
|
|
4
4
|
/** 当里面的 movable-view 设置为支持双指缩放时,设置此值可将缩放手势生效区域修改为整个 movable-area
|
|
5
5
|
* @default false
|
|
6
|
-
* @supported weapp, alipay, swan, tt, qq
|
|
6
|
+
* @supported weapp, alipay, swan, tt, qq, h5
|
|
7
7
|
*/
|
|
8
8
|
scaleArea?: boolean
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/** movable-view 的可移动区域
|
|
12
12
|
* @classification viewContainer
|
|
13
|
-
* @supported weapp, rn
|
|
13
|
+
* @supported weapp, alipay, swan, tt, qq, h5, rn
|
|
14
14
|
* @example_react
|
|
15
15
|
* ```tsx
|
|
16
16
|
* class App extends Components {
|