mirror of https://github.com/halo-dev/halo-admin
fix: post editor
parent
673da3208e
commit
f39c540a1d
|
@ -24,7 +24,7 @@ const label = computed(() => {
|
|||
props.category.metadata.name
|
||||
);
|
||||
return categories
|
||||
.map((category: CategoryTree) => category.spec.displayName)
|
||||
?.map((category: CategoryTree) => category.spec.displayName)
|
||||
.join(" / ");
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -33,7 +33,7 @@ const label = computed(() => {
|
|||
props.category.metadata.name
|
||||
);
|
||||
return categories
|
||||
.map((category: CategoryTree) => category.spec.displayName)
|
||||
?.map((category: CategoryTree) => category.spec.displayName)
|
||||
.join(" / ");
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -126,7 +126,7 @@ export const getCategoryPath = (
|
|||
categories: CategoryTree[],
|
||||
name: string,
|
||||
path: CategoryTree[] = []
|
||||
) => {
|
||||
): CategoryTree[] | undefined => {
|
||||
for (const category of categories) {
|
||||
if (category.metadata && category.metadata.name === name) {
|
||||
return path.concat([category]);
|
||||
|
|
Loading…
Reference in New Issue