feat: hide anchor for now, flatten toc, refine docs
This commit is contained in:
parent
45a027b6cb
commit
736a27bf5e
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<nav class="one-toc">
|
||||
<veui-anchor
|
||||
:items="items"
|
||||
:items="flattenItems"
|
||||
sticky
|
||||
/>
|
||||
</nav>
|
||||
@ -17,6 +17,11 @@ export default {
|
||||
},
|
||||
props: {
|
||||
items: Array
|
||||
},
|
||||
computed: {
|
||||
flattenItems () {
|
||||
return this.items.flatMap(({ children }) => children || [])
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
[[ demo src="/demo/breadcrumb/size.vue" ]]
|
||||
|
||||
### 使用内联 `BreadcrumbItem`
|
||||
### 内联模式
|
||||
|
||||
直接内联 `BreadcrumbItem` 使用。
|
||||
|
||||
|
@ -18,7 +18,7 @@ Available size variants for the [`ui`](#props-ui) prop: `s` / `m`.
|
||||
|
||||
[[ demo src="/demo/breadcrumb/size.vue" ]]
|
||||
|
||||
### Using inline `BreadcrumbItem`s
|
||||
### Inline usage
|
||||
|
||||
Can be used with embedded `BreadcrumbItem`s.
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<article ref="article" class="content ${style}"><!-- if: ${toc} -->
|
||||
<one-toc :items="toc"/><!-- /if -->
|
||||
<article ref="article" class="content ${style}">
|
||||
${content | raw}
|
||||
<section class="meta">
|
||||
<one-edit-link path="${path}"/>
|
||||
|
Loading…
Reference in New Issue
Block a user