fix: 🐛 修复textarea统计多码元字符长度错误的问题 (#940)

 Closes: #933
This commit is contained in:
QingHuan 2025-03-14 16:43:38 +08:00 committed by GitHub
parent 747893904c
commit f9d85232c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -177,7 +177,11 @@ const isRequired = computed(() => {
//
const currentLength = computed(() => {
return String(formatValue(props.modelValue) || '').length
/**
* 使用Array.from处理多码元字符以获取正确的长度
* @link https://github.com/Moonofweisheng/wot-design-uni/issues/933
*/
return Array.from(String(formatValue(props.modelValue) || '')).length
})
const rootClass = computed(() => {