For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt, and this page is available as Markdown at /apps-plugin/docs/components/media/svg.md.

svg

SVG 图形渲染组件,支持内联展示 SVG 格式图片。

扫码预览

扫码预览 svg

Props

属性名类型默认值必填说明
classNamestring-否组件类名
contentstring-否SVG 内容字符串,直接传入 SVG XML 内容
idstring-否元素的唯一标识
keystring | number | null-否React key 属性
onClick(event: TouchEvent) => void-否点击时的回调函数
refRef<NodesRef>-否用于获取组件实例的 ref
srcstring-否SVG 资源地址,支持 http/https/base64
styleCSSProperties-否组件样式