Compare commits

..

3 Commits

Author SHA1 Message Date
holly feffbdf2e4
Merge 2bdb56ef4c into d630567a3c 2025-11-04 20:51:49 +08:00
yu.kuai 2bdb56ef4c feat: 前台支持展示更新人/创建人 2025-11-04 19:03:22 +08:00
yu.kuai 9fe5b50a66 feat: 文档显示人员操作记录 2025-11-04 19:03:22 +08:00
1 changed files with 11 additions and 25 deletions

View File

@ -40,8 +40,6 @@ const History = () => {
);
const [characterCount, setCharacterCount] = useState(0);
const [isMarkdown, setIsMarkdown] = useState(false);
const editorRef = useTiptap({
content: '',
editable: false,
@ -51,26 +49,10 @@ const History = () => {
},
});
const editorMdRef = useTiptap({
content: '',
contentType: 'markdown',
editable: false,
immediatelyRender: true,
onUpdate: ({ editor }) => {
setCharacterCount((editor.storage as any).characterCount.characters());
},
});
const getDetail = (v: DomainNodeReleaseListItem) => {
getApiProV1NodeReleaseDetail({ id: v.id!, kb_id: kb_id! }).then(res => {
setCurNode(res);
if (res.meta?.content_type === 'md') {
setIsMarkdown(true);
editorMdRef.setContent(res.content || '');
} else {
setIsMarkdown(false);
editorRef.setContent(res.content || '');
}
editorRef.setContent(res.content || '');
window.scrollTo({ top: 0, behavior: 'smooth' });
});
};
@ -225,7 +207,7 @@ const History = () => {
gap={0.5}
sx={{ cursor: 'pointer' }}
>
<Icon type='icon-tianjiawendang' sx={{ fontSize: 9 }} />
<Icon type='icon-tianjiawendang' />
{curNode.editor_account}
</Stack>
</Tooltip>
@ -267,6 +249,13 @@ const History = () => {
</Box>
</Box>
)}
{/* <EditorThemeProvider
colors={{ light }}
mode='light'
theme={{
components: componentStyleOverrides,
}}
> */}
<Box
sx={{
'.tiptap': {
@ -278,12 +267,9 @@ const History = () => {
},
}}
>
{isMarkdown ? (
<Editor editor={editorMdRef.editor} />
) : (
<Editor editor={editorRef.editor} />
)}
<Editor editor={editorRef.editor} />
</Box>
{/* </EditorThemeProvider> */}
</Box>
)}
</Box>