From f46786f11c5c08ead7501a82e5a71430ad69b782 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期日, 27 四月 2025 17:39:24 +0800
Subject: [PATCH] 修复线索问题定位错误问题
---
miniprogram_npm/tdesign-miniprogram/textarea/textarea.js | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/miniprogram_npm/tdesign-miniprogram/textarea/textarea.js b/miniprogram_npm/tdesign-miniprogram/textarea/textarea.js
index 6dc87dc..06b26a5 100644
--- a/miniprogram_npm/tdesign-miniprogram/textarea/textarea.js
+++ b/miniprogram_npm/tdesign-miniprogram/textarea/textarea.js
@@ -31,13 +31,14 @@
};
this.observers = {
value(val) {
- this.updateCount(val);
+ this.updateCount(val !== null && val !== void 0 ? val : this.properties.defaultValue);
},
};
this.lifetimes = {
ready() {
- const { value } = this.properties;
- this.updateValue(value == null ? '' : value);
+ var _a;
+ const { value, defaultValue } = this.properties;
+ this.updateValue((_a = value !== null && value !== void 0 ? value : defaultValue) !== null && _a !== void 0 ? _a : '');
},
};
this.methods = {
@@ -77,9 +78,9 @@
};
},
onInput(event) {
- const { value } = event.detail;
+ const { value, cursor } = event.detail;
this.updateValue(value);
- this.triggerEvent('change', { value: this.data.value });
+ this.triggerEvent('change', { value: this.data.value, cursor });
},
onFocus(event) {
this.triggerEvent('focus', Object.assign({}, event.detail));
--
Gitblit v1.9.3