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
|
props.category.metadata.name
|
||||||
);
|
);
|
||||||
return categories
|
return categories
|
||||||
.map((category: CategoryTree) => category.spec.displayName)
|
?.map((category: CategoryTree) => category.spec.displayName)
|
||||||
.join(" / ");
|
.join(" / ");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -33,7 +33,7 @@ const label = computed(() => {
|
||||||
props.category.metadata.name
|
props.category.metadata.name
|
||||||
);
|
);
|
||||||
return categories
|
return categories
|
||||||
.map((category: CategoryTree) => category.spec.displayName)
|
?.map((category: CategoryTree) => category.spec.displayName)
|
||||||
.join(" / ");
|
.join(" / ");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -126,7 +126,7 @@ export const getCategoryPath = (
|
||||||
categories: CategoryTree[],
|
categories: CategoryTree[],
|
||||||
name: string,
|
name: string,
|
||||||
path: CategoryTree[] = []
|
path: CategoryTree[] = []
|
||||||
) => {
|
): CategoryTree[] | undefined => {
|
||||||
for (const category of categories) {
|
for (const category of categories) {
|
||||||
if (category.metadata && category.metadata.name === name) {
|
if (category.metadata && category.metadata.name === name) {
|
||||||
return path.concat([category]);
|
return path.concat([category]);
|
||||||
|
|
Loading…
Reference in New Issue