This article follows instructions to use high -> low typesetting

V – bind: properties

  • Function: Change the tag attribute to a dynamic attribute, that is, the value of the attribute can use variables.
<img :src="imgsrc" />//<img v-bind:src="imgsrc" />Imgsrc is a variableCopy the code

V – on: events

  • Function: Binds events to tags
<button @click="">Click on the event</button>//<button v-on:click="">Click on the event</button>
Copy the code

v-model

  • What it does: Bidirectional binding of a form control’s value to a variable
<input type="text" v-model="inputTxt">// Replace value with v-model, inputTxt is a variableCopy the code

v-html/v-text

  • Action: Rich text, plain text rendering, equivalent to innerHTML, innerText