摘要: 一.关于路由 1.使用vue router 本质上是声明一种可以通过路径进行 挂子,用子 找到对应的 template 进行页面渲染 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Tit 阅读全文
posted @ 2018-12-04 23:28 逆欢 阅读(501) 评论(0) 推荐(0) 编辑
摘要: AXIOS 本质上等同于json 传值 1.引用 1 //引入axios 2 import Axios from 'axios' 3 //将axios挂载到 Vue原型上 4 Vue.prototype.$https = Axios 5 6 //设置公共的url 7 Axios.defaults.b 阅读全文
posted @ 2018-12-04 23:02 逆欢 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1.导入vuex vuex是基于vue 的 1 import Vuex from 'vuex' 2 Vue.use(Vuex); 2.创建store 实例 1 let store = new Vuex.Store({ 2 state:{ 3 count:1 4 }, 5 mutations:{ 6 阅读全文
posted @ 2018-12-04 22:44 逆欢 阅读(144) 评论(0) 推荐(0) 编辑