|
|
@ -49,7 +49,7 @@ export default defineComponent({ |
|
|
|
id={`${variables.namespace}-tool-header`} |
|
|
|
class={[ |
|
|
|
prefixCls, |
|
|
|
'h-[var(--top-tool-height)] relative px-[var(--top-tool-p-x)] flex items-center justify-between', |
|
|
|
'h-[var(--top-category-height)] relative px-[var(--top-tool-p-x)] flex items-center justify-between', |
|
|
|
'dark:bg-[var(--el-bg-color)]' |
|
|
|
]} |
|
|
|
> |
|
|
@ -64,6 +64,12 @@ export default defineComponent({ |
|
|
|
const { renderMenuTitle } = useRenderMenuTitle() |
|
|
|
const categoryRouters = unref(routers).filter(item=>item.meta.hidden!=true&&item.path!='/') |
|
|
|
console.log('categoryRouters==',categoryRouters) |
|
|
|
//默认展开第一行 |
|
|
|
if(categoryRouters.length>0){ |
|
|
|
appStore.setCategoryRoutePath(categoryRouters[0].path) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{/* default: () => renderMenuTitle(onlyOneChild ? onlyOneChild?.meta : meta) */} |
|
|
|
return categoryRouters.map((v) => { |
|
|
|
const meta = (v.meta ?? {}) as RouteMeta |
|
|
|