@update:modelValue
来源:15-6 用户基本资料修改方案

慕慕6198459
2023-02-01
老师 这里面的 @update:modelValue 不是自定义事件吗?
<m-input
class="w-full"
type="textarea"
max="50"
:modelValue="$store.getters.userInfo.introduction"
@update:modelValue="changeStoreUserInfo('introduction', $event)"
></m-input>
为什么 m-input 组件内没有 使用 emits(‘update:modelValue’) 调用就生效了呢?
写回答
1回答
-
慕慕6198459
提问者
2023-02-01
我知道了 是不是 因为input组件中的 v-model 赋值给了 modelValue 而 input组件内的 v-model一旦变化 modelValue 被改变的同时就会触发
@update:modelValue="changeStoreUserInfo('introduction', $event)" 整个事件?
012023-02-02
相似问题
警告
回答 1