mirror of https://github.com/fantasticit/think.git
Merge pull request #195 from fantasticit/fix/0915
commit
d967fc72f7
|
@ -62,7 +62,7 @@ export const DocumentEditor: React.FC<IProps> = ({ documentId }) => {
|
|||
{document && (
|
||||
<DocumentActions organizationId={document.organizationId} wikiId={document.wikiId} documentId={documentId} />
|
||||
)}
|
||||
<DocumentVersion documentId={documentId} onSelect={triggerUseDocumentVersion} />
|
||||
<DocumentVersion key={'edit'} documentId={documentId} onSelect={triggerUseDocumentVersion} />
|
||||
</Space>
|
||||
),
|
||||
[documentId, document, authority]
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
main {
|
||||
padding: 24px;
|
||||
overflow: auto;
|
||||
background-color: var(--semi-color-bg-0);
|
||||
flex: 1;
|
||||
|
||||
&.isMobile {
|
||||
|
|
|
@ -126,8 +126,8 @@ export const DocumentVersion: React.FC<Partial<IProps>> = ({ documentId, onSelec
|
|||
</Select>
|
||||
<div style={{ paddingLeft: '8px' }}>对比</div>
|
||||
<Space style={{ marginLeft: 12 }}>
|
||||
<Tag style={{ backgroundColor: '#e9ffe9' }}>增加的内容</Tag>
|
||||
<Tag style={{ backgroundColor: '#ffeaea' }}>删除的内容</Tag>
|
||||
<Tag style={{ backgroundColor: '#e9ffe9', color: '#333' }}>增加的内容</Tag>
|
||||
<Tag style={{ backgroundColor: '#ffeaea', color: '#333' }}>删除的内容</Tag>
|
||||
</Space>
|
||||
</div>
|
||||
)}
|
||||
|
@ -156,8 +156,8 @@ export const DocumentVersion: React.FC<Partial<IProps>> = ({ documentId, onSelec
|
|||
empty={!loading && !data.length}
|
||||
normalContent={() => (
|
||||
<div className={styles.contentWrap}>
|
||||
<main className={cls('container', isMobile && styles.isMobile)}>
|
||||
<div>
|
||||
<main className={cls(isMobile && styles.isMobile)}>
|
||||
<div className="container">
|
||||
{diffVersion ? (
|
||||
<div id="diff-visual" className="ProseMirror"></div>
|
||||
) : (
|
||||
|
|
|
@ -26,7 +26,9 @@ export const useEditor = (options: Partial<EditorOptions> = {}, deps: Dependency
|
|||
options.editorProps = options.editorProps || {};
|
||||
|
||||
if (options.editable) {
|
||||
options.editorProps.attributes = options.editorProps.attributes || {};
|
||||
options.editorProps.attributes = options.editorProps.attributes || {
|
||||
spellcheck: 'false',
|
||||
};
|
||||
// @ts-ignore
|
||||
options.editorProps.attributes.class = options.editorProps.attributes.class || '';
|
||||
// @ts-ignore
|
||||
|
@ -41,7 +43,7 @@ export const useEditor = (options: Partial<EditorOptions> = {}, deps: Dependency
|
|||
instance.on(
|
||||
'update',
|
||||
throttle(() => {
|
||||
instance.chain().focus().scrollIntoView().run();
|
||||
// instance.chain().focus().scrollIntoView().run();
|
||||
}, 200)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue