摘要:
vue项目中router路由配置 介绍 路由:控制组件之间的跳转,不会实现请求、不用页面刷新,直接跳转-切换组件》》》 安装 本地环境安装路由插件vue-router: cnpm install vue-router --save-dev *没有安装淘宝镜像的可以将 cnpm 替换成 npm 想要安 阅读全文
摘要:
循环语句 循环使用 v-for 指令。 v-for 指令需要以 site in sites 形式的特殊语法, sites 是源数据数组并且 site 是数组元素迭代的别名。 v-for 可以绑定数据到数组来渲染一个列表: <div id="app"> <ol> <li v-for="site in 阅读全文
摘要:
<div id="app"> <div v-if="type 'A'"> A </div> <div v-else-if="type 'B'"> B </div> <div v-else-if="type 'C'"> C </div> <div v-else> Not A/B/C </div> </ 阅读全文