Developed a project using vue webpack
Vue is not defined is thrown directly when accessing Vue in the browser console
// main.js new Vue({ router, store, render: h => h(App) }).$mount('#app-box')
How to access the vue instance externally?
Set a window.xxx = this;
var app = new Vue()
Isn’t this enough?
window.app = new vue({});This way you can print app in the console
Set a window.xxx = this;
in createdIsn’t this enough?
window.app = new vue({});
This way you can print app in the console