@tarojs/plugin-platform-weapp 3.5.0-beta.2 → 3.5.0-beta.5

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