-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
原因はここで、コンポーネントを遅延ロードしているせい
traQ_S-UI/src/components/UI/AIcon.vue
Lines 64 to 85 in 9c80671
| const getComponent = async (name: string) => { | |
| const moduleFunc = iconModules[`/src/assets/icons/${name}.svg`] | |
| if (!moduleFunc) { | |
| throw new Error(`存在しないアイコン名: ${name}`) | |
| } | |
| const module = await moduleFunc() | |
| return module.default | |
| } | |
| const svgComponent = shallowRef() | |
| watch( | |
| () => props.name, | |
| async () => { | |
| if (props.mdi) return | |
| const name = props.name | |
| const com = await getComponent(name) | |
| if (props.name !== name) return // 取得中にnameが変わったら何もしない | |
| svgComponent.value = com | |
| }, | |
| { immediate: true } | |
| ) |
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Inbox