@nutui/nutui-react-taro 3.1.0-beta.1 → 3.1.0-beta.2

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 (39) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/locales/base.d.ts +6 -0
  3. package/dist/cjs/locales/en-US.js +17 -1
  4. package/dist/cjs/locales/id-ID.js +17 -1
  5. package/dist/cjs/locales/ja-JP.js +16 -2
  6. package/dist/cjs/locales/tr-TR.js +17 -1
  7. package/dist/cjs/locales/vi-VN.js +17 -1
  8. package/dist/cjs/locales/zh-CN.js +15 -1
  9. package/dist/cjs/locales/zh-TW.js +15 -1
  10. package/dist/cjs/locales/zh-UG.js +17 -1
  11. package/dist/cjs/packages/price/price.js +15 -4
  12. package/dist/cjs/utils/scale-f.d.ts +0 -17
  13. package/dist/cjs/utils/scale-f.js +14 -105
  14. package/dist/cjs/utils/taro/get-system-info.d.ts +0 -5
  15. package/dist/cjs/utils/taro/get-system-info.js +2 -7
  16. package/dist/es/hooks/taro/use-custom-event.js +1 -0
  17. package/dist/es/locales/base.d.ts +6 -0
  18. package/dist/es/locales/en-US.js +17 -1
  19. package/dist/es/locales/id-ID.js +17 -1
  20. package/dist/es/locales/ja-JP.js +16 -2
  21. package/dist/es/locales/tr-TR.js +17 -1
  22. package/dist/es/locales/vi-VN.js +17 -1
  23. package/dist/es/locales/zh-CN.js +15 -1
  24. package/dist/es/locales/zh-TW.js +15 -1
  25. package/dist/es/locales/zh-UG.js +17 -1
  26. package/dist/es/packages/price/price.js +16 -5
  27. package/dist/es/utils/scale-f.d.ts +0 -17
  28. package/dist/es/utils/scale-f.js +15 -106
  29. package/dist/es/utils/taro/get-system-info.d.ts +0 -5
  30. package/dist/es/utils/taro/get-system-info.js +8 -7
  31. package/dist/nutui.react.umd.js +59 -104
  32. package/dist/style-jmapp.css +1 -1
  33. package/dist/style-jmapp.scss +38 -38
  34. package/dist/style-jrkf.css +1 -1
  35. package/dist/style-jrkf.scss +41 -41
  36. package/dist/style.css +1 -1
  37. package/dist/style.scss +36 -36
  38. package/dist/styles/variables-daojia.scss +993 -1971
  39. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # v3.1.0-beta.2
