@tarojs/components 3.5.7 → 3.5.8

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.
Files changed (100) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/taro-button-core.cjs.entry.js +5 -0
  3. package/dist/cjs/taro-components.cjs.js +1 -1
  4. package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
  5. package/dist/cjs/taro-movable-view-core.cjs.entry.js +18 -43
  6. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +5 -0
  7. package/dist/cjs/taro-video-control_3.cjs.entry.js +98 -181
  8. package/dist/collection/components/button/button.js +11 -0
  9. package/dist/collection/components/movable-area/area.css +2 -2
  10. package/dist/collection/components/movable-area/movable-view.js +18 -33
  11. package/dist/collection/components/swiper/swiper.js +23 -0
  12. package/dist/collection/components/video/video-control.js +22 -39
  13. package/dist/collection/components/video/video-danmu.js +39 -52
  14. package/dist/collection/components/video/video.js +37 -60
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/taro-button-core.entry.js +5 -0
  17. package/dist/esm/taro-components.js +1 -1
  18. package/dist/esm/taro-movable-area-core.entry.js +1 -1
  19. package/dist/esm/taro-movable-view-core.entry.js +18 -43
  20. package/dist/esm/taro-swiper-core_2.entry.js +5 -0
  21. package/dist/esm/taro-video-control_3.entry.js +98 -181
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/taro-button-core.entry.js +1 -1
  24. package/dist/esm-es5/taro-components.js +1 -1
  25. package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
  26. package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
  27. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  28. package/dist/esm-es5/taro-video-control_3.entry.js +55 -55
  29. package/dist/taro-components/p-0380841f.system.js +1 -1
  30. package/dist/taro-components/{p-a94524c9.system.entry.js → p-06b9d39c.system.entry.js} +1 -1
  31. package/dist/taro-components/{p-63a0c6b0.entry.js → p-34178401.entry.js} +1 -1
  32. package/dist/taro-components/p-3549b6d2.entry.js +1 -0
  33. package/dist/taro-components/p-4262d1b6.entry.js +1 -0
  34. package/dist/taro-components/{p-f8b9c4b0.entry.js → p-42630f45.entry.js} +1 -1
  35. package/dist/taro-components/{p-f81a74bb.system.entry.js → p-4c1a7cae.system.entry.js} +81 -81
  36. package/dist/taro-components/{p-3744e978.entry.js → p-99d17a1a.entry.js} +52 -52
  37. package/dist/taro-components/{p-13f0b11f.system.entry.js → p-a5496bf5.system.entry.js} +1 -1
  38. package/dist/taro-components/p-f40e1218.system.entry.js +1 -0
  39. package/dist/taro-components/{p-1c775a11.system.entry.js → p-f5f1c3b7.system.entry.js} +1 -1
  40. package/dist/taro-components/taro-components.esm.js +1 -1
  41. package/dist/types/components/button/button.d.ts +1 -0
  42. package/dist/types/components/swiper/swiper.d.ts +4 -0
  43. package/dist/types/components.d.ts +8 -0
  44. package/package.json +15 -12
  45. package/types/Ad.d.ts +20 -21
  46. package/types/AnimationVideo.d.ts +62 -0
  47. package/types/AnimationView.d.ts +45 -0
  48. package/types/ArCamera.d.ts +50 -0
  49. package/types/Audio.d.ts +5 -5
  50. package/types/AwemeData.d.ts +43 -0
  51. package/types/Button.d.ts +67 -70
  52. package/types/Camera.d.ts +15 -16
  53. package/types/Canvas.d.ts +22 -27
  54. package/types/Checkbox.d.ts +7 -7
  55. package/types/CommentDetail.d.ts +72 -0
  56. package/types/CommentList.d.ts +128 -0
  57. package/types/ContactButton.d.ts +53 -0
  58. package/types/CoverImage.d.ts +15 -15
  59. package/types/CoverView.d.ts +5 -5
  60. package/types/FollowSwan.d.ts +28 -0
  61. package/types/Form.d.ts +10 -10
  62. package/types/Image.d.ts +20 -20
  63. package/types/InlinePaymentPanel.d.ts +58 -0
  64. package/types/Input.d.ts +23 -21
  65. package/types/Lifestyle.d.ts +26 -0
  66. package/types/Like.d.ts +107 -0
  67. package/types/LivePlayer.d.ts +31 -25
  68. package/types/LivePusher.d.ts +5 -5
  69. package/types/Login.d.ts +45 -0
  70. package/types/Lottie.d.ts +113 -0
  71. package/types/Map.d.ts +66 -71
  72. package/types/MovableView.d.ts +5 -14
  73. package/types/NativeSlot.d.ts +32 -0
  74. package/types/Navigator.d.ts +10 -10
  75. package/types/OpenData.d.ts +5 -5
  76. package/types/PageContainer.d.ts +7 -10
  77. package/types/PageMeta.d.ts +14 -14
  78. package/types/Picker.d.ts +1 -5
  79. package/types/PickerView.d.ts +11 -21
  80. package/types/Progress.d.ts +5 -5
  81. package/types/RadioGroup.d.ts +5 -5
  82. package/types/RichText.d.ts +17 -17
  83. package/types/RtcRoom.d.ts +104 -0
  84. package/types/RtcRoomItem.d.ts +26 -0
  85. package/types/ScrollView.d.ts +46 -30
  86. package/types/Slider.d.ts +10 -10
  87. package/types/Slot.d.ts +1 -1
  88. package/types/Swiper.d.ts +31 -19
  89. package/types/Switch.d.ts +5 -5
  90. package/types/TabItem.d.ts +35 -0
  91. package/types/Tabs.d.ts +58 -0
  92. package/types/Textarea.d.ts +32 -32
  93. package/types/Video.d.ts +120 -111
  94. package/types/View.d.ts +20 -13
  95. package/types/VoipRoom.d.ts +5 -5
  96. package/types/WebView.d.ts +11 -5
  97. package/types/index.vue3.d.ts +267 -259
  98. package/dist/taro-components/p-6800ac6f.entry.js +0 -1
  99. package/dist/taro-components/p-7f93fa08.entry.js +0 -1
  100. package/dist/taro-components/p-9e1572c5.system.entry.js +0 -1
