feat: add quick edit button

This commit is contained in:
fantasticit 2022-04-24 20:55:40 +08:00
parent 43aea84f7f
commit 3fe45ee80f
1 changed files with 20 additions and 0 deletions

View File

@ -100,6 +100,26 @@ export const DocumentReader: React.FC<IProps> = ({ documentId }) => {
<div className={styles.commentWrap}> <div className={styles.commentWrap}>
<CommentEditor documentId={document.id} /> <CommentEditor documentId={document.id} />
</div> </div>
{authority && authority.editable && (
<BackTop
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
height: 30,
width: 30,
borderRadius: '100%',
backgroundColor: '#0077fa',
color: '#fff',
bottom: 100,
transform: `translateY(-50px);`,
}}
onClick={gotoEdit}
target={() => window.document.querySelector('.Pane2')}
>
<IconEdit />
</BackTop>
)}
<BackTop target={() => window.document.querySelector('.Pane2')} /> <BackTop target={() => window.document.querySelector('.Pane2')} />
</> </>
); );