@tarojs/taro-h5 3.6.20 → 3.6.22-alpha.0

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/index.esm.js CHANGED
@@ -3068,11 +3068,12 @@ const loadFontFace = (options) => __awaiter(void 0, void 0, void 0, function* ()
3068
3068
  try {
3069
3069
  yield fontFace.load();
3070
3070
  fonts.add(fontFace);
3071
- return handle.success({});
3071
+ return handle.success({ status: 'loaded' });
3072
3072
  }
3073
3073
  catch (error) {
3074
3074
  return handle.fail({
3075
- errMsg: error.message || error
3075
+ status: 'error',
3076
+ errMsg: error.message || error,
3076
3077
  });
3077
3078
  }
3078
3079
  }
@@ -3102,7 +3103,7 @@ const loadFontFace = (options) => __awaiter(void 0, void 0, void 0, function* ()
3102
3103
  }
3103
3104
  style.innerText = `@font-face{${innerText}}`;
3104
3105
  document.head.appendChild(style);
3105
- return handle.success();
3106
+ return handle.success({ status: 'loaded' });
3106
3107
  }
3107
3108
  });
3108
3109
 
@@ -4274,7 +4275,7 @@ const setTabBarBadge = (options) => {
4274
4275
  return new Promise((resolve, reject) => {
4275
4276
  Taro.eventCenter.trigger('__taroSetTabBarBadge', {
4276
4277
  index,
4277
- text,
4278
+ text: text.replace(/[\u0391-\uFFE5]/g, 'aa').length > 4 ? '...' : text,
4278
4279
  successHandler: (res = {}) => handle.success(res, { resolve, reject }),
4279
4280
  errorHandler: (res = {}) => handle.fail(res, { resolve, reject })
4280
4281
  });