diff --git a/lib/pages/article/preview/index.js b/lib/pages/article/preview/index.js index 540cbd0d5..a9cb2290e 100644 --- a/lib/pages/article/preview/index.js +++ b/lib/pages/article/preview/index.js @@ -17,8 +17,6 @@ exports.default = OakComponent({ id: article === null || article === void 0 ? void 0 : article.id, content: article === null || article === void 0 ? void 0 : article.content, name: article === null || article === void 0 ? void 0 : article.name, - // entity: article?.entity, - // entityId: article?.entityId, }; }, // listeners: { diff --git a/src/pages/article/preview/index.ts b/src/pages/article/preview/index.ts index 95e4acfdb..d7fdfcb24 100644 --- a/src/pages/article/preview/index.ts +++ b/src/pages/article/preview/index.ts @@ -16,8 +16,6 @@ export default OakComponent({ id: article?.id, content: article?.content, name: article?.name, - // entity: article?.entity, - // entityId: article?.entityId, }; }, // listeners: { diff --git a/src/pages/article/preview/web.tsx b/src/pages/article/preview/web.tsx index 9966fcc1c..7ddaf870d 100644 --- a/src/pages/article/preview/web.tsx +++ b/src/pages/article/preview/web.tsx @@ -2,11 +2,10 @@ import React from 'react'; import Style from './web.module.less'; import { WebComponentProps } from 'oak-frontend-base'; import { EntityDict } from '../../../general-app-domain'; -import { Editor } from "@wangeditor/editor-for-react"; -import { IEditorConfig } from "@wangeditor/editor"; +import { Editor } from '@wangeditor/editor-for-react'; +import { IEditorConfig } from '@wangeditor/editor'; import { useState, useEffect } from 'react'; - export default function Render( props: WebComponentProps< EntityDict, @@ -29,16 +28,16 @@ export default function Render( const { id, name, editor, title, content } = props.data; console.log(title, content) const editorConfig: Partial = { - readOnly: true, - autoFocus: true, - scroll: false, + readOnly: true, + autoFocus: true, + scroll: false, }; const [value, setValue] = useState(''); useEffect(() => { - if(content) { - setValue(content) - } - },[content]); + if (content) { + setValue(content); + } + }, [content]); return (
@@ -49,15 +48,15 @@ export default function Render( {/*
{author}
*/} -
- +
+