1.vuex mutions提交方法
mutions commit
action dispatch
2.vue组件传值
props $emit eventbus
3.axios中断请求方法
4.webpack性能优化
5.vue混入
6.webpack cdn加速
7.webpack指定打包指令
8.项目中很多组件不需要时不加载资源
也就是异步组件
9.async await异步错误捕捉,try catch
zhuanlan.zhihu.com/p/114487312
window.onload = async () => {
try {
let res = await getData(3)
console.log(res)
} catch (error) {
console.log(res) //getdata error
}
}
10.vue在页面渲染完获取高度
offsetHeight
11.vue异步组件
12.$nexttick原理
13.封装公共方法多个组件使用
14.在created生命周期里注入方法
minxin
15.vuerouter 全局导航守卫
router.beforeEach
16.router。beforeEach里面可以获取到this吗
这是挂载到全局的方法,通过vue访问,没有this
17.js宏任务和微任务执行机制
18.vuex分模块编写
moudle
19.promise原理
三种状态pending,resolved, rejected
20.promise的参数
当传入的普通的对象或者值,状态由pending=>fulfiled
当传入一个promise,那么当前的promise状态会由传入的promise决定,即状态移交
当传入一个对象,并且对象有实现then方法,那么也会执行该then方法,且由该then方法决定后续的状态