Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vue] 31. v-model 语法糖的组件中的使用 #422

Open
qiilee opened this issue Oct 8, 2019 · 1 comment
Open

[vue] 31. v-model 语法糖的组件中的使用 #422

qiilee opened this issue Oct 8, 2019 · 1 comment
Labels

Comments

@qiilee
Copy link
Member

qiilee commented Oct 8, 2019

No description provided.

@qiilee qiilee added the VUE label Oct 8, 2019
@iu1340
Copy link

iu1340 commented Mar 15, 2020

自定义事件也可以用于创建支持 v-model 的自定义输入组件。记住:
等价于:
<input
v-bind:value="searchText"
v-on:input="searchText = $event.target.value"

当用在组件上时,v-model 则会这样:
<custom-input
v-bind:value="searchText"
v-on:input="searchText = $event"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants