docs(agents): 更新 TypeScript/TSX 文件中图标自动导入的说明
This commit is contained in:
@@ -29,7 +29,8 @@ Multiple auto-import systems are active:
|
|||||||
- **Dynamic components**: Auto-imported components cannot be used with `<component :is="..." />` syntax
|
- **Dynamic components**: Auto-imported components cannot be used with `<component :is="..." />` syntax
|
||||||
- ❌ Avoid: `<component :is="`icon-${name}`" />`
|
- ❌ Avoid: `<component :is="`icon-${name}`" />`
|
||||||
- ✅ Use: `<icon-foo v-if="condition" />` with `v-if`/`v-else-if`/`v-else` directives
|
- ✅ Use: `<icon-foo v-if="condition" />` with `v-if`/`v-else-if`/`v-else` directives
|
||||||
- **In TypeScript/TSX files**: Auto-import does NOT work. You must explicitly import icons using the `~icons/` prefix:
|
|
||||||
|
- **Icons in TypeScript/TSX files**: Auto-import for icons does NOT work. You must explicitly import them using the `~icons/` prefix:
|
||||||
|
|
||||||
```tsx
|
```tsx
|
||||||
import IconMenuRounded from '~icons/material-symbols/menu-rounded';
|
import IconMenuRounded from '~icons/material-symbols/menu-rounded';
|
||||||
|
|||||||
Reference in New Issue
Block a user