作者:suzhaolie | 来源:互联网 | 2023-08-27 05:39
原来的iconfont.css:font-face{font-family:iconfont;*Projectid2762712*src:url(iconfon
原来的iconfont.css:
@font-face {font-family: "iconfont"; /* Project id 2762712 */src: url('iconfont.woff2?t=1631523743638') format('woff2'),url('iconfont.woff?t=1631523743638') format('woff'),url('iconfont.ttf?t=1631523743638') format('truetype');
}.iconfont {font-family: "iconfont" !important;font-size: 16px;font-style: normal;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;
}......
url改用绝对路径,App端就可以正常显示iconfont图标了。修复后的iconfont.css:
@font-face {font-family: "iconfont"; /* Project id 2762712 */src: url('~@/static/iconfont/iconfont.woff2?t=1631523743638') format('woff2'),url('~@/static/iconfont/iconfont.woff?t=1631523743638') format('woff'),url('~@/static/iconfont/iconfont.ttf?t=1631523743638') format('truetype');
}.iconfont {font-family: "iconfont" !important;font-size: 16px;font-style: normal;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;
}......