< H1 > the effect of typing according to the code in the vue document is inconsistent; < / H1 >
Vue.component("base-input", {
inheritAttrs: false,
props: ["label", "value"],
template: `
<label>
{{ label }}
<input
v-bind="$attrs"
v-bind:value="value"
v-on:input="$emit("input", $event.target.value)"
>
</label>
`
})
<base-input
v-model="username"
class="username-input"
placeholder="Enter your username"
></base-input>
< H1 > Why did the class of class= "username-input" fall on the label tag? shouldn"t it fall on input? ask for advice < / H1 >