mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-12 17:08:11 +00:00
perf: 移动端只读文件
This commit is contained in:
parent
7c287f6ae5
commit
dbb1033911
@ -336,7 +336,7 @@
|
||||
class="page-file-drawer"
|
||||
:beforeClose="fileBeforeClose"
|
||||
:mask-closable="false">
|
||||
<FilePreview v-if="fileInfo.permission === 0" :file="fileInfo"/>
|
||||
<FilePreview v-if="isPreview" :file="fileInfo"/>
|
||||
<FileContent v-else ref="fileContent" v-model="fileShow" :file="fileInfo"/>
|
||||
</DrawerOverlay>
|
||||
|
||||
@ -586,6 +586,10 @@ export default {
|
||||
return array;
|
||||
},
|
||||
|
||||
isPreview() {
|
||||
return this.windowSmall || this.fileInfo.permission === 0
|
||||
},
|
||||
|
||||
isParentShare() {
|
||||
const {navigator} = this;
|
||||
return !!navigator.find(({share}) => share);
|
||||
|
||||
@ -43,7 +43,7 @@ export default {
|
||||
return this.$route.query ? $A.runNum(this.$route.query.history_id) : 0;
|
||||
},
|
||||
isPreview() {
|
||||
return this.code || this.historyId > 0 || (this.fileInfo && this.fileInfo.permission === 0)
|
||||
return this.windowSmall || this.code || this.historyId > 0 || (this.fileInfo && this.fileInfo.permission === 0)
|
||||
},
|
||||
pageName() {
|
||||
let name = this.fileInfo ? this.fileInfo.name : '';
|
||||
|
||||
@ -163,6 +163,14 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.teditor-wrapper {
|
||||
.tox-editor-header {
|
||||
.tox-toolbar--scrolling {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mdeditor-box {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
@ -301,6 +309,21 @@
|
||||
}
|
||||
.content-body {
|
||||
overflow: hidden;
|
||||
.teditor-wrapper {
|
||||
.tox-editor-header,
|
||||
.tox-statusbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.teditor-loadedstyle {
|
||||
.tox-menubar,
|
||||
.tox-toolbar-overlord {
|
||||
padding: 0;
|
||||
}
|
||||
.tox-sidebar-wrap {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.markdown-preview-warp {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
@ -323,11 +346,6 @@
|
||||
.content-body {
|
||||
min-width: 768px;
|
||||
overflow-x: auto;
|
||||
.tox {
|
||||
.tox-toolbar--scrolling {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
.teditor-loadedstyle {
|
||||
.tox-menubar,
|
||||
.tox-toolbar-overlord {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user