|
@@ -1,6 +1,6 @@
|
|
|
|
|
+import { useNavigate } from "react-router-dom";
|
|
|
import { useState, useEffect } from "react";
|
|
import { useState, useEffect } from "react";
|
|
|
import { Space, Typography } from "antd";
|
|
import { Space, Typography } from "antd";
|
|
|
-import MDEditor from "@uiw/react-md-editor";
|
|
|
|
|
|
|
|
|
|
import { get } from "../../request";
|
|
import { get } from "../../request";
|
|
|
import type {
|
|
import type {
|
|
@@ -8,10 +8,10 @@ import type {
|
|
|
IAnthologyResponse,
|
|
IAnthologyResponse,
|
|
|
} from "../api/Article";
|
|
} from "../api/Article";
|
|
|
import type { IAnthologyData } from "./AnthologyCard";
|
|
import type { IAnthologyData } from "./AnthologyCard";
|
|
|
-import TocTree from "./TocTree";
|
|
|
|
|
-import { useNavigate } from "react-router-dom";
|
|
|
|
|
import StudioName from "../auth/StudioName";
|
|
import StudioName from "../auth/StudioName";
|
|
|
import TimeShow from "../general/TimeShow";
|
|
import TimeShow from "../general/TimeShow";
|
|
|
|
|
+import Marked from "../general/Marked";
|
|
|
|
|
+import AnthologyTocTree from "../anthology/AnthologyTocTree";
|
|
|
|
|
|
|
|
const { Title, Text } = Typography;
|
|
const { Title, Text } = Typography;
|
|
|
|
|
|
|
@@ -71,12 +71,12 @@ const Widget = ({ aid, channels, onArticleSelect }: IWidgetAnthologyDetail) => {
|
|
|
/>
|
|
/>
|
|
|
</Space>
|
|
</Space>
|
|
|
<div>
|
|
<div>
|
|
|
- <MDEditor.Markdown source={tableData?.summary} />
|
|
|
|
|
|
|
+ <Marked text={tableData?.summary} />
|
|
|
</div>
|
|
</div>
|
|
|
<Title level={5}>目录</Title>
|
|
<Title level={5}>目录</Title>
|
|
|
|
|
|
|
|
- <TocTree
|
|
|
|
|
- treeData={tableData?.articles}
|
|
|
|
|
|
|
+ <AnthologyTocTree
|
|
|
|
|
+ anthologyId={aid}
|
|
|
onSelect={(keys: string[]) => {
|
|
onSelect={(keys: string[]) => {
|
|
|
if (typeof onArticleSelect !== "undefined") {
|
|
if (typeof onArticleSelect !== "undefined") {
|
|
|
onArticleSelect(keys);
|
|
onArticleSelect(keys);
|