Skip to content

README.md 文档有错误 #4

New issue

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

Closed
ifmos opened this issue Jan 16, 2018 · 2 comments
Closed

README.md 文档有错误 #4

ifmos opened this issue Jan 16, 2018 · 2 comments

Comments

@ifmos
Copy link

ifmos commented Jan 16, 2018

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')

@ifmos ifmos changed the title READMe.md 文档有错误 README.md 文档有错误 Jan 16, 2018
@MrRaindrop
Copy link
Member

这个 vue 版本不同的话引入方式不太一样,vue-loader 新老版本打出来的包也有差异,具体的引入需要看开发者项目使用的版本,这里只是简单介绍怎么使用,如果详细介绍需要拆分出不同的版本,就比较啰嗦了. 这个后面我加个说明好了.

关于 $mount,在 vue 2.4.x 版本里加了 .el 就不用 $mount 直接 new App 就可以了。和 2.5.x 有差异. 这块遵循各个 vue 版本的使用约定就好。

@ifmos
Copy link
Author

ifmos commented Jan 17, 2018

@MrRaindrop 好的,谢谢告知!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants