摘要:
通过绑定属性去映射head标签中的样式,以及直接在标签中写简单的逻辑 <style> // 通过类名 .one{ color: green; } //通过id #two{ background: pink; } </style> <body> <div id="app"> //绑定一个类名及id去映 阅读全文
摘要:
<body> <div id="app"> //v-show的值为布尔值,true让标签的样式为 display:block,false则相反为display: none; <h1 v-show="false">{{ msg }}</h1> //v-if的值也是布尔值,ture是显示标签,false 阅读全文
摘要:
vue常用的指令 <body> <div id="app"> <h1>{{ msg }}</h1> //数据写入方式 <h2 v-text="msg"></h2> //v-text写入数据,但是标签名内不能再写入其他的值,因为会被v-text覆盖 <h2 v-once="msg">{{ msg }} 阅读全文