We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HOW TO USE 第2段代码中的 const Vue = require('vue/dist/vue.runtime.common').default 应为 const Vue = require('vue/dist/vue.runtime.common') const App = require('App.vue') 应为 const App = require('./App.vue').default 或者 import App from './App.vue' new App() 应为 new Vue(App).$mount('#root')
const Vue = require('vue/dist/vue.runtime.common').default
const Vue = require('vue/dist/vue.runtime.common')
const App = require('App.vue')
const App = require('./App.vue').default
import App from './App.vue'
new App()
new Vue(App).$mount('#root')
The text was updated successfully, but these errors were encountered:
这个 vue 版本不同的话引入方式不太一样,vue-loader 新老版本打出来的包也有差异,具体的引入需要看开发者项目使用的版本,这里只是简单介绍怎么使用,如果详细介绍需要拆分出不同的版本,就比较啰嗦了. 这个后面我加个说明好了.
关于 $mount,在 vue 2.4.x 版本里加了 .el 就不用 $mount 直接 new App 就可以了。和 2.5.x 有差异. 这块遵循各个 vue 版本的使用约定就好。
$mount
.el
new App
Sorry, something went wrong.
d2ad009
@MrRaindrop 好的,谢谢告知!
No branches or pull requests
HOW TO USE 第2段代码中的
const Vue = require('vue/dist/vue.runtime.common').default
应为const Vue = require('vue/dist/vue.runtime.common')
const App = require('App.vue')
应为const App = require('./App.vue').default
或者import App from './App.vue'
new App()
应为new Vue(App).$mount('#root')
The text was updated successfully, but these errors were encountered: