@@ -79,9 +95,21 @@
:name="item.name"
>
+
+
+ />
@@ -119,11 +147,12 @@
import FancyTree from"@/components/FancyTree"
import MessageDialog from "@/components/message/MessageDialog"
import FilePathNav from '@/components/Breadcrumb/FilePathNav'
+ import Icon from '@/components/Icon/Icon.vue'
export default {
name: "SimTextPreview",
components: {
- MonacoEditor,FileTree,FancyTree,MessageDialog,FilePathNav
+ Icon,MonacoEditor,FileTree,FancyTree,MessageDialog,FilePathNav
},
props: {
file: {
@@ -149,7 +178,7 @@
},
data(){
return{
- lightTheme: false,
+ lightTheme: true,
contentsHide: false,
defalutLanguage: 'redis',
lineWrapping: false,
@@ -191,6 +220,10 @@
editableTabsValue: '1',
editableTabs: [],
filePathNav: '',
+ toolbars: {
+ readmodel: true, // 沉浸式阅读
+ navigation: true, // 导航目录
+ }
}
},
mounted() {
@@ -279,7 +312,6 @@
content: res.data.contentText
})
this.editableTabsValue = pathname
-
// 界面的渲染后的初始化工作
this.$nextTick(()=>{
this.onDialogDblClick()
@@ -295,6 +327,11 @@
if(visible && this.loading.closed){
this.textPreviewVisible = true
}
+ },
+ editableTabsValue(value){
+ if(value.endsWith('.md')){
+ this.previewMode = false
+ }
}
},
methods:{
@@ -719,7 +756,7 @@
this.removeIndex = removeIndex
this.isTabSaveDialogVisible = true
}
- }
+ },
}
}
@@ -763,6 +800,23 @@
}
}
+ >>> .v-note-show.single-show {
+ ::-webkit-scrollbar {
+ width: 10px!important;
+ height: 10px!important;
+ }
+ ::-webkit-scrollbar-thumb {
+ border: unset!important;
+ background-color: #c1c1c1 !important;
+ border-radius: unset!important;
+ }
+ ::-webkit-scrollbar-track-piece {
+ border: unset!important;
+ background-color: #ececec !important;
+ border-radius: unset!important;
+ }
+ }
+
/deep/.el-dialog {
/*width: 1035px;*/
margin: 0 !important;
@@ -782,16 +836,6 @@
border: 1px solid #3e3e3e;
color: #ffffff;
}
- /*.el-button:focus{*/
- /*background: #FFF;*/
- /*border: 1px solid #DCDFE6;*/
- /*color: #606266;*/
- /*}*/
- /*.dark-button:focus{*/
- /*background: #3e3e3e;*/
- /*border: 1px solid #3e3e3e;*/
- /*color: #ffffff;*/
- /*}*/
.light-button:hover {
background: #DCDFE6;
}
@@ -1165,7 +1209,6 @@
cursor: nwse-resize;
}
}
-