使用vue-cli创建演示
index.js代码
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
// not work !!!
App.created = function () {
console.log(1231231232);
}
Vue.config.productionTip = true
/* eslint-disable no-new */
new Vue({
el: '#app',
template: '<App/>',
components: { App }
})
我不会t want to use
延长`,因为它会执行两次