使用vue框架的时候,若是页面提示以下错误,则说明new Vue的时候没有传入 el 的值:vue
[Vue warn]: Cannot find element: #main
咱们传入el 既能够,如:框架
var main = new Vue({ el: '#main', data: { currentActivity: 'home' } }):