Note: the class binding when multiple attributes with array & lt; H3: & gt; {{h3}} & lt;/h3 & gt;
And if use v - bind binding multiple class behind only the first effective invalid
(can be used in the ternary operator or & amp; & Or | |)
For example: & lt; H3: : & gt; {{h3}} & lt;/h3 & gt;
Unless the binding is valid & lt; H3: & gt; {{h3}} & lt;/h3 & gt;
Note: binding style can only be used when the object or array can not directly write up binding two style at the same time as the class
For example: & lt; H3: style="{color: aa}" & gt; {{h3}} & lt;/h3 & gt;
Note: if use object representation can set this property is used by using use the false is not true, also can add an array object combination of
Note: differential expression can't write on the attribute
For example: & lt; Img v - bind: SRC="https://bbs.csdn.net/topics/img" Alt="" & gt;
Can be abbreviated as: & lt; : img SRC="https://bbs.csdn.net/topics/img" Alt="" & gt;
2. V - on: listen event & lt; The button v - on: click="handleClick1" & gt; Click & lt;/button> Can be abbreviated as @
Note: to monitor the method must be on the object of the methods to
. Note: the console log (event), the event is the event object event. The target object of click
Note: $event said event object & lt; The button v - on: click="handleClick1 ($event, 2)" & gt; Click & lt;/button>
<script SRC="https://cdn.jsdelivr.net/npm/[email protected]" & gt; </script> <style> The red {color: red; Background - color: rgba (0, 0, 0, 0.2); }. Yellow {color: yellow; }. Black {color: RGB (173, 125, 125); }. Greed {color: green; }. Width {width: 300 px; }. Height {height: 200 px; } & lt;/style>
Note: & lt; Script SRC="https://cdn.jsdelivr.net/npm/[email protected]" & gt; </script> <style> The yellow {color: yellow; }. Black {color: RGB (173, 125, 125); }. Greed {color: green; } & lt;/style>
Note: & lt; Script SRC="https://cdn.jsdelivr.net/npm/[email protected]" & gt; </script> <style> The yellow {color: yellow; }. Black {color: RGB (173, 125, 125); }. Greed {color: green; } & lt;/style>
Note: & lt; Script SRC="https://cdn.jsdelivr.net/npm/[email protected]" & gt; </script> <style> The yellow {color: yellow; }. Black {color: RGB (173, 125, 125); }. Greed {color: green; } & lt;/style>