small changes
Multiple event handlers
<!-- both one() and two() will execute on button click -->
<button @click="one($event), two($event)">
Submit
</button>组件v-model
<custom-input
:model-value="searchText"
@update:model-value="searchText = $event"
></custom-input>app.component('custom-input', {
props: ['modelValue'],
emits: ['update:modelValue'],
template: `
<input
:value="modelValue"
@input="$emit('update:modelValue', $event.target.value)"
>
`
})emit
validate
v-model
multi binding
custom modifier
async component
Last updated
Was this helpful?