Vue self-study exercises, v-bind: the use of instructions

Vue self-study exercises, v-bind: the use of instructions! This instruction can fine-grained, fine-grained modification of some attributes of html tags,

For example, in the following example, the value of the href of the a tag can be modified.

The writing method I use here is to define an attribute with the help of square brackets, and the name is customized, which truly achieves the point of free control.

As shown in the figure, sd, if you assign href to it, then, in the page rendered in the future, it will be href, followed by the value,

It is the value corresponding to href.

The advantage of using vue is that you can use the back-end program to modify the content of the front-end page as you like.

Pictures, texts, videos, whatever content you want to render on the page, can be packaged into json format after business processing from the backend, and passed to the frontend for rendering. Very convenient.

Guess you like

Origin blog.csdn.net/yrldjsbk/article/details/129183436