vue3.0

 

 

 

 

一、vue3.0尝鲜





  
  vue-next尝鲜
  



  

 

二、@vue/composition-api

https://vue-composition-api-rfc.netlify.app/#summary

https://www.npmjs.com/package/@vue/composition-api

装包:

yarn add @vue/composition-api

 

main.js:

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import VueCompositionApi from '@vue/composition-api'

Vue.config.productionTip = false
Vue.use(VueCompositionApi)

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

App.js:




加法:





 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(web前端,vue)