Commit 88ed98c5 authored by 满振华's avatar 满振华

修改页面样式

parent 49098b31
...@@ -31,6 +31,7 @@ interface IProps { ...@@ -31,6 +31,7 @@ interface IProps {
cRef?: any; cRef?: any;
excludeControls?: string[]; // 不需要显示的控件 excludeControls?: string[]; // 不需要显示的控件
onChange?: Function onChange?: Function
extendControls?: any[];
} }
const EditorDemo: React.FC<IProps> = ({ const EditorDemo: React.FC<IProps> = ({
...@@ -103,6 +104,7 @@ const EditorDemo: React.FC<IProps> = ({ ...@@ -103,6 +104,7 @@ const EditorDemo: React.FC<IProps> = ({
<UploadQIniu percentCbk={percentCbk} successCbk={successCbk} language={language} /> <UploadQIniu percentCbk={percentCbk} successCbk={successCbk} language={language} />
), ),
}, },
...(others.extendControls || [])
]; ];
const insertText = (text: string) => { const insertText = (text: string) => {
setEditorState(ContentUtils.insertText(editorState, text)); setEditorState(ContentUtils.insertText(editorState, text));
......
...@@ -6,7 +6,7 @@ interface IProps { ...@@ -6,7 +6,7 @@ interface IProps {
cRef?: any; cRef?: any;
language?: 'zh' | 'en'; language?: 'zh' | 'en';
} }
const Preview:React.FC<IProps> = ({ htmlStr, cRef, language = 'zh' }) => { const Preview: React.FC<IProps> = ({ htmlStr, cRef, language = 'zh' }) => {
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
useImperativeHandle(cRef, () => { useImperativeHandle(cRef, () => {
...@@ -32,7 +32,7 @@ const Preview:React.FC<IProps> = ({ htmlStr, cRef, language = 'zh' }) => { ...@@ -32,7 +32,7 @@ const Preview:React.FC<IProps> = ({ htmlStr, cRef, language = 'zh' }) => {
footer={null} footer={null}
width={800} width={800}
> >
<div dangerouslySetInnerHTML={{ __html: htmlStr }} /> <div dangerouslySetInnerHTML={{ __html: htmlStr }} style={{ minHeight: '80vh', overflow: 'auto' }} />
</Modal> </Modal>
); );
}; };
......
...@@ -14,6 +14,8 @@ const CustomInput = (props: InputProps) => { ...@@ -14,6 +14,8 @@ const CustomInput = (props: InputProps) => {
return props.onChange(newVal) return props.onChange(newVal)
} }
} }
return <DatePicker {...props} value={value} onChange={onChange} /> return <DatePicker
{...props}
value={value} onChange={onChange} />
} }
export default CustomInput; export default CustomInput;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment