随笔分类 -  VUE

摘要://第一种调用方式 new Promise((resolve,reject)=>{ setTimeout(function() { console.log('模拟异步请求操作!'); //resolve('成功时主动调用这个函数,会执行下面的then方法') // reject('失败时主动调用这个 阅读全文
posted @ 2020-07-30 09:09 咖啡无眠 阅读(1172) 评论(0) 推荐(0) 编辑
摘要:router.beforeEach((to,from,next)=>{ //从from跳转到to document.title=to.matched[0].meta.title console.log(to) next() //这步必须要调用 }) //后置钩子 router.afterEach(( 阅读全文
posted @ 2020-07-29 14:07 咖啡无眠 阅读(265) 评论(0) 推荐(0) 编辑
摘要:import Vue from 'vue' import Router from 'vue-router' Router.prototype.go = function(t) { this.isBack = true console.log('go ' + this.history.current. 阅读全文
posted @ 2020-07-29 08:32 咖啡无眠 阅读(456) 评论(0) 推荐(0) 编辑
摘要:npm install --save-dev vue-loader vue-template-compiler 打开 webpack.config.js文件添加配置信息 module.exports={ entry:'/src/main.js',//入口文件 output:{filename:'bu 阅读全文
posted @ 2020-07-26 14:59 咖啡无眠 阅读(2362) 评论(0) 推荐(0) 编辑
摘要:npm install webpack@3.6.0 --save-dev 阅读全文
posted @ 2020-07-25 10:57 咖啡无眠 阅读(624) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-06-19 13:42 咖啡无眠 阅读(221) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示