-
Vue Responsive Principle
Reference: https://www.cnblogs.com/fundebug/p/responsive-vue.html
Object.defineProperty implements
Vue to monitor data changes by setting object property setter/getter methods, and collect dependencies through getters ,
and each setter method is an observer, notifying subscribers to update the view when the data changes. -
Vue's life cycle
beforeCreate,created
beforeMount,mounted
beforeUpdate,updated
activated,deactivated
beforeDestory,destoryed
activated: Execute when the page is redisplayed. Use keep-alive, localStorage and temporary variables to optimize page performance.
deactivated: When the page is about to be hidden Or execute when replacing other pages. It can be used to unbind the global event bound on activated.
mounted: It is the hook function after mounting the vue instance. The hook is executed once when the home page is mounted. If there is no cache, return to it again This function will also be executed on the home page.
activated: It is the hook function after the component is activated, and it will be executed every time it returns to the page. -
Vue $nextTick principle, event mechanism
Reference: https://www.jianshu.com/p/a7550c0e164f -
Component passing value
Reference: https://juejin.cn/post/6844903845642911752
var Event = new Vue()
Event.$ emit(event name, data)
Event.$ on(event name, data => { }) -
vuex
reference: https://vuex.vuejs.org/zh/ -
Vue-router
reference: https://rou
Vue interview questions
Guess you like
Origin blog.csdn.net/hujian66/article/details/124600170
Recommended
Ranking