使用element-plus,vue的setup写法,给el-form同时绑定ref和modal时数据双向绑定卡顿,
Version
3.0.0
Reproduction link
https://codesandbox.io/s/admiring-satoshi-chf6c
Steps to reproduce
vue代码如下:
<template>
<el-form
:model="numberValidateForm"
ref="numberValidateForm"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item
label="年龄"
prop="age"
:rules="[
{ required: true, message: '年龄不能为空' },
{ type: 'number', message: '年龄必须为数字值' },
]"
>
<el-input
type="age"
v-model.number="numberValidateForm.age"
autocomplete="off"
/>
</el-form-item>
</el-form>
</template>
<script>
import { reactive } from "vue";
export default {
setup() {
const numberValidateForm = reactive({
age: "",
});
return {
numberValidateForm,
};
},
};
</script>
在输入框里输入内容,发现input值没有更新,好像卡住不动了,失去焦点之后会更新一个字符
What is expected?
input值能随着键盘输入改变
What is actually happening?
input值不能改变
Please follow https://new-issue.vuejs.org/?repo=vuejs/vue-next#why-repro and open issues in English