

1.使用vue-cli脚手架创建vue项目。在order列表页使用 vue-datepicker。按照文档操作,安装后,使用
myDatepicker from ‘vue-datepicker'命令,导入组件。但是控制台提示 exports is not defined。
2.使用的是webpack包管理工具
1.导入代码
import myDatepicker from ‘vue-datepicker'
export default{
components: {
VSelection,
myDatepicker
},
}浏览器控制台提示如下
vue-datepicker-1.vue?268e:436 Uncaught ReferenceError: exports is not defined at eval (eval at <anonymous> (app.js:1778), <anonymous>:12:23) at Object.<anonymous> (app.js:1778) at webpack_require (app.js:660) at fn (app.js:84) at eval (eval at <anonymous> (app.js:2211), <anonymous>:7:3) at Object.<anonymous> (app.js:2211) at webpack_require (app.js:660) at fn (app.js:84) at eval (eval at <anonymous> (app.js:1904), <anonymous>:4:94) at Object.<anonymous> (app.js:1904)
上面是我整理给大家的,希望今后会对大家有帮助。
相关文章:
使用vue实现二级路由设置方法
使用mint-ui实现省市区三级联动效果
使用vue2.0.js实现多级联动选择器
