We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddea9e6 commit 806545fCopy full SHA for 806545f
src/components/dataBlockInner/strInputs.vue
@@ -23,11 +23,14 @@ const { dataItem, fnType } = defineProps<InputProps>();
23
const inputBox = ref<HTMLElementTagNameMap["s-text-field"][]>();
24
25
// Chromium 文本框输入三个字形以上的连字时渲染不生效
26
-// 需要在失去焦点时手动添加空格再删除以触发渲染
+// 需要在失去焦点时手动对文本框赋值以触发渲染
27
+// 直接操作 .value 属性不会触发 Vue 的响应式更新,无需担忧性能
28
29
function handleBlur(index: number) {
- inputBox.value![index].value = inputBox.value![index].value + " ";
30
- inputBox.value![index].value = inputBox.value![index].value.trim();
+ const element = inputBox.value![index];
31
+ const value = element.value;
32
+ element.value = value + "\u200B";
33
+ element.value = value;
34
}
35
const emit = defineEmits(["blur"]);
36
</script>
0 commit comments