Kaviilee / blog

my blog
https://kaviilee.github.io/blog/
0 stars 0 forks source link

vue #13

Open Kaviilee opened 3 years ago

Kaviilee commented 3 years ago

// 解决重复点击路由报错的BUG

const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
    return originalPush.call(this, location).catch((err) => err);
};
Kaviilee commented 3 years ago

加载渲染过程 父beforeCreate->父created->父beforeMount->子beforeCreate->子created->子beforeMount->子mounted->父mounted 子组件更新过程 父beforeUpdate->子beforeUpdate->子updated->父updated 父组件更新过程 父beforeUpdate->父updated 销毁过程 父beforeDestroy->子beforeDestroy->子destroyed->父destroyed