Home  >  Article  >  Web Front-end  >  Use of Vue instructions

Use of Vue instructions

php中世界最好的语言
php中世界最好的语言Original
2018-03-19 16:26:332430browse

This time I will show you how to use the Vue command. What are the precautions when using the Vue command. The following is a practical case, let’s take a look.

v-on acts on event , abbreviation @

v-bind acts on the attribute of html element , abbreviation :

v-for acts on the variable in the template, and is similar to C#’s foreach

v-if and v-show conditions Render html elements

v-model acts on elements with value, such as input (text, radio, checkbox), select form, textarea and component in Vue.

The above v-xxx The usage is, v-xxx="variable/method", the variable/method must exist in the data/methods of the corresponding el Vue object.

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

JavaScript Optimizing DOM

Vue’s Computed Properties

The above is the detailed content of Use of Vue instructions. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn