摘要:
两种模式,分别是 hash模式 和 history模式。 hash: hash 模式的原理是 onhashchange 事件,可通过 window 对象监听; 符号本身以及它后面的字符被称为hash,可以通过 window.location.hash 获取; hash 虽然包含在浏览器的url中,但 阅读全文
posted @ 2021-06-14 19:18
Upward123
阅读(760)
评论(0)
推荐(0)
摘要:
父子组件之间传值:props、$emit 祖孙组件之间传值:provide和inject 兄弟(无关联)组件之间传值:$emit和$on(Event bus)、vuex、sessionStorage、localStorage vue的$emit和$on,这是vue实现的Vue Event Bus插件 阅读全文
posted @ 2021-06-14 19:15
Upward123
阅读(46)
评论(0)
推荐(0)
摘要:
简介 vue的生命周期大致分为四个过程,分别是创建过程、挂载过程、更新过程、销毁过程,对应 8 个生命周期钩子函数,分别是 beforeCreate、created、beforeMount、mounted、beforeUpdate、updated、beforeDestory、destoryed。生命 阅读全文
posted @ 2021-06-14 19:09
Upward123
阅读(345)
评论(0)
推荐(0)