vue 挂载方式

//1 使用一下实例

new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})

// 在webpack.config.js
resolve: {
    alias: {
      'vue': 'vue/dist/vue.js'
    }
  }


//2使用一下实例

new Vue({
   el: '#app',
   store,
   router, 
  render: h=> h(App)
})

 

  

// 两种挂载方式
new Vue({
  // el: '#app',
  store,
  render: h=> h(App)
}).$mount('#app')

 

posted @ 2018-03-09 16:57  renyangli  阅读(233)  评论(0编辑  收藏  举报