P4:react用SVG

  1. SVG

SVG

例如

1
2
3
4
5
6
7
8
9
export const uploadIcon = () => (
<svg t="1508484489766" viewBox="0 0 1024 1024" version="1.1" p-id="4095" width="64" height="64">
<path d="M959.516872 569.698097H572.223105v387.293767h-101.032045V569.698097H67.05879v-101.032045h404.13227V64.532759h101.032045v404.133293H959.516872v101.032045z" fill="#E0E0E0" p-id="4096"></path></svg>
)
//引用的时候直接:
<div>{uploadIcon()}</div>