V-Show Directive and Usage in Vue.js

1 Usage

The V-SHOW instruction determines that the element is displayed or hidden by changing the CSS attribute of the element.

Koi under the big data: Why your Weibo has always pumped award

VAR App = New Vue ({EL: ‘#App ‘, Data:}});
Rendering Post Code:

  Koi under the big data: Why your Weibo has always pumping award    Because element style is set to Display: None; Therefore, the element is hidden O (∩_∩) O ~ 

Function and V-IF instructions for V-IF instructions resemblance. However, the V-IF instruction will rebuild or destroy the elements or components and the events they bind them according to the expression. The V-Show directive simply sets the CSS attribute. Because the V-IF instruction overhead is large, it is more suitable for the conditions that do not change frequently. The V-Show instruction is suitable for the scene that is frequently switched.

1, it is judged whether or not the plan is displayed or hidden

Go to Upload

Whether the parameter list.power in the interface is equal to 1, if equal to 1, “True”, otherwise “false”, then the V-Show instruction When it is equal to TRUE, it is displayed when False is hidden.

2, three-mean operator judgment

    In fact, this can also be abbreviated into the first form    

This is simpler

 The above is the V-SHOW instruction and usage in the Vue.js introduced by Xiaobian. For detailed, I hope to help everyone. If you have any questions, please leave a message, the small package will reply to everyone. Thank you very much for your support of Tumi Cloud Website!                      
© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment