maodun 2018-02-04
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)
总结
以上所述是小编给大家介绍的vue2.0 datepicker使用方法,希望对大家有所帮助,如果大家有任何疑问欢迎给我留言,小编会及时回复大家的!
.ui-datepicker{width:17em;padding:.2em.2em0;display:none;font-size:大小}可惜我试了不起作用。我试着用js加载后改,发现成功了!!!!