2
+ `2026-06-08`
3
+
4
+
5
+ * 🏡 chore: 增加4x官网入口
6
+ * :bug: fix: 移除jmfe桥接方式 (#3478)
7
+
8
+
9
+ # v3.1.0-beta.1
10
+
11
+ `2026-05-26`
12
+
13
+ - :sparkles: feat: 等比适配 (#3463)
14
+
1
15
  # v3.0.20
2
16
 
3
17
  `2026-05-20`
@@ -9,6 +9,11 @@ export interface BaseLang {
9
9
  edit: string;
10
10
  reset: string;
11
11
  close: string;
12
+ back: string;
13
+ clear: string;
14
+ image: {
15
+ errorTip: string;
16
+ };
12
17
  video: {
13
18
  errorTip: string;
14
19
  clickRetry: string;
@@ -39,6 +44,7 @@ export interface BaseLang {
39
44
  today: string;
40
45
  loadPreviousMonth: string;
41
46
  noEarlierMonth: string;
47
+ dayAriaLabel?: Function;
42
48
  };
43
49
  shortpassword: {
44
50
  title: string;
@@ -19,6 +19,11 @@ var enUS = {
19
19
  edit: 'Edit',
20
20
  reset: 'Reset',
21
21
  close: 'Close',
22
+ back: 'Back',
23
+ clear: 'Clear',
24
+ image: {
25
+ errorTip: 'Image failed to load'
26
+ },
22
27
  video: {
23
28
  errorTip: 'Error Tip',
24
29
  clickRetry: 'Click Retry'
@@ -58,7 +63,18 @@ var enUS = {
58
63
  },
59
64
  today: 'Today',
60
65
  loadPreviousMonth: 'Load Previous Month',
61
- noEarlierMonth: 'No Earlier Month'
66
+ noEarlierMonth: 'No Earlier Month',
67
+ dayAriaLabel: function dayAriaLabel(year, month, day, today, isActive, isDisable) {
68
+ var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
69
+ var label = today ? "Today, ".concat(dateStr) : dateStr;
70
+ if (isActive) {
71
+ label = "Selected ".concat(label);
72
+ }
73
+ if (isDisable) {
74
+ label = "".concat(label, " disabled");
75
+ }
76
+ return label;
77
+ }
62
78
  },
63
79
  shortpassword: {
64
80
  title: 'Please input a password',
@@ -19,6 +19,11 @@ var idID = {
19
19
  edit: 'Sunting',
20
20
  reset: 'Mengatur Ulang',
21
21
  close: 'Tutup',
22
+ back: 'Kembali',
23
+ clear: 'Bersihkan',
24
+ image: {
25
+ errorTip: 'Gambar gagal dimuat'
26
+ },
22
27
  video: {
23
28
  errorTip: 'Terjadi Kesalahan',
24
29
  clickRetry: 'Coba Lagi'
@@ -58,7 +63,18 @@ var idID = {
58
63
  },
59
64
  today: 'Hari ini',
60
65
  loadPreviousMonth: 'Muat Bulan Sebelumnya',
61
- noEarlierMonth: 'Tidak Ada Bulan Sebelumnya'
66
+ noEarlierMonth: 'Tidak Ada Bulan Sebelumnya',
67
+ dayAriaLabel: function dayAriaLabel(year, month, day, today, isActive, isDisable) {
68
+ var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
69
+ var label = today ? "Hari ini, ".concat(dateStr) : dateStr;
70
+ if (isActive) {
71
+ label = "Dipilih ".concat(label);
72
+ }
73
+ if (isDisable) {
74
+ label = "".concat(label, " dinonaktifkan");
75
+ }
76
+ return label;
77
+ }
62
78
  },
63
79
  shortpassword: {
64
80
  title: 'SIlakan masukan kata sandi',
@@ -18,6 +18,12 @@ var jaJP = {
18
18
  select: '選択してください',
19
19
  edit: '編集',
20
20
  reset: 'リセット',
21
+ close: '閉じる',
22
+ back: '戻る',
23
+ clear: 'クリア',
24
+ image: {
25
+ errorTip: '画像の読み込みに失敗しました'
26
+ },
21
27
  video: {
22
28
  errorTip: '動画の読み込みに失敗しました',
23
29
  clickRetry: 'クリックして再試行'
@@ -57,7 +63,16 @@ var jaJP = {
57
63
  },
58
64
  today: '今日',
59
65
  loadPreviousMonth: '前の月を読み込む',
60
- noEarlierMonth: 'これより前の月はありません'
66
+ noEarlierMonth: 'これより前の月はありません',
67
+ dayAriaLabel: function dayAriaLabel(year, month, day, today, isActive, isDisable) {
68
+ if (isActive) {
69
+ return today ? "今日".concat(month, "月").concat(day, "日を選択しました") : "".concat(month, "月").concat(day, "日を選択しました");
70
+ }
71
+ if (isDisable) {
72
+ return today ? "今日".concat(month, "月").concat(day, "日は無効です") : "".concat(month, "月").concat(day, "日は無効です");
73
+ }
74
+ return today ? "今日".concat(month, "月").concat(day, "日") : "".concat(month, "月").concat(day, "日");
75
+ }
61
76
  },
62
77
  shortpassword: {
63
78
  title: 'パスワードを入力してください',
@@ -165,7 +180,6 @@ var jaJP = {
165
180
  errorCanvasTips: '現在の環境はCanvasをサポートしていません'
166
181
  },
167
182
  mask: 'マスク',
168
- close: '閉じる',
169
183
  quickenter: {
170
184
  title: 'クイックアクセス'
171
185
  }
@@ -19,6 +19,11 @@ var trTR = {
19
19
  edit: 'düzenlemek',
20
20
  reset: 'sıfırlama',
21
21
  close: 'Kapat',
22
+ back: 'Geri',
23
+ clear: 'Temizle',
24
+ image: {
25
+ errorTip: 'Resim yüklenemedi'
26
+ },
22
27
  video: {
23
28
  errorTip: 'Video yüklenemedi',
24
29
  clickRetry: 'Yeniden Tıklayın'
@@ -58,7 +63,18 @@ var trTR = {
58
63
  },
59
64
  today: 'Bugün',
60
65
  loadPreviousMonth: 'Önceki ayı yükle',
61
- noEarlierMonth: 'Önceki ay yok'
66
+ noEarlierMonth: 'Önceki ay yok',
67
+ dayAriaLabel: function dayAriaLabel(year, month, day, today, isActive, isDisable) {
68
+ var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
69
+ var label = today ? "Bug\xfcn, ".concat(dateStr) : dateStr;
70
+ if (isActive) {
71
+ label = "Se\xe7ili ".concat(label);
72
+ }
73
+ if (isDisable) {
74
+ label = "".concat(label, " devre dışı");
75
+ }
76
+ return label;
77
+ }
62
78
  },
63
79
  shortpassword: {
64
80
  title: 'Lütfen şifrenizi girin',
@@ -19,6 +19,11 @@ var viVN = {
19
19
  edit: 'Chỉnh sửa',
20
20
  reset: 'Đặt lại',
21
21
  close: 'Đóng',
22
+ back: 'Quay lại',
23
+ clear: 'Xóa',
24
+ image: {
25
+ errorTip: 'Tải ảnh không thành công'
26
+ },
22
27
  video: {
23
28
  errorTip: 'Tải video không thành công',
24
29
  clickRetry: 'Nhấn để thử lại'
@@ -58,7 +63,18 @@ var viVN = {
58
63
  },
59
64
  today: 'Hôm nay',
60
65
  loadPreviousMonth: 'Tải dữ liệu của tháng trước',
61
- noEarlierMonth: 'Không có tháng nào sớm hơn'
66
+ noEarlierMonth: 'Không có tháng nào sớm hơn',
67
+ dayAriaLabel: function dayAriaLabel(year, month, day, today, isActive, isDisable) {
68
+ var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
69
+ var label = today ? "H\xf4m nay, ".concat(dateStr) : dateStr;
70
+ if (isActive) {
71
+ label = "Đ\xe3 chọn ".concat(label);
72
+ }
73
+ if (isDisable) {
74
+ label = "".concat(label, " bị v\xf4 hiệu");
75
+ }
76
+ return label;
77
+ }
62
78
  },
63
79
  shortpassword: {
64
80
  title: 'Vui lòng nhập mật khẩu',
@@ -19,6 +19,11 @@ var zhCN = {
19
19
  edit: '编辑',
20
20
  reset: '重置',
21
21
  close: '关闭',
22
+ back: '返回',
23
+ clear: '清除',
24
+ image: {
25
+ errorTip: '图片加载失败'
26
+ },
22
27
  video: {
23
28
  errorTip: '视频加载失败',
24
29
  clickRetry: '点击重试'
@@ -58,7 +63,16 @@ var zhCN = {
58
63
  },
59
64
  today: '今天',
60
65
  loadPreviousMonth: '加载上一个月',
61
- noEarlierMonth: '没有更早月份'
66
+ noEarlierMonth: '没有更早月份',
67
+ dayAriaLabel: function dayAriaLabel(year, month, day, today, isActive, isDisable) {
68
+ if (isActive) {
69
+ return today ? "已选定今日".concat(month, "月").concat(day, "号") : "已选定".concat(month, "月").concat(day, "号");
70
+ }
71
+ if (isDisable) {
72
+ return today ? "".concat(month, "月").concat(day, "号今日按钮变暗") : "".concat(month, "月").concat(day, "号按钮变暗");
73
+ }
74
+ return today ? "".concat(month, "月").concat(day, "号今日") : "".concat(month, "月").concat(day, "号");
75
+ }
62
76
  },
63
77
  shortpassword: {
64
78
  title: '请输入密码',
@@ -19,6 +19,11 @@ var zhCN = {
19
19
  edit: '編輯',
20
20
  reset: '重置',
21
21
  close: '關閉',
22
+ back: '返回',
23
+ clear: '清除',
24
+ image: {
25
+ errorTip: '圖片加載失敗'
26
+ },
22
27
  video: {
23
28
  errorTip: '視頻加載失敗',
24
29
  clickRetry: '點擊重試'
@@ -58,7 +63,16 @@ var zhCN = {
58
63
  },
59
64
  today: '今天',
60
65
  loadPreviousMonth: '加載上一個月',
61
- noEarlierMonth: '沒有更早月份'
66
+ noEarlierMonth: '沒有更早月份',
67
+ dayAriaLabel: function dayAriaLabel(year, month, day, today, isActive, isDisable) {
68
+ if (isActive) {
69
+ return today ? "已選定今日".concat(month, "月").concat(day, "號") : "已選定".concat(month, "月").concat(day, "號");
70
+ }
71
+ if (isDisable) {
72
+ return today ? "".concat(month, "月").concat(day, "號今日按鈕變暗") : "".concat(month, "月").concat(day, "號按鈕變暗");
73
+ }
74
+ return today ? "".concat(month, "月").concat(day, "號今日") : "".concat(month, "月").concat(day, "號");
75
+ }
62
76
  },
63
77
  shortpassword: {
64
78
  title: '請輸入密碼',
@@ -19,6 +19,11 @@ var zhUG = {
19
19
  edit: 'يحرر',
20
20
  reset: 'إعادة ضبط',
21
21
  close: 'تاقاش',
22
+ back: 'قايتىش',
23
+ clear: 'تاقاش',
24
+ image: {
25
+ errorTip: 'رەسىم يۈكلەش مەغلۇپ بولدى'
26
+ },
22
27
  video: {
23
28
  errorTip: 'فىلىمنى قويۇش مەغلۇپ بولدى',
24
29
  clickRetry: 'قايتا سىناش'
@@ -58,7 +63,18 @@ var zhUG = {
58
63
  },
59
64
  today: 'بۈگۈن',
60
65
  loadPreviousMonth: 'ئالدىنقى ئاي',
61
- noEarlierMonth: 'تۈگىدى'
66
+ noEarlierMonth: 'تۈگىدى',
67
+ dayAriaLabel: function dayAriaLabel(year, month, day, today, isActive, isDisable) {
68
+ var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
69
+ var label = today ? "بۈگۈن, ".concat(dateStr) : dateStr;
70
+ if (isActive) {
71
+ label = "تاللانغان ".concat(label);
72
+ }
73
+ if (isDisable) {
74
+ label = "".concat(label, " چەكلەنگەن");
75
+ }
76
+ return label;
77
+ }
62
78
  },
63
79
  shortpassword: {
64
80
  title: 'مەخپى نومۇرنى كىرگۈزۈڭ',
@@ -20,6 +20,7 @@ var _typings = require("../../utils/typings");
20
20
  var _index = require("../configprovider/index");
21
21
  var _types = require("../../types");
22
22
  var _platform = require("../../utils/taro/platform");
23
+ var _shouldrenderpriceraw = require("../../utils/should-render-price-raw");
23
24
  var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
24
25
  color: 'primary',
25
26
  price: 0,
@@ -34,10 +35,17 @@ var Price = function Price(props) {
34
35
  var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), color = _$_object_spread.color, originalPrice = _$_object_spread.price, symbol = _$_object_spread.symbol, digits = _$_object_spread.digits, thousands = _$_object_spread.thousands, position = _$_object_spread.position, size = _$_object_spread.size, line = _$_object_spread.line, className = _$_object_spread.className, style = _$_object_spread.style;
35
36
  var classPrefix = 'nut-price';
36
37
  var rtl = (0, _index.useRtl)();
38
+ var isRenderPriceRaw = (0, _react.useMemo)(function() {
39
+ return typeof originalPrice === 'string' && (0, _shouldrenderpriceraw.shouldRenderPriceAsRaw)(originalPrice);
40
+ }, [
41
+ originalPrice
42
+ ]);
37
43
  var price = (0, _react.useMemo)(function() {
44
+ if (isRenderPriceRaw) return '';
38
45
  return originalPrice.toString().replace(/[^\d.]/g, '');
39
46
  }, [
40
- originalPrice
47
+ originalPrice,
48
+ isRenderPriceRaw
41
49
  ]);
42
50
  var isCustomPriceColor = (0, _react.useMemo)(function() {
43
51
  var specificPriceColor = Object.values(_types.PriceColorEnum);
@@ -118,12 +126,15 @@ var Price = function Price(props) {
118
126
  style: priceColorStyle
119
127
  }, formatDecimal(price))) : null, symbol && position === 'after' ? renderSymbol() : null);
120
128
  };
121
- return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, (0, _platform.harmony)() || (0, _platform.td)() ? /*#__PURE__*/ _react.default.createElement(_components.Text, {
129
+ var renderRawContent = function renderRawContent() {
130
+ return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, originalPrice);
131
+ };
132
+ return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, (0, _platform.harmony)() || process.env.TARO_ENV === 'dynamic' ? /*#__PURE__*/ _react.default.createElement(_components.Text, {
122
133
  className: "".concat(classPrefix, " ").concat(classPrefix, "-").concat(color, " ").concat(className),
123
134
  style: style
124
- }, renderInner()) : /*#__PURE__*/ _react.default.createElement(_components.View, {
135
+ }, isRenderPriceRaw ? renderRawContent() : renderInner()) : /*#__PURE__*/ _react.default.createElement(_components.View, {
125
136
  className: "".concat(classPrefix, " ").concat(classPrefix, "-").concat(color, " ").concat(className),
126
137
  style: style
127
- }, renderInner()));
138
+ }, isRenderPriceRaw ? renderRawContent() : renderInner()));
128
139
  };
129
140
  Price.displayName = 'NutPrice';
@@ -1,20 +1,3 @@
1
- /** 原生 DongScreenAdapterPlugin.getScale 的典型返回结构 */
2
- type NativeScaleResponse = {
3
- status?: string;
4
- data?: {
5
- scale?: number | string;
6
- };
7
- };
8
- /** jmfe 通用 callNative 签名 */
9
- type NativeCaller = (plugin: string, method: string, params: string, extra: string) => Promise<NativeScaleResponse>;
10
- /** 站内容器的 jmfe 桥接方法(可选) */
11
- declare global {
12
- interface Window {
13
- jmfe?: {
14
- callNative?: NativeCaller;
15
- };
16
- }
17
- }
18
1
  /** 字体档位:标准、大字、老年 */
19
2
  export type ScaleProfile = 'standard' | 'large' | 'elderly';
20
3
  /** 不同场景可选用不同放大比例(layout 等默认可不额外放大) */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 响应式缩放系数(--nut-scale-f):结合京东站内原生桥与站外视口规则,
2
+ * 响应式缩放系数(--nut-scale-f):按视口宽度计算,
3
3
  * 写入根节点 CSS 变量(--nut-scale-f / --nut-scale-font / --nut-scale-icon),
4
4
  * 供布局/字号/icon 等按比例换算(见 calcByProfile)。H5 与 Taro WebView 共用此实现。
5
5
  */ "use strict";
@@ -20,10 +20,8 @@ _export(exports, {
20
20
  return initScaleF;
21
21
  }
22
22
  });
23
- var _async_to_generator = require("@swc/helpers/_/_async_to_generator");
24
- var _ts_generator = require("@swc/helpers/_/_ts_generator");
25
23
  var _canusedom = require("./can-use-dom");
26
- /** 当前基准缩放(来自原生或视口计算) */ var scale = 1;
24
+ /** 当前基准缩放(来自视口计算) */ var scale = 1;
27
25
  /** 大字模式下仅 font 场景的相对倍率 */ var LARGE_FONT_RATIO = 1.15;
28
26
  /** 老年模式下 font/icon/lego 场景的相对倍率 */ var ELDERLY_RATIO = 1.3;
29
27
  /** 全局当前档位,与 scale 共同参与 calcByProfile */ var profile = 'standard';
@@ -67,7 +65,7 @@ var _canusedom = require("./can-use-dom");
67
65
  }
68
66
  return Math.round(value);
69
67
  }
70
- /** 无原生桥时按屏宽推算 scale(含平板与 375 基准窄屏区间) */ function getScaleByViewport() {
68
+ /** 按屏宽推算 scale(含平板与 375 基准窄屏区间) */ function getScaleByViewport() {
71
69
  if (!_canusedom.canUseDom) return 1;
72
70
  var deviceWidth = window.innerWidth;
73
71
  if (!deviceWidth) return 1;
@@ -80,81 +78,8 @@ var _canusedom = require("./can-use-dom");
80
78
  }
81
79
  return 1;
82
80
  }
83
- /** 通过 jmfe.callNative 拉取 DongScreenAdapterPlugin;失败返回 null */ function getScaleByNative() {
84
- return (0, _async_to_generator._)(function() {
85
- var _window_jmfe, _res_data, res, parsed, e;
86
- return (0, _ts_generator._)(this, function(_state) {
87
- switch(_state.label){
88
- case 0:
89
- if (!_canusedom.canUseDom || !((_window_jmfe = window.jmfe) === null || _window_jmfe === void 0 ? void 0 : _window_jmfe.callNative)) return [
90
- 2,
91
- null
92
- ];
93
- _state.label = 1;
94
- case 1:
95
- _state.trys.push([
96
- 1,
97
- 3,
98
- ,
99
- 4
100
- ]);
101
- return [
102
- 4,
103
- window.jmfe.callNative('DongScreenAdapterPlugin', 'getScale', JSON.stringify({}), '')
104
- ];
105
- case 2:
106
- res = _state.sent();
107
- if ((res === null || res === void 0 ? void 0 : res.status) === '0' && ((_res_data = res.data) === null || _res_data === void 0 ? void 0 : _res_data.scale) !== undefined) {
108
- parsed = Number(res.data.scale);
109
- if (Number.isFinite(parsed) && parsed > 0) {
110
- return [
111
- 2,
112
- parsed
113
- ];
114
- }
115
- }
116
- return [
117
- 3,
118
- 4
119
- ];
120
- case 3:
121
- e = _state.sent();
122
- return [
123
- 3,
124
- 4
125
- ];
126
- case 4:
127
- return [
128
- 2,
129
- null
130
- ];
131
- }
132
- });
133
- })();
134
- }
135
- /** 统一获取缩放:站内原生优先,失败则用视口规则 */ function getScaleF() {
136
- return (0, _async_to_generator._)(function() {
137
- var nativeScale;
138
- return (0, _ts_generator._)(this, function(_state) {
139
- switch(_state.label){
140
- case 0:
141
- return [
142
- 4,
143
- getScaleByNative()
144
- ];
145
- case 1:
146
- nativeScale = _state.sent();
147
- if (nativeScale) return [
148
- 2,
149
- nativeScale
150
- ];
151
- return [
152
- 2,
153
- getScaleByViewport()
154
- ];
155
- }
156
- });
157
- })();
81
+ /** 统一获取缩放:按视口规则计算 */ function getScaleF() {
82
+ return getScaleByViewport();
158
83
  }
159
84
  /** 校验后更新内存中的 scale,并写入 --nut-scale-f */ function setScaleF(nextScale) {
160
85
  var validScale = Number.isFinite(nextScale) && nextScale > 0 ? nextScale : 1;
@@ -162,31 +87,15 @@ var _canusedom = require("./can-use-dom");
162
87
  applyScaleCssVars(validScale);
163
88
  return scale;
164
89
  }
165
- /** 重新拉取缩放;可选同时切换 profile,避免与当前值相同时重复写 DOM */ function refreshScaleF(nextProfile) {
166
- return (0, _async_to_generator._)(function() {
167
- var nextScale;
168
- return (0, _ts_generator._)(this, function(_state) {
169
- switch(_state.label){
170
- case 0:
171
- if (nextProfile) {
172
- setScaleProfile(nextProfile);
173
- }
174
- return [
175
- 4,
176
- getScaleF()
177
- ];
178
- case 1:
179
- nextScale = _state.sent();
180
- if (!scale || nextScale !== scale) {
181
- setScaleF(nextScale);
182
- }
183
- return [
184
- 2,
185
- scale
186
- ];
187
- }
188
- });
189
- })();
90
+ /** 重新计算缩放;可选同时切换 profile,避免与当前值相同时重复写 DOM */ function refreshScaleF(nextProfile) {
91
+ if (nextProfile) {
92
+ setScaleProfile(nextProfile);
93
+ }
94
+ var nextScale = getScaleF();
95
+ if (!scale || nextScale !== scale) {
96
+ setScaleF(nextScale);
97
+ }
98
+ return scale;
190
99
  }
191
100
  function initScaleF(nextProfile) {
192
101
  if (!_canusedom.canUseDom) return function() {};
@@ -14,9 +14,4 @@ export declare const getDeviceInfo: () => IDeviceInfo;
14
14
  * @returns {Taro.getWindowInfo.Result} 窗口信息
15
15
  */
16
16
  export declare const getWindowInfo: () => Taro.getWindowInfo.Result;
17
- /**
18
- * 获取应用基础信息,兼容新旧 API
19
- * @returns {Taro.getAppBaseInfo.Result} 应用基础信息
20
- */
21
- export declare const getAppBaseInfo: () => Taro.getAppBaseInfo.Result;
22
17
  export {};
@@ -9,9 +9,6 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- get getAppBaseInfo () {
13
- return getAppBaseInfo;
14
- },
15
12
  get getDeviceInfo () {
16
13
  return getDeviceInfo;
17
14
  },
@@ -26,7 +23,5 @@ var getDeviceInfo = function getDeviceInfo() {
26
23
  };
27
24
  var getWindowInfo = function getWindowInfo() {
28
25
  return typeof _taro.default.getWindowInfo === 'function' ? _taro.default.getWindowInfo() : _taro.default.getSystemInfoSync();
29
- };
30
- var getAppBaseInfo = function getAppBaseInfo() {
31
- return typeof _taro.default.getAppBaseInfo === 'function' ? _taro.default.getAppBaseInfo() : _taro.default.getSystemInfoSync();
32
- };
26
+ } // /**
27
+ ;
@@ -3,6 +3,7 @@ import { useEffect, useRef } from "react";
3
3
  import isEqual from "react-fast-compare";
4
4
  import { eventCenter, getCurrentInstance } from "@tarojs/taro";
5
5
  import { useForceUpdate } from "../use-force-update";
6
+ // export const customEvents = new Events()
6
7
  export var customEvents = eventCenter;
7
8
  export function useCustomEventsPath(selector) {
8
9
  var _getCurrentInstance_router;
@@ -9,6 +9,11 @@ export interface BaseLang {
9
9
  edit: string;
10
10
  reset: string;
11
11
  close: string;
12
+ back: string;
13
+ clear: string;
14
+ image: {
15
+ errorTip: string;
16
+ };
12
17
  video: {
13
18
  errorTip: string;
14
19
  clickRetry: string;
@@ -39,6 +44,7 @@ export interface BaseLang {
39
44
  today: string;
40
45
  loadPreviousMonth: string;
41
46
  noEarlierMonth: string;
47
+ dayAriaLabel?: Function;
42
48
  };
43
49
  shortpassword: {
44
50
  title: string;
@@ -9,6 +9,11 @@ var enUS = {
9
9
  edit: 'Edit',
10
10
  reset: 'Reset',
11
11
  close: 'Close',
12
+ back: 'Back',
13
+ clear: 'Clear',
14
+ image: {
15
+ errorTip: 'Image failed to load'
16
+ },
12
17
  video: {
13
18
  errorTip: 'Error Tip',
14
19
  clickRetry: 'Click Retry'
@@ -48,7 +53,18 @@ var enUS = {
48
53
  },
49
54
  today: 'Today',
50
55
  loadPreviousMonth: 'Load Previous Month',
51
- noEarlierMonth: 'No Earlier Month'
56
+ noEarlierMonth: 'No Earlier Month',
57
+ dayAriaLabel: function(year, month, day, today, isActive, isDisable) {
58
+ var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
59
+ var label = today ? "Today, ".concat(dateStr) : dateStr;
60
+ if (isActive) {
61
+ label = "Selected ".concat(label);
62
+ }
63
+ if (isDisable) {
64
+ label = "".concat(label, " disabled");
65
+ }
66
+ return label;
67
+ }
52
68
  },
53
69
  shortpassword: {
54
70
  title: 'Please input a password',
@@ -9,6 +9,11 @@ var idID = {
9
9
  edit: 'Sunting',
10
10
  reset: 'Mengatur Ulang',
11
11
  close: 'Tutup',
12
+ back: 'Kembali',
13
+ clear: 'Bersihkan',
14
+ image: {
15
+ errorTip: 'Gambar gagal dimuat'
16
+ },
12
17
  video: {
13
18
  errorTip: 'Terjadi Kesalahan',
14
19
  clickRetry: 'Coba Lagi'
@@ -48,7 +53,18 @@ var idID = {
48
53
  },
49
54
  today: 'Hari ini',
50
55
  loadPreviousMonth: 'Muat Bulan Sebelumnya',
51
- noEarlierMonth: 'Tidak Ada Bulan Sebelumnya'
56
+ noEarlierMonth: 'Tidak Ada Bulan Sebelumnya',
57
+ dayAriaLabel: function(year, month, day, today, isActive, isDisable) {
58
+ var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
59
+ var label = today ? "Hari ini, ".concat(dateStr) : dateStr;
60
+ if (isActive) {
61
+ label = "Dipilih ".concat(label);
62
+ }
63
+ if (isDisable) {
64
+ label = "".concat(label, " dinonaktifkan");
65
+ }
66
+ return label;
67
+ }
52
68
  },
53
69
  shortpassword: {
54
70
  title: 'SIlakan masukan kata sandi',