Vue 插件 / Vue.use

Project uses some places Vue.use, to use a plug-in

achieve:

  • Must export exposure install a method of execution is the entrance Vue.use
  • Vue.use parameter passed to the install method, the first parameter is the Vue constructor, the second parameter is an optional options object options
  • Vue usually added to the prototype construction method, such as, Vue.prototype, $ checkResponse = function () {}

Guess you like

Origin blog.csdn.net/zdhanunity/article/details/94313092