fix(sites): not display types anchor when doc has not types (#969)

This commit is contained in:
gimmyhehe 2023-11-30 14:42:11 +08:00 committed by GitHub
parent 9b4b1d4eb7
commit 2cf5289e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -167,7 +167,10 @@ export default defineComponent({
link: `#${demo.demoId}`
})) || []
if (state.currJson?.apis?.length) {
links.push({ key: 'API', title: 'API', link: '#API' }, { key: 'Types', title: 'Types', link: '#types' })
links.push({ key: 'API', title: 'API', link: '#API' })
}
if (state.currJson?.types?.length) {
links.push({ key: 'types', title: 'types', link: '#types' })
}
if (state.cmpFAQMd) {
links.push({