摘要:
1.条件渲染1.1v-if<h1 v-if="ok">Yes</h1>1.2v-if else<h1 v-if="ok">Yes</h1><h1 v-else>No</h1><div v-if="type 'A'"> A</div><div v-else-if="type 'B'"> B</div> 阅读全文
摘要:
class、style的绑定1.在 v-bind 用于 class 和 style 时, Vue.js 专门增强了它。表达式的结果类型除了字符串之外,还可以是对象或数组2.绑定css2.1对象绑定2.1.1绑对象格式参数domdiv class="static" v-bind:class="{ ac 阅读全文
摘要:
属性计算1.列子dom<div id="example"> <p>Original message: "{{ message }}"</p> <p>Computed reversed message: "{{ reversedMessage }}"</p></div>vue:var vm = new 阅读全文
摘要:
vue-模板1.插入值:1.1插入不变文本的指令:v-once<span v-once>This will never change: {{ msg }}</span>1.2插入html<div v-html="rawHtml"></div>1.3 v-bind指令:<button v-bind:d 阅读全文