Vue Webpack常见问题(持续更新)
生活随笔
收集整理的這篇文章主要介紹了
Vue Webpack常见问题(持续更新)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
常識
1.computed計算屬性,使用的屬性必需在data里面聲明。
computed: {canLogin: function(){//注意這里的依賴的屬性必需在data里面聲明return this.name && this.password;} }Webpack問題
1.模塊里面使用JSON.stringify和 typeof,報:Uncaught TypeError: Cannot assign to read only property 'exports' of #<Object>
解決方法:把.babelrc里的plugin "transform-runtime" 刪掉, 重啟運行?
Vue控件問題
1.VueI18n的messages設置無效問題
//messages得單獨寫出來,不然會報[vue-i18n] Cannot translate the value of keypath “”. Use the value of keypath as default. const messages = {'lang': path.i18n } const i18n = new VueI18n({locale: 'lang',messages })new Vue({.....i18n })?
更多專業前端知識,請上 【猿2048】www.mk2048.com
總結
以上是生活随笔為你收集整理的Vue Webpack常见问题(持续更新)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 一篇文章为你深度解析HTTPS 协议
- 下一篇: vue 新版本 webpack 代理 跨