@mpxjs/webpack-plugin 2.10.1-beta.6 → 2.10.1-beta.7

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.
@@ -155,8 +155,8 @@ const _WebView = forwardRef((props, ref) => {
155
155
  switch (type) {
156
156
  case 'setTitle':
157
157
  { // case下不允许直接声明,包个块解决该问题
158
- const title = postData._documentTitle;
159
- if (title) {
158
+ const title = postData._documentTitle?.trim();
159
+ if (title !== undefined) {
160
160
  navigation && navigation.setOptions({ title });
161
161
  }
162
162
  }
@@ -251,6 +251,7 @@ const _WebView = forwardRef((props, ref) => {
251
251
  }
252
252
  };
253
253
  const onLoadEnd = function (res) {
254
+ res.persist();
254
255
  if (__mpx_mode__ === 'android' || __mpx_mode__ === 'harmony') {
255
256
  setTimeout(() => {
256
257
  onLoadEndHandle(res);
@@ -207,8 +207,8 @@ const _WebView = forwardRef<HandlerRef<WebView, WebViewProps>, WebViewProps>((pr
207
207
  switch (type) {
208
208
  case 'setTitle':
209
209
  { // case下不允许直接声明,包个块解决该问题
210
- const title = postData._documentTitle
211
- if (title) {
210
+ const title = postData._documentTitle?.trim()
211
+ if (title !== undefined) {
212
212
  navigation && navigation.setOptions({ title })
213
213
  }
214
214
  }
@@ -302,6 +302,7 @@ const _WebView = forwardRef<HandlerRef<WebView, WebViewProps>, WebViewProps>((pr
302
302
  }
303
303
  }
304
304
  const onLoadEnd = function (res: WebViewEvent) {
305
+ res.persist()
305
306
  if (__mpx_mode__ === 'android' || __mpx_mode__ === 'harmony') {
306
307
  setTimeout(() => {
307
308
  onLoadEndHandle(res)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.10.1-beta.6",
3
+ "version": "2.10.1-beta.7",
4
4
  "description": "mpx compile core",
5
5
  "keywords": [
6
6
  "mpx"