!455 fix: fix calculation method of isLocal

Merge pull request !455 from AhJindeg/hotfix/icon
This commit is contained in:
芋道源码 2024-06-22 06:49:33 +00:00 committed by Gitee
commit 0895f9ffcb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -22,7 +22,7 @@ const props = defineProps({
const elRef = ref<ElRef>(null)
const isLocal = computed(() => props.icon.startsWith('svg-icon:'))
const isLocal = computed(() => props.icon?.startsWith('svg-icon:'))
const symbolId = computed(() => {
return unref(isLocal) ? `#icon-${props.icon.split('svg-icon:')[1]}` : props.icon