diff --git a/src/views/manage-notes/components/topic-detail.tsx b/src/views/manage-notes/components/topic-detail.tsx index b1813af01..1510271d8 100644 --- a/src/views/manage-notes/components/topic-detail.tsx +++ b/src/views/manage-notes/components/topic-detail.tsx @@ -1,10 +1,15 @@ -import { PlusIcon, SearchIcon, TrashIcon } from 'components/icons' +import { + PencilAltIcon, + PlusIcon, + SearchIcon, + TrashIcon, +} from 'components/icons' import { IframePreviewButton } from 'components/special-button/iframe-preview' import { UploadWrapper } from 'components/upload' -import type { TopicModel } from 'models/topic' import { NAvatar, NButton, + NButtonGroup, NCard, NEmpty, NList, @@ -20,9 +25,11 @@ import { import { RESTManager } from 'utils' import { buildMarkdownRenderUrl } from 'utils/endpoint' import { textToBigCharOrWord } from 'utils/word' +import { useRouter } from 'vue-router' +import type { NoteModel, Pager, PaginateResult } from '@mx-space/api-client' +import type { TopicModel } from 'models/topic' import type { PropType } from 'vue' -import type { NoteModel, Pager, PaginateResult } from '@mx-space/api-client' import { Icon as NIcon } from '@vicons/utils' import { useMemoNoteList } from '../hooks/use-memo-note-list' @@ -83,6 +90,8 @@ export const TopicDetail = defineComponent({ } } + const router = useRouter() + return () => ( <> @@ -176,7 +185,7 @@ export const TopicDetail = defineComponent({ }, description() { return ( -

+

{topic.value?.introduce}

) @@ -190,7 +199,7 @@ export const TopicDetail = defineComponent({ ) : (
-

+

包含的文章:

{notes.value.length === 0 && ( -
+
)} @@ -210,7 +219,7 @@ export const TopicDetail = defineComponent({ {{ default() { return ( -

+

{note.title} - handleRemoveTopicFromThisNote(note.id) - } - > - {{ - trigger() { - return ( - - - - - - ) - }, - default() { - return `是否移除此话题「${topic.value?.name}」?` - }, - }} - + + { + router.push({ + path: `/notes/edit`, + query: { + id: note.id, + }, + }) + }} + > + + + + + + handleRemoveTopicFromThisNote(note.id) + } + > + {{ + trigger() { + return ( + + + + + + ) + }, + default() { + return `是否移除此话题「${topic.value?.name}」?` + }, + }} + + ) }, }} @@ -264,7 +292,7 @@ export const TopicDetail = defineComponent({ ) : ( -

+