feat: add custom label template for active navigation item in DetailLayout

This commit is contained in:
Marvin Zhang
2025-06-12 10:31:26 +08:00
parent 79b7e074e1
commit fe79cbb1a5

View File

@@ -102,6 +102,11 @@ defineOptions({ name: 'ClDetailLayout' });
:label="navItemLabelFn ? navItemLabelFn(item) : item.label"
:value="item.id"
/>
<template #label>
{{
navItems.find(item => item.id === activeId)?.label || activeId
}}
</template>
</el-select>
</div>
</template>