fix: 菜单图标字段 null 值守卫,补丁版本号 4.8.1

This commit is contained in:
Ray.Hao
2026-07-27 08:03:50 +08:00
parent 297d722719
commit f05c40bbf8
2 changed files with 130 additions and 130 deletions

View File

@@ -15,7 +15,7 @@ const props = withDefaults(
}
);
const isElementIcon = computed(() => props.icon.startsWith("el-icon"));
const elementIconName = computed(() => props.icon.replace("el-icon-", ""));
const isElementIcon = computed(() => (props.icon || "").startsWith("el-icon"));
const elementIconName = computed(() => (props.icon || "").replace("el-icon-", ""));
const svgIconClass = computed(() => `i-svg:${props.icon || "menu"}`);
</script>