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