@tarojs/plugin-platform-weapp 3.5.0-alpha.13 → 3.5.0-alpha.16

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.
@@ -1,383 +1,394 @@
1
1
  import { processApis } from '@tarojs/shared';
2
2
 
3
- const needPromiseApis = new Set([
4
- 'authPrivateMessage',
5
- 'disableAlertBeforeUnload',
6
- 'enableAlertBeforeUnload',
7
- 'getBackgroundFetchData',
8
- 'getGroupEnterInfo',
9
- 'getShareInfo',
10
- 'getWeRunData',
11
- 'join1v1Chat',
12
- 'openVideoEditor',
13
- 'saveFileToDisk',
14
- 'scanItem',
15
- 'setEnable1v1Chat',
16
- 'setWindowSize',
17
- 'sendBizRedPacket',
18
- 'startFacialRecognitionVerify',
19
- 'openCustomerServiceChat',
20
- 'getLocalIPAddress',
21
- 'getUserProfile'
3
+ const needPromiseApis = new Set([
4
+ 'authPrivateMessage',
5
+ 'disableAlertBeforeUnload',
6
+ 'enableAlertBeforeUnload',
7
+ 'getBackgroundFetchData',
8
+ 'getGroupEnterInfo',
9
+ 'getShareInfo',
10
+ 'getWeRunData',
11
+ 'join1v1Chat',
12
+ 'openVideoEditor',
13
+ 'saveFileToDisk',
14
+ 'scanItem',
15
+ 'setEnable1v1Chat',
16
+ 'setWindowSize',
17
+ 'sendBizRedPacket',
18
+ 'startFacialRecognitionVerify',
19
+ 'openCustomerServiceChat',
20
+ 'getLocalIPAddress',
21
+ 'getUserProfile',
22
+ 'editImage'
22
23
  ]);
23
24
 
24
- function initNativeApi(taro) {
25
- processApis(taro, wx, {
26
- needPromiseApis,
27
- modifyApis(apis) {
28
- // fix https://github.com/NervJS/taro/issues/9899
29
- apis.delete('lanDebug');
30
- }
31
- });
32
- taro.cloud = wx.cloud;
33
- taro.getTabBar = function (pageCtx) {
34
- var _a;
35
- if (typeof (pageCtx === null || pageCtx === void 0 ? void 0 : pageCtx.getTabBar) === 'function') {
36
- return (_a = pageCtx.getTabBar()) === null || _a === void 0 ? void 0 : _a.$taroInstances;
37
- }
38
- };
25
+ function initNativeApi(taro) {
26
+ processApis(taro, wx, {
27
+ needPromiseApis,
28
+ modifyApis(apis) {
29
+ // fix https://github.com/NervJS/taro/issues/9899
30
+ apis.delete('lanDebug');
31
+ }
32
+ });
33
+ taro.cloud = wx.cloud;
34
+ taro.getTabBar = function (pageCtx) {
35
+ var _a;
36
+ if (typeof (pageCtx === null || pageCtx === void 0 ? void 0 : pageCtx.getTabBar) === 'function') {
37
+ return (_a = pageCtx.getTabBar()) === null || _a === void 0 ? void 0 : _a.$taroInstances;
38
+ }
39
+ };
39
40
  }
40
41
 
41
- const _true = 'true';
42
- const _false = 'false';
43
- const _empty = '';
44
- const _zero = '0';
45
- const components = {
46
- // ======== 调整属性 ========
47
- Progress: {
48
- 'border-radius': _zero,
49
- 'font-size': '16',
50
- duration: '30',
51
- bindActiveEnd: _empty
52
- },
53
- RichText: {
54
- space: _empty
55
- },
56
- Text: {
57
- 'user-select': _false
58
- },
59
- Map: {
60
- polygons: '[]',
61
- subkey: _empty,
62
- rotate: _zero,
63
- skew: _zero,
64
- 'max-scale': '20',
65
- 'min-scale': '3',
66
- 'enable-3D': _false,
67
- 'show-compass': _false,
68
- 'show-scale': _false,
69
- 'enable-overlooking': _false,
70
- 'enable-zoom': _true,
71
- 'enable-scroll': _true,
72
- 'enable-rotate': _false,
73
- 'enable-satellite': _false,
74
- 'enable-traffic': _false,
75
- setting: '[]',
76
- bindLabelTap: _empty,
77
- bindRegionChange: _empty,
78
- bindPoiTap: _empty
79
- },
80
- Button: {
81
- lang: 'en',
82
- 'session-from': _empty,
83
- 'send-message-title': _empty,
84
- 'send-message-path': _empty,
85
- 'send-message-img': _empty,
86
- 'app-parameter': _empty,
87
- 'show-message-card': _false,
88
- 'business-id': _empty,
89
- bindGetUserInfo: _empty,
90
- bindContact: _empty,
91
- bindGetPhoneNumber: _empty,
92
- bindChooseAvatar: _empty,
93
- bindError: _empty,
94
- bindOpenSetting: _empty,
95
- bindLaunchApp: _empty
96
- },
97
- Form: {
98
- 'report-submit-timeout': _zero
99
- },
100
- Input: {
101
- 'always-embed': _false,
102
- 'adjust-position': _true,
103
- 'hold-keyboard': _false,
104
- 'safe-password-cert-path': '',
105
- 'safe-password-length': '',
106
- 'safe-password-time-stamp': '',
107
- 'safe-password-nonce': '',
108
- 'safe-password-salt': '',
109
- 'safe-password-custom-hash': '',
110
- bindKeyboardHeightChange: _empty
111
- },
112
- Picker: {
113
- 'header-text': _empty
114
- },
115
- PickerView: {
116
- 'immediate-change': _false,
117
- bindPickStart: _empty,
118
- bindPickEnd: _empty
119
- },
120
- Slider: {
121
- color: "'#e9e9e9'",
122
- 'selected-color': "'#1aad19'"
123
- },
124
- Textarea: {
125
- 'show-confirm-bar': _true,
126
- 'adjust-position': _true,
127
- 'hold-keyboard': _false,
128
- 'disable-default-padding': _false,
129
- 'confirm-type': "'return'",
130
- 'confirm-hold': _false,
131
- bindKeyboardHeightChange: _empty
132
- },
133
- ScrollView: {
134
- 'enable-flex': _false,
135
- 'scroll-anchoring': _false,
136
- 'refresher-enabled': _false,
137
- 'refresher-threshold': '45',
138
- 'refresher-default-style': "'black'",
139
- 'refresher-background': "'#FFF'",
140
- 'refresher-triggered': _false,
141
- enhanced: _false,
142
- bounces: _true,
143
- 'show-scrollbar': _true,
144
- 'paging-enabled': _false,
145
- 'fast-deceleration': _false,
146
- bindDragStart: _empty,
147
- bindDragging: _empty,
148
- bindDragEnd: _empty,
149
- bindRefresherPulling: _empty,
150
- bindRefresherRefresh: _empty,
151
- bindRefresherRestore: _empty,
152
- bindRefresherAbort: _empty
153
- },
154
- Swiper: {
155
- 'snap-to-edge': _false,
156
- 'easing-function': "'default'"
157
- },
158
- SwiperItem: {
159
- 'skip-hidden-item-layout': _false
160
- },
161
- Navigator: {
162
- target: "'self'",
163
- 'app-id': _empty,
164
- path: _empty,
165
- 'extra-data': _empty,
166
- version: "'version'"
167
- },
168
- Camera: {
169
- mode: "'normal'",
170
- resolution: "'medium'",
171
- 'frame-size': "'medium'",
172
- bindInitDone: _empty,
173
- bindScanCode: _empty
174
- },
175
- Image: {
176
- webp: _false,
177
- 'show-menu-by-longpress': _false
178
- },
179
- LivePlayer: {
180
- mode: "'live'",
181
- 'sound-mode': "'speaker'",
182
- 'auto-pause-if-navigate': _true,
183
- 'auto-pause-if-open-native': _true,
184
- 'picture-in-picture-mode': '[]',
185
- bindstatechange: _empty,
186
- bindfullscreenchange: _empty,
187
- bindnetstatus: _empty,
188
- bindAudioVolumeNotify: _empty,
189
- bindEnterPictureInPicture: _empty,
190
- bindLeavePictureInPicture: _empty
191
- },
192
- Video: {
193
- title: _empty,
194
- 'play-btn-position': "'bottom'",
195
- 'enable-play-gesture': _false,
196
- 'auto-pause-if-navigate': _true,
197
- 'auto-pause-if-open-native': _true,
198
- 'vslide-gesture': _false,
199
- 'vslide-gesture-in-fullscreen': _true,
200
- 'ad-unit-id': _empty,
201
- 'poster-for-crawler': _empty,
202
- 'show-casting-button': _false,
203
- 'picture-in-picture-mode': '[]',
204
- // picture-in-picture-show-progress 属性先注释掉的原因如下:
205
- // 该属性超过了 wxml 属性的长度限制,实际无法使用且导致编译报错。可等微信官方修复后再放开。
206
- // 参考1:https://developers.weixin.qq.com/community/develop/doc/000a429beb87f0eac07acc0fc5b400
207
- // 参考2: https://developers.weixin.qq.com/community/develop/doc/0006883619c48054286a4308258c00?_at=vyxqpllafi
208
- // 'picture-in-picture-show-progress': 'false',
209
- 'enable-auto-rotation': _false,
210
- 'show-screen-lock-button': _false,
211
- 'show-snapshot-button': _false,
212
- 'show-background-playback-button': _false,
213
- 'background-poster': _empty,
214
- bindProgress: _empty,
215
- bindLoadedMetadata: _empty,
216
- bindControlsToggle: _empty,
217
- bindEnterPictureInPicture: _empty,
218
- bindLeavePictureInPicture: _empty,
219
- bindSeekComplete: _empty,
220
- bindAdLoad: _empty,
221
- bindAdError: _empty,
222
- bindAdClose: _empty,
223
- bindAdPlay: _empty
224
- },
225
- Canvas: {
226
- type: _empty
227
- },
228
- Ad: {
229
- 'ad-type': "'banner'",
230
- 'ad-theme': "'white'"
231
- },
232
- CoverView: {
233
- 'marker-id': _empty,
234
- slot: _empty
235
- },
236
- // ======== 额外组件 ========
237
- Editor: {
238
- 'read-only': _false,
239
- placeholder: _empty,
240
- 'show-img-size': _false,
241
- 'show-img-toolbar': _false,
242
- 'show-img-resize': _false,
243
- focus: _false,
244
- bindReady: _empty,
245
- bindFocus: _empty,
246
- bindBlur: _empty,
247
- bindInput: _empty,
248
- bindStatusChange: _empty,
249
- name: _empty
250
- },
251
- MatchMedia: {
252
- 'min-width': _empty,
253
- 'max-width': _empty,
254
- width: _empty,
255
- 'min-height': _empty,
256
- 'max-height': _empty,
257
- height: _empty,
258
- orientation: _empty
259
- },
260
- FunctionalPageNavigator: {
261
- version: "'release'",
262
- name: _empty,
263
- args: _empty,
264
- bindSuccess: _empty,
265
- bindFail: _empty,
266
- bindCancel: _empty
267
- },
268
- LivePusher: {
269
- url: _empty,
270
- mode: "'RTC'",
271
- autopush: _false,
272
- muted: _false,
273
- 'enable-camera': _true,
274
- 'auto-focus': _true,
275
- orientation: "'vertical'",
276
- beauty: _zero,
277
- whiteness: _zero,
278
- aspect: "'9:16'",
279
- 'min-bitrate': '200',
280
- 'max-bitrate': '1000',
281
- 'audio-quality': "'high'",
282
- 'waiting-image': _empty,
283
- 'waiting-image-hash': _empty,
284
- zoom: _false,
285
- 'device-position': "'front'",
286
- 'background-mute': _false,
287
- mirror: _false,
288
- 'remote-mirror': _false,
289
- 'local-mirror': _false,
290
- 'audio-reverb-type': _zero,
291
- 'enable-mic': _true,
292
- 'enable-agc': _false,
293
- 'enable-ans': _false,
294
- 'audio-volume-type': "'voicecall'",
295
- 'video-width': '360',
296
- 'video-height': '640',
297
- 'beauty-style': "'smooth'",
298
- filter: "'standard'",
299
- animation: _empty,
300
- bindStateChange: _empty,
301
- bindNetStatus: _empty,
302
- bindBgmStart: _empty,
303
- bindBgmProgress: _empty,
304
- bindBgmComplete: _empty,
305
- bindAudioVolumeNotify: _empty
306
- },
307
- OfficialAccount: {
308
- bindLoad: _empty,
309
- bindError: _empty
310
- },
311
- OpenData: {
312
- type: _empty,
313
- 'open-gid': _empty,
314
- lang: "'en'",
315
- 'default-text': _empty,
316
- 'default-avatar': _empty,
317
- bindError: _empty
318
- },
319
- NavigationBar: {
320
- title: _empty,
321
- loading: _false,
322
- 'front-color': _empty,
323
- 'background-color': _empty,
324
- 'color-animation-duration': _zero,
325
- 'color-animation-timing-func': "'linear'"
326
- },
327
- PageMeta: {
328
- 'background-text-style': _empty,
329
- 'background-color': _empty,
330
- 'background-color-top': _empty,
331
- 'background-color-bottom': _empty,
332
- 'scroll-top': "''",
333
- 'scroll-duration': '300',
334
- 'page-style': "''",
335
- 'root-font-size': "''",
336
- bindResize: _empty,
337
- bindScroll: _empty,
338
- bindScrollDone: _empty
339
- },
340
- VoipRoom: {
341
- openid: _empty,
342
- mode: "'camera'",
343
- 'device-position': "'front'",
344
- bindError: _empty
345
- },
346
- AdCustom: {
347
- 'unit-id': _empty,
348
- 'ad-intervals': _empty,
349
- bindLoad: _empty,
350
- bindError: _empty
351
- },
352
- PageContainer: {
353
- show: _false,
354
- duration: '300',
355
- 'z-index': '100',
356
- overlay: _true,
357
- position: "'bottom'",
358
- round: _false,
359
- 'close-on-slideDown': _false,
360
- 'overlay-style': _empty,
361
- 'custom-style': _empty,
362
- bindBeforeEnter: _empty,
363
- bindEnter: _empty,
364
- bindAfterEnter: _empty,
365
- bindBeforeLeave: _empty,
366
- bindLeave: _empty,
367
- bindAfterLeave: _empty,
368
- bindClickOverlay: _empty
369
- },
370
- ShareElement: {
371
- mapkey: _empty,
372
- transform: _false,
373
- duration: '300',
374
- 'easing-function': "'ease-out'"
375
- },
376
- KeyboardAccessory: {}
42
+ const _true = 'true';
43
+ const _false = 'false';
44
+ const _empty = '';
45
+ const _zero = '0';
46
+ const components = {
47
+ // ======== 调整属性 ========
48
+ Progress: {
49
+ 'border-radius': _zero,
50
+ 'font-size': '16',
51
+ duration: '30',
52
+ bindActiveEnd: _empty
53
+ },
54
+ RichText: {
55
+ space: _empty,
56
+ 'user-select': _false
57
+ },
58
+ Text: {
59
+ 'user-select': _false
60
+ },
61
+ Map: {
62
+ polygons: '[]',
63
+ subkey: _empty,
64
+ rotate: _zero,
65
+ skew: _zero,
66
+ 'max-scale': '20',
67
+ 'min-scale': '3',
68
+ 'enable-3D': _false,
69
+ 'show-compass': _false,
70
+ 'show-scale': _false,
71
+ 'enable-overlooking': _false,
72
+ 'enable-zoom': _true,
73
+ 'enable-scroll': _true,
74
+ 'enable-rotate': _false,
75
+ 'enable-satellite': _false,
76
+ 'enable-traffic': _false,
77
+ setting: '[]',
78
+ bindLabelTap: _empty,
79
+ bindRegionChange: _empty,
80
+ bindPoiTap: _empty
81
+ },
82
+ Button: {
83
+ lang: 'en',
84
+ 'session-from': _empty,
85
+ 'send-message-title': _empty,
86
+ 'send-message-path': _empty,
87
+ 'send-message-img': _empty,
88
+ 'app-parameter': _empty,
89
+ 'show-message-card': _false,
90
+ 'business-id': _empty,
91
+ bindGetUserInfo: _empty,
92
+ bindContact: _empty,
93
+ bindGetPhoneNumber: _empty,
94
+ bindChooseAvatar: _empty,
95
+ bindError: _empty,
96
+ bindOpenSetting: _empty,
97
+ bindLaunchApp: _empty
98
+ },
99
+ Form: {
100
+ 'report-submit-timeout': _zero
101
+ },
102
+ Input: {
103
+ 'always-embed': _false,
104
+ 'adjust-position': _true,
105
+ 'hold-keyboard': _false,
106
+ 'safe-password-cert-path': '',
107
+ 'safe-password-length': '',
108
+ 'safe-password-time-stamp': '',
109
+ 'safe-password-nonce': '',
110
+ 'safe-password-salt': '',
111
+ 'safe-password-custom-hash': '',
112
+ 'auto-fill': _empty,
113
+ bindKeyboardHeightChange: _empty
114
+ },
115
+ Picker: {
116
+ 'header-text': _empty
117
+ },
118
+ PickerView: {
119
+ 'immediate-change': _false,
120
+ bindPickStart: _empty,
121
+ bindPickEnd: _empty
122
+ },
123
+ Slider: {
124
+ color: "'#e9e9e9'",
125
+ 'selected-color': "'#1aad19'"
126
+ },
127
+ Textarea: {
128
+ 'show-confirm-bar': _true,
129
+ 'adjust-position': _true,
130
+ 'hold-keyboard': _false,
131
+ 'disable-default-padding': _false,
132
+ 'confirm-type': "'return'",
133
+ 'confirm-hold': _false,
134
+ bindKeyboardHeightChange: _empty
135
+ },
136
+ ScrollView: {
137
+ 'enable-flex': _false,
138
+ 'scroll-anchoring': _false,
139
+ 'refresher-enabled': _false,
140
+ 'refresher-threshold': '45',
141
+ 'refresher-default-style': "'black'",
142
+ 'refresher-background': "'#FFF'",
143
+ 'refresher-triggered': _false,
144
+ enhanced: _false,
145
+ bounces: _true,
146
+ 'show-scrollbar': _true,
147
+ 'paging-enabled': _false,
148
+ 'fast-deceleration': _false,
149
+ bindDragStart: _empty,
150
+ bindDragging: _empty,
151
+ bindDragEnd: _empty,
152
+ bindRefresherPulling: _empty,
153
+ bindRefresherRefresh: _empty,
154
+ bindRefresherRestore: _empty,
155
+ bindRefresherAbort: _empty
156
+ },
157
+ Swiper: {
158
+ 'snap-to-edge': _false,
159
+ 'easing-function': "'default'"
160
+ },
161
+ SwiperItem: {
162
+ 'skip-hidden-item-layout': _false
163
+ },
164
+ Navigator: {
165
+ target: "'self'",
166
+ 'app-id': _empty,
167
+ path: _empty,
168
+ 'extra-data': _empty,
169
+ version: "'version'"
170
+ },
171
+ Camera: {
172
+ mode: "'normal'",
173
+ resolution: "'medium'",
174
+ 'frame-size': "'medium'",
175
+ bindInitDone: _empty,
176
+ bindScanCode: _empty
177
+ },
178
+ Image: {
179
+ webp: _false,
180
+ 'show-menu-by-longpress': _false
181
+ },
182
+ LivePlayer: {
183
+ mode: "'live'",
184
+ 'sound-mode': "'speaker'",
185
+ 'auto-pause-if-navigate': _true,
186
+ 'auto-pause-if-open-native': _true,
187
+ 'picture-in-picture-mode': '[]',
188
+ bindstatechange: _empty,
189
+ bindfullscreenchange: _empty,
190
+ bindnetstatus: _empty,
191
+ bindAudioVolumeNotify: _empty,
192
+ bindEnterPictureInPicture: _empty,
193
+ bindLeavePictureInPicture: _empty
194
+ },
195
+ Video: {
196
+ title: _empty,
197
+ 'play-btn-position': "'bottom'",
198
+ 'enable-play-gesture': _false,
199
+ 'auto-pause-if-navigate': _true,
200
+ 'auto-pause-if-open-native': _true,
201
+ 'vslide-gesture': _false,
202
+ 'vslide-gesture-in-fullscreen': _true,
203
+ 'ad-unit-id': _empty,
204
+ 'poster-for-crawler': _empty,
205
+ 'show-casting-button': _false,
206
+ 'picture-in-picture-mode': '[]',
207
+ // picture-in-picture-show-progress 属性先注释掉的原因如下:
208
+ // 该属性超过了 wxml 属性的长度限制,实际无法使用且导致编译报错。可等微信官方修复后再放开。
209
+ // 参考1:https://developers.weixin.qq.com/community/develop/doc/000a429beb87f0eac07acc0fc5b400
210
+ // 参考2: https://developers.weixin.qq.com/community/develop/doc/0006883619c48054286a4308258c00?_at=vyxqpllafi
211
+ // 'picture-in-picture-show-progress': 'false',
212
+ 'enable-auto-rotation': _false,
213
+ 'show-screen-lock-button': _false,
214
+ 'show-snapshot-button': _false,
215
+ 'show-background-playback-button': _false,
216
+ 'background-poster': _empty,
217
+ bindProgress: _empty,
218
+ bindLoadedMetadata: _empty,
219
+ bindControlsToggle: _empty,
220
+ bindEnterPictureInPicture: _empty,
221
+ bindLeavePictureInPicture: _empty,
222
+ bindSeekComplete: _empty,
223
+ bindAdLoad: _empty,
224
+ bindAdError: _empty,
225
+ bindAdClose: _empty,
226
+ bindAdPlay: _empty
227
+ },
228
+ Canvas: {
229
+ type: _empty
230
+ },
231
+ Ad: {
232
+ 'ad-type': "'banner'",
233
+ 'ad-theme': "'white'"
234
+ },
235
+ CoverView: {
236
+ 'marker-id': _empty,
237
+ slot: _empty
238
+ },
239
+ // ======== 额外组件 ========
240
+ Editor: {
241
+ 'read-only': _false,
242
+ placeholder: _empty,
243
+ 'show-img-size': _false,
244
+ 'show-img-toolbar': _false,
245
+ 'show-img-resize': _false,
246
+ focus: _false,
247
+ bindReady: _empty,
248
+ bindFocus: _empty,
249
+ bindBlur: _empty,
250
+ bindInput: _empty,
251
+ bindStatusChange: _empty,
252
+ name: _empty
253
+ },
254
+ MatchMedia: {
255
+ 'min-width': _empty,
256
+ 'max-width': _empty,
257
+ width: _empty,
258
+ 'min-height': _empty,
259
+ 'max-height': _empty,
260
+ height: _empty,
261
+ orientation: _empty
262
+ },
263
+ FunctionalPageNavigator: {
264
+ version: "'release'",
265
+ name: _empty,
266
+ args: _empty,
267
+ bindSuccess: _empty,
268
+ bindFail: _empty,
269
+ bindCancel: _empty
270
+ },
271
+ LivePusher: {
272
+ url: _empty,
273
+ mode: "'RTC'",
274
+ autopush: _false,
275
+ muted: _false,
276
+ 'enable-camera': _true,
277
+ 'auto-focus': _true,
278
+ orientation: "'vertical'",
279
+ beauty: _zero,
280
+ whiteness: _zero,
281
+ aspect: "'9:16'",
282
+ 'min-bitrate': '200',
283
+ 'max-bitrate': '1000',
284
+ 'audio-quality': "'high'",
285
+ 'waiting-image': _empty,
286
+ 'waiting-image-hash': _empty,
287
+ zoom: _false,
288
+ 'device-position': "'front'",
289
+ 'background-mute': _false,
290
+ mirror: _false,
291
+ 'remote-mirror': _false,
292
+ 'local-mirror': _false,
293
+ 'audio-reverb-type': _zero,
294
+ 'enable-mic': _true,
295
+ 'enable-agc': _false,
296
+ 'enable-ans': _false,
297
+ 'audio-volume-type': "'voicecall'",
298
+ 'video-width': '360',
299
+ 'video-height': '640',
300
+ 'beauty-style': "'smooth'",
301
+ filter: "'standard'",
302
+ animation: _empty,
303
+ bindStateChange: _empty,
304
+ bindNetStatus: _empty,
305
+ bindBgmStart: _empty,
306
+ bindBgmProgress: _empty,
307
+ bindBgmComplete: _empty,
308
+ bindAudioVolumeNotify: _empty
309
+ },
310
+ OfficialAccount: {
311
+ bindLoad: _empty,
312
+ bindError: _empty
313
+ },
314
+ OpenData: {
315
+ type: _empty,
316
+ 'open-gid': _empty,
317
+ lang: "'en'",
318
+ 'default-text': _empty,
319
+ 'default-avatar': _empty,
320
+ bindError: _empty
321
+ },
322
+ NavigationBar: {
323
+ title: _empty,
324
+ loading: _false,
325
+ 'front-color': _empty,
326
+ 'background-color': _empty,
327
+ 'color-animation-duration': _zero,
328
+ 'color-animation-timing-func': "'linear'"
329
+ },
330
+ PageMeta: {
331
+ 'background-text-style': _empty,
332
+ 'background-color': _empty,
333
+ 'background-color-top': _empty,
334
+ 'background-color-bottom': _empty,
335
+ 'scroll-top': "''",
336
+ 'scroll-duration': '300',
337
+ 'page-style': "''",
338
+ 'root-font-size': "''",
339
+ bindResize: _empty,
340
+ bindScroll: _empty,
341
+ bindScrollDone: _empty
342
+ },
343
+ VoipRoom: {
344
+ openid: _empty,
345
+ mode: "'camera'",
346
+ 'device-position': "'front'",
347
+ bindError: _empty
348
+ },
349
+ AdCustom: {
350
+ 'unit-id': _empty,
351
+ 'ad-intervals': _empty,
352
+ bindLoad: _empty,
353
+ bindError: _empty
354
+ },
355
+ PageContainer: {
356
+ show: _false,
357
+ duration: '300',
358
+ 'z-index': '100',
359
+ overlay: _true,
360
+ position: "'bottom'",
361
+ round: _false,
362
+ 'close-on-slideDown': _false,
363
+ 'overlay-style': _empty,
364
+ 'custom-style': _empty,
365
+ bindBeforeEnter: _empty,
366
+ bindEnter: _empty,
367
+ bindAfterEnter: _empty,
368
+ bindBeforeLeave: _empty,
369
+ bindLeave: _empty,
370
+ bindAfterLeave: _empty,
371
+ bindClickOverlay: _empty
372
+ },
373
+ ShareElement: {
374
+ mapkey: _empty,
375
+ transform: _false,
376
+ duration: '300',
377
+ 'easing-function': "'ease-out'"
378
+ },
379
+ KeyboardAccessory: {},
380
+ RootPortal: {},
377
381
  };
378
382
 
379
- const hostConfig = {
380
- initNativeApi
383
+ const hostConfig = {
384
+ initNativeApi,
385
+ getMiniLifecycle(config) {
386
+ const methods = config.page[5];
387
+ if (methods.indexOf('onSaveExitState') === -1) {
388
+ methods.push('onSaveExitState');
389
+ }
390
+ return config;
391
+ }
381
392
  };
382
393
 
383
394
  export { components, hostConfig, initNativeApi, needPromiseApis };