上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 79 下一页
摘要: `````` 阅读全文
posted @ 2020-03-08 22:26 南风晚来晚相识 阅读(1061) 评论(0) 推荐(0)
摘要: ``` //整个实例出来 配置路由守卫 const router = new Router({ //这里面是路由配置哈 }) router.beforeEach((to, from, next) => { if (to.path == "/login") { next(); } else { const token = localStorage.getItem("token"); if (toke 阅读全文
posted @ 2020-03-08 21:58 南风晚来晚相识 阅读(796) 评论(0) 推荐(0)
摘要: 1组件命名驼峰 如myBread.vue(组件) 2引入时,接受同样是驼峰 import MyBread from "@/components/cuscom/myBread.vue"; Vue.component(MyBread.name, MyBread); //注册组件 3在使用时,横线 阅读全文
posted @ 2020-03-08 21:53 南风晚来晚相识 阅读(3574) 评论(0) 推荐(0)
摘要: 第1步下载插件 cnpm i moment S 第2步 在main.js中去使用 users.vue文件 ` 阅读全文
posted @ 2020-03-08 21:10 南风晚来晚相识 阅读(634) 评论(0) 推荐(0)
摘要: 请求头携带token async getUserlist(){ // 需要授权的Api,必须在青丘头中使用Authorization 字段提供token令牌 const AUTH_TOKEN=localStorage.getItem("token"); this.$http.defaults.hea 阅读全文
posted @ 2020-03-08 20:57 南风晚来晚相识 阅读(2230) 评论(0) 推荐(0)
摘要: ``` :unique-opened="true" 只保留一个菜单 :router="true"开启路由标识 index="users" 是标识 它就会去找这个路由 ``` ``` 标识 用户列表 选项2 路由 { path: "/home", name: "home", component: () => import("../components/home/home.vue"), childre 阅读全文
posted @ 2020-03-08 20:52 南风晚来晚相识 阅读(1941) 评论(0) 推荐(0)
摘要: 使用await的方式 简记在函数的前面使用async 在请求时,使用await。然后用一个变量进行接收哈。 阅读全文
posted @ 2020-03-08 20:37 南风晚来晚相识 阅读(1136) 评论(0) 推荐(0)
摘要: 在项目中将解构用起来哈。 阅读全文
posted @ 2020-03-08 20:34 南风晚来晚相识 阅读(319) 评论(0) 推荐(0)
摘要: 01== 重新写axios的插件 02 在main.js中去引入 在vue中@表示是src这个文件夹哦 按照上面这两步插件已经发呢改装好了哈。然后就是可以使用了。 下面是使用的方法 阅读全文
posted @ 2020-03-08 20:28 南风晚来晚相识 阅读(267) 评论(0) 推荐(0)
摘要: 简单介绍一下public private protected public:当一个类的成员变量没有修饰的时候,默认的就是 public 进行修饰。外部是可以进行访问的。 private属性只能够在父类的内部直接进行访问。 private读音【ˈpraɪ vɪ t】 protected:可以在父类或者 阅读全文
posted @ 2020-03-08 16:57 南风晚来晚相识 阅读(482) 评论(0) 推荐(0)
上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 79 下一页