1.使用vue-cli腳手架創(chuàng)建vue項(xiàng)目。在order列表頁使用 vue-datepicker。按照文檔操作,安裝后,使用
myDatepicker from ‘vue-datepicker'命令,導(dǎo)入組件。但是控制臺(tái)提示 exports is not defined。
2.使用的是webpack包管理工具
1.導(dǎo)入代碼
import myDatepicker from ‘vue-datepicker' export default{ components: { VSelection, myDatepicker }, }
瀏覽器控制臺(tái)提示如下
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)
總結(jié)
以上所述是小編給大家介紹的vue2.0 datepicker使用方法,希望對(duì)大家有所幫助,如果大家有任何疑問歡迎給我留言,小編會(huì)及時(shí)回復(fù)大家的!
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com