Vue elementui字體圖標顯示問題解決方案
問題如下
在build/utils.js下找到
if (options.extract) { return ExtractTextPlugin.extract({ use: loaders, fallback: ’vue-style-loader’, publicPath: ’../../’ }) } else { return [’vue-style-loader’].concat(loaders) }
加上
publicPath: ’../../’
運行項目還是不行 ,F(xiàn)ailed to decode downloaded font: http://192.168.11.110:8081/dist/static/font 路徑也是對的
網(wǎng)上搜了很多,大部分說是后臺經(jīng)過maven的filter,會破壞font文件的二進制文件格式,導致前臺解析出錯
但是我的是運行在本地環(huán)境下,還沒有進行打包部署
解決方式:
在maven文件的pom文件的build標簽加入下面的
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <nonFilteredFileExtensions><nonFilteredFileExtension>ttf</nonFilteredFileExtension> <nonFilteredFileExtension>woff</nonFilteredFileExtension><nonFilteredFileExtension>woff2</nonFilteredFileExtension> </nonFilteredFileExtensions> </configuration> </plugin>
重啟項目,這樣應該就可以了
以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持好吧啦網(wǎng)。
相關文章:
1. java——Byte類/包裝類的使用說明2. android studio實現(xiàn)簡單的計算器(無bug)3. python 讀txt文件,按‘,’分割每行數(shù)據(jù)操作4. python Selenium 庫的使用技巧5. android 控件同時監(jiān)聽單擊和雙擊實例6. python+pywinauto+lackey實現(xiàn)PC端exe自動化的示例代碼7. vue使用exif獲取圖片經(jīng)緯度的示例代碼8. python logging.info在終端沒輸出的解決9. 詳解android adb常見用法10. Python 忽略文件名編碼的方法
