|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
- <div class="max-w-screen-xl content my-0 mx-auto text-size-base overflow-hidden">
|
|
|
+ <div class="max-w-screen-xl content my-0 mx-auto text-size-base overflow-hidden"
|
|
|
+ :class="!detail ? 'flex flex-column justify-center items-center h-full' : ''">
|
|
|
<div v-if="detail">
|
|
|
<div class="breadcrumb my-[30px] pb-[20px] bb-1px_#EBEBEB" role="navigation">
|
|
|
<n-breadcrumb separator=">" v-if="breadcrumb">
|
|
@@ -67,6 +68,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div else class="">
|
|
|
+
|
|
|
+ <n-empty :description="$t('no_data')">
|
|
|
+ <template #extra>
|
|
|
+ {{ $t('no_data_article') }}
|
|
|
+ <n-button size="small" type="tertiary" @click="router.push('/')">
|
|
|
+ {{ $t('go_home') }}
|
|
|
+ </n-button>
|
|
|
+ </template>
|
|
|
+ </n-empty>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -91,7 +103,7 @@ import {
|
|
|
getNearArticles,
|
|
|
} from '@/api'
|
|
|
import { htmlToTree, createAnchorNames, dayjs, findNodeById, findBreadcrumbPath, type TreeNode } from '@/utils'
|
|
|
-import { NH1, NH2, NH4, NBreadcrumb, NBreadcrumbItem, NTree, NAnchor, NAnchorLink } from 'naive-ui'
|
|
|
+import { NH1, NH2, NH4, NEmpty, NButton, NBreadcrumb, NBreadcrumbItem, NTree, NAnchor, NAnchorLink } from 'naive-ui'
|
|
|
import type { TreeOption } from 'naive-ui'
|
|
|
|
|
|
const route = useRoute()
|