javascript - How vue dynamically adds instructions to tags (using js to add instructions to tags)
淡淡烟草味2017-05-19 10:25:15
0
2
613
Now that there is an html tag, you need to use js to add instructions to the tag. It’s like: html: <img /> Then use js to make the html become <img v-lazy='fn'/>
This method is not recommended in vue. The recommendation is to use state-driven views.
You can choose v-if tag to achieve this effect.
Refer to the official documentation:
Custom instructions