<svg viewBox="0 0 20 20"></svg>转为base64编码
const imgUrl = (url: string) => {
return 'data:image/svg+xml;base64,' + window.btoa(unescape(encodeURIComponent(url)))
}
<svg viewBox="0 0 20 20"></svg>转为base64编码
const imgUrl = (url: string) => {
return 'data:image/svg+xml;base64,' + window.btoa(unescape(encodeURIComponent(url)))
}