参考
图标 Icon
Icon:图标容器。用一个标准盒子让 inline svg 保持光学尺寸,并继承文字颜色;图标本身不携带颜色和尺寸。可以通过 `name` 从注册表取图标,也可以传入自定义图标。
Root
#Icon
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
size | String | "inherit" | 尺寸档位随周围字号变化;默认为 inherit,即图标所在文本的 1em |
label | String | undefined | 无障碍名称;未设置时图标仅用于呈现,并从无障碍树中隐藏 |
glyph | Object | undefined | A glyph from the registry, imported directly. Ignored when a default slot is given — an explicit glyph always wins. |
name | String | undefined | 图标库中的字形;提供默认插槽时忽略该属性,插槽内容优先于图标库 |