+
-
+
-
+
editable.name === pathname)
const tab = this.editableTabs[currentIndex]
@@ -590,7 +591,7 @@
that.dialogWidth = dialogWidth + moveX
that.editorWidth = editorWidth + moveX
that.editorHieght = editorHieght + (endY - startY)
- that.loadConterSize()
+ that.loadContentSize()
}
}
// 鼠标松开事件
@@ -714,7 +715,7 @@
fileName: row.name,
username: this.$store.state.user.name
}
- api.previewTextByPath(params).then((res)=>{
+ api.previewTextByPath(params).then(()=>{
this.loading.close()
// 添加一个tab
let tab = {
@@ -797,11 +798,7 @@
this.loadEditorSize()
},
checkMobile() {
- if (!this.$pc) {
- this.moblie = true
- } else {
- this.moblie = false
- }
+ this.moblie = !this.$pc;
},
checkReadOnly(fileUserId){
if(this.$store.state.user.token && this.$store.state.user.userId === fileUserId){
@@ -827,12 +824,12 @@
this.editorWidth = this.dialogWidth - this.contentsWidth
}
this.editorHieght = document.body.clientHeight * this.dialogWidthPercent - 76
- this.loadConterSize()
+ this.loadContentSize()
},
- loadConterSize(){
- let conter = document.querySelector('.editor-resize .editor-resize-conter');
- if(conter){
- conter.style.marginTop = ((this.editorHieght+26)/2 - conter.clientHeight/2) + 'px'
+ loadContentSize(){
+ let content = document.querySelector('.editor-resize .editor-resize-conter');
+ if(content){
+ content.style.marginTop = ((this.editorHieght+26)/2 - content.clientHeight/2) + 'px'
}
},
handleClose(done) {
@@ -866,6 +863,7 @@
}
},
closeDialog() {
+ this.previewMode = false
this.textPreviewVisible = false
this.$emit('update:status', this.textPreviewVisible)
this.isSaveDialogVisible = false
@@ -1037,8 +1035,10 @@
this.clickTab()
},
clickTab() {
- // this.editorWidth += 0.001
- // this.editorHieght += 0.001
+ this.editorWidth += 0.001
+ this.editorHieght += 0.001
+ // 加载历史版本
+ this.$refs.historyPopover.loadHistoryPathList(this.editableTabsValue)
},
removeTab(targetName) {
let tabs = this.editableTabs;
@@ -1534,13 +1534,20 @@
.nwse-resize {
z-index: 99999;
position: fixed;
- width: 15px;
- background: #00000000;
+ width: 12px;
+ margin-left: 3px;
+ background: #f0f0f0;
height: 15px;
margin-top: -15px;
float: right;
cursor: nwse-resize;
}
+ .nwse-resize::before {
+ content: "⠿";
+ display: inline-block;
+ padding-right: 5px;
+ vertical-align: middle;
+ }
.el-button--small.is-circle {
padding: 9px 9px;
}