| </head> | </head> | ||||
| <body> | <body> | ||||
| <div id="root"></div> | <div id="root"></div> | ||||
| <script src="/umi.745f16d0.js"></script> | |||||
| <script src="/umi.8c0465bb.js"></script> | |||||
| </body> | </body> | ||||
| </html> | </html> |
| placeholder: string | number; | placeholder: string | number; | ||||
| onChange : (values: object) => void; | onChange : (values: object) => void; | ||||
| }; | }; | ||||
| const RichComponent: React.FC<RichModelProps> = ({ defaultValue,placeholder, onChange }) => { | |||||
| const [editorValue, setEditorValue] = useState(defaultValue); | |||||
| import he from 'he'; | |||||
| const RichComponent: React.FC<RichModelProps> = ({ defaultValue,placeholder, onChange }) => { | |||||
| const [editorValue, setEditorValue] = useState(he.decode(defaultValue)); | |||||
| const handleChange = (content) => { | const handleChange = (content) => { | ||||
| setEditorValue(content); | setEditorValue(content); | ||||
| onChange(content); | onChange(content); |
| import UploadModel from '@/components/Common/upload'; | import UploadModel from '@/components/Common/upload'; | ||||
| import DragUpload from '@/components/Common/dragupload'; | import DragUpload from '@/components/Common/dragupload'; | ||||
| import RichComponent from '@/components/Common/rich'; | import RichComponent from '@/components/Common/rich'; | ||||
| import he from 'he'; | |||||
| import { isArrayOfType } from '@/utils/dataHelper'; | import { isArrayOfType } from '@/utils/dataHelper'; | ||||
| let res = await GetArticleDetail({ id: id }) | let res = await GetArticleDetail({ id: id }) | ||||
| setUploadedFilephotoName(res.data.cover_img) | setUploadedFilephotoName(res.data.cover_img) | ||||
| res.data.section_arr = [res.data.section_name] | res.data.section_arr = [res.data.section_name] | ||||
| setDetail(res.data) | setDetail(res.data) | ||||
| return res.data; | return res.data; | ||||
| } else { | } else { |