@tuya/miniapp-smart-ui 2.13.6 → 2.13.7-beta-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.
@@ -99,8 +99,11 @@ SmartComponent({
99
99
  }
100
100
  const formatValue = this.formatValue(rawValue);
101
101
  this.value = formatValue;
102
- // 更新显示值
103
- this.updateDisplayValue();
102
+ // 仅在显示值需要与原生值不同时回写(数字格式化或超长截断)。
103
+ // 输入过程中回写 value 会让 iOS 原生 textarea 在连续删除时光标跳到末尾。
104
+ if (numberFormat || formatValue !== value) {
105
+ this.updateDisplayValue();
106
+ }
104
107
  this.setShowClear();
105
108
  return this.emitChange(Object.assign(Object.assign({}, event.detail), { value: formatValue }));
106
109
  },
@@ -115,8 +115,11 @@ var numberFormat_1 = require("./numberFormat");
115
115
  }
116
116
  var formatValue = this.formatValue(rawValue);
117
117
  this.value = formatValue;
118
- // 更新显示值
119
- this.updateDisplayValue();
118
+ // 仅在显示值需要与原生值不同时回写(数字格式化或超长截断)。
119
+ // 输入过程中回写 value 会让 iOS 原生 textarea 在连续删除时光标跳到末尾。
120
+ if (numberFormat || formatValue !== value) {
121
+ this.updateDisplayValue();
122
+ }
120
123
  this.setShowClear();
121
124
  return this.emitChange(__assign(__assign({}, event.detail), { value: formatValue }));
122
125
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya/miniapp-smart-ui",
3
- "version": "2.13.6",
3
+ "version": "2.13.7-beta-0",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",