package/types/Input.d.ts CHANGED
@@ -58,11 +58,13 @@ interface InputProps extends StandardProps, FormItemProps {
58
58
 
59
59
  /** (即将废弃,请直接使用 focus )自动聚焦,拉起键盘
60
60
  * @default false
61
- * @supported weapp, qq, jd
61
+ * @deprecated
62
+ * @supported weapp, qq, jd, h5
62
63
  */
63
64
  autoFocus?: boolean
64
65
 
65
66
  /** 获取焦点
67
+ * @default false
66
68
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
67
69
  */
68
70
  focus?: boolean
@@ -165,6 +167,26 @@ interface InputProps extends StandardProps, FormItemProps {
165
167
  */
166
168
  controlled?: boolean
167
169
 
170
+ /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
171
+ * @supported h5
172
+ */
173
+ nativeProps?: Record<string, unknown>
174
+
175
+ /** 组件名字,用于表单提交获取数据。
176
+ * @supported alipay
177
+ */
178
+ name?: string
179
+
180
+ /** 是否强制使用系统键盘和 Web-view 创建的 input 元素。为 true 时,confirm-type、confirm-hold 可能失效。
181
+ * @supported alipay
182
+ */
183
+ alwaysSystem?: string
184
+
185
+ /** 无障碍访问,(属性)元素的额外描述
186
+ * @supported qq
187
+ */
188
+ ariaLabel?: string
189
+
168
190
  /** 当键盘输入时,触发input事件,event.detail = {value, cursor, keyCode},处理函数可以直接 return 一个字符串,将替换输入框的内容。
169
191
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
170
192
  */
@@ -190,26 +212,6 @@ interface InputProps extends StandardProps, FormItemProps {
190
212
  * @supported weapp, qq
191
213
  */
192
214
  onKeyboardHeightChange?: CommonEventFunction<InputProps.onKeyboardHeightChangeEventDetail>
193
-
194
- /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
195
- * @supported h5
196
- */
197
- nativeProps?: Record<string, unknown>
198
-
199
- /** 组件名字,用于表单提交获取数据。
200
- * @supported alipay
201
- */
202
- name?: string
203
-
204
- /** 是否强制使用系统键盘和 Web-view 创建的 input 元素。为 true 时,confirm-type、confirm-hold 可能失效。
205
- * @supported alipay
206
- */
207
- alwaysSystem?: string
208
-
209
- /** 无障碍访问,(属性)元素的额外描述
210
- * @supported qq
211
- */
212
- ariaLabel?: string
213
215
  }
214
216
  declare namespace InputProps {
215
217
  /** > 注意:React-Native 端 `inputEventDetail` 仅实现参数 `value`,若需实时获取光标位置则可通过 [`onSelectionChange`](https://reactnative.dev/docs/textinput#onselectionchange) 实现。 */
@@ -0,0 +1,26 @@
1
+ import { ComponentType } from 'react'
2
+ import { StandardProps } from './common'
3
+ interface LifestyleProps extends StandardProps {
4
+ /** 必填,生活号 ID(即生活号 APPID),必须是当前小程序同账号主体且已关联的生活号。
5
+ * @supported alipay
6
+ */
7
+ publicId?: string
8
+
9
+ /** 文案。支持商家自定义,最多展示一行。
10
+ * @supported alipay
11
+ */
12
+ memo?: string
13
+
14
+ /** 当用户关注生活号成功后执行。
15
+ * @supported alipay
16
+ */
17
+ onFollow?: CommonEventFunction
18
+ }
19
+
20
+ /** 关注生活号
21
+ * @classification open
22
+ * @supported alipay
23
+ * @see https://opendocs.alipay.com/mini/component/lifestyle
24
+ */
25
+ declare const Lifestyle: ComponentType<LifestyleProps>
26
+ export { Lifestyle, LifestyleProps }
@@ -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 }
@@ -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 的合法值 */
@@ -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
  */
@@ -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<{ panelId, layoutId }>
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
@@ -1,9 +1,5 @@
1
1
  import { ComponentType } from 'react'
2
- import {
3
- StandardProps,
4
- CommonEventFunction,
5
- TouchEventFunction,
6
- } from './common'
2
+ import { StandardProps, CommonEventFunction, TouchEventFunction } from './common'
7
3
  interface MovableViewProps extends Omit<StandardProps, 'animation'> {
8
4
  /** movable-view 的移动方向,属性值有`all`、`vertical`、`horizontal`、`none`
9
5
  * @default none
@@ -101,11 +97,6 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
101
97
  */
102
98
  onDragEnd?: CommonEventFunction
103
99
 
104
- /** 触摸动作结束,事件会向父节点传递。
105
- * @supported alipay
106
- */
107
- onDragEnd?: CommonEventFunction
108
-
109
100
  /** 缩放过程中触发的事件
110
101
  * @supported weapp, alipay, swan, tt, qq
111
102
  */
@@ -122,7 +113,7 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
122
113
  onTouchMove?: CommonEventFunction
123
114
 
124
115
  /** 手指触摸动作结束
125
- * @supported h5
116
+ * @supported alipay, h5
126
117
  * @h5 此事件的触发顺序会因为当前事件机制引起组件内外注册的事件执行顺序不正常,外部注册的事件可能会优先于内部执行,如需保证执行顺序一致,需要在回调函数中包裹 setTimeout 临时处理
127
118
  */
128
119
  onTouchEnd?: TouchEventFunction
@@ -133,12 +124,12 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
133
124
  onTouchCancel?: CommonEventFunction
134
125
 
135
126
  /** 初次手指触摸后移动为横向的移动,如果 catch 此事件,则意味着 touchmove 事件也被 catch
136
- * @supported swan
127
+ * @supported weapp, swan, tt
137
128
  */
138
129
  onHTouchMove?: TouchEventFunction
139
130
 
140
131
  /** 初次手指触摸后移动为纵向的移动,如果 catch 此事件,则意味着 touchmove 事件也被 catch
141
- * @supported swan
132
+ * @supported weapp, swan, tt
142
133
  */
143
134
  onVTouchMove?: TouchEventFunction
144
135
 
@@ -148,7 +139,7 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
148
139
  catchTouchStart?: CommonEventFunction
149
140
 
150
141
  /** 触摸移动事件,事件仅作用于组件,不向父节点传递。
151
- * @supported weapp, tt, alipay
142
+ * @supported alipay
152
143
  */
153
144
  catchTouchMove?: CommonEventFunction
154
145