摘要: 1.安装路由; npm install vue-router 2.使用: import Vue from 'vue' import VueRouter from 'vue-router' Vue.use(VueRouter) 3.在vue-cli3项目中使用 (1)在 src 文件夹下,创建一个 r 阅读全文
posted @ 2020-05-11 19:25 JahanGu 阅读(4865) 评论(2) 推荐(1) 编辑
摘要: 1.vue的样式污染 比如在home.vue文件下面定义一个样式, <style> .title{ background: red; } </style> 那么在login.vue文件下面有标签使用这个class=“title”,也会有这个样式; 避免样式污染的方法: <style></style> 阅读全文
posted @ 2020-05-11 13:44 JahanGu 阅读(185) 评论(0) 推荐(0) 编辑