7.15 取消富文本组件路由

This commit is contained in:
jl-zhoujl2
2022-07-15 11:00:36 +08:00
parent 8006d32d57
commit 04b9f73d3d
3 changed files with 9 additions and 50 deletions

View File

@ -32,15 +32,15 @@ export default [
], ],
}, },
//日历组件暂时用 //日历组件暂时用
{ // {
path: '/Calendar', // path: '/Calendar',
component: './MainPage/ProjectManager/components/CalendarForm', // component: './MainPage/ProjectManager/components/CalendarForm',
}, // },
//富文本组件 //富文本组件
{ // {
path: '/editor', // path: '/editor',
component: './MainPage/ProjectManager/components/WangEditor', // component: './MainPage/ProjectManager/components/WangEditor',
}, // },
//401错误页 //401错误页
{ {
exact: true, exact: true,

View File

@ -1,41 +0,0 @@
import React, { useRef, useState } from 'react';
import { Button, Typography } from 'antd';
import BraftText from '@/components/richText/wang';
import ProCard from '@ant-design/pro-card';
import { isEmpty } from '@/utils/CommonUtils';
const Editor: React.FC<{}> = () => {
const braftRef = useRef<any>(null);
const [text, setText] = useState();
const [code, setCode] = useState();
const { Text, Paragraph } = Typography;
return (
<ProCard
split={'vertical'}
bordered
headerBordered
>
<ProCard title="文本域" colSpan="50%">
<BraftText braftRef={braftRef} echo={''} disabled={false} height={600} onChange={(value) => setText(value)} useImage />
</ProCard>
<ProCard title="代码段" colSpan="50%" extra={
<>
{code}
<Button type="primary" onClick={() => setCode(braftRef.current.getImageId())}></Button>
</>
}>
{isEmpty(text) ? '没有' : (
<Paragraph>
<pre>
<Text copyable>
{text}
</Text>
</pre>
</Paragraph>
)}
</ProCard>
</ProCard>
);
};
export default Editor;

View File

@ -176,7 +176,7 @@ const EventMaintenanceModal: React.FC<EventMaintenanceModalProps> = (props) => {
</Form.Item> </Form.Item>
<Form.Item name="content" label="正文内容" rules={[{ required: !readOnly }]}> <Form.Item name="content" label="正文内容" rules={[{ required: !readOnly }]}>
{readOnly ? ( {readOnly ? (
<div style={{ border: '1px solid #c9d8db', padding: '16px' }}> <div style={{ border: '1px solid #c9d8db', padding: '16px', overflowX: 'auto' }}>
<div dangerouslySetInnerHTML={{ __html: record?.content }}></div> <div dangerouslySetInnerHTML={{ __html: record?.content }}></div>
</div> </div>
) : ( ) : (