commit
fda29df1c1
@ -53,7 +53,7 @@
|
|||||||
>
|
>
|
||||||
</history-popover>
|
</history-popover>
|
||||||
|
|
||||||
<el-button v-if="isShowUpdateBtn" @click="saveAll(false)" :class="lightTheme?'':'dark-button'" size="small" :loading="updating">保存所有</el-button>
|
<el-button v-if="isShowUpdateBtn" @click="saveAll(false)" :class="lightTheme?'':'dark-button'" size="small" :loading="updating">{{saveTitle}}</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="editableTabsValue.endsWith('.md') && editableTabs.length > 0"
|
v-if="editableTabsValue.endsWith('.md') && editableTabs.length > 0"
|
||||||
@ -205,6 +205,7 @@
|
|||||||
moblie: false,
|
moblie: false,
|
||||||
panelReadOnly: true,
|
panelReadOnly: true,
|
||||||
mountFileId: undefined,
|
mountFileId: undefined,
|
||||||
|
saveTitle: '',
|
||||||
options: {
|
options: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
contextmenu: true,
|
contextmenu: true,
|
||||||
@ -894,11 +895,24 @@
|
|||||||
}else{
|
}else{
|
||||||
if(editableTabValue.copyTitle === editableTabValue.title){
|
if(editableTabValue.copyTitle === editableTabValue.title){
|
||||||
editableTabValue.title += '*'
|
editableTabValue.title += '*'
|
||||||
editableTabValue.status = 'Modifying'
|
}
|
||||||
this.isShowUpdateBtn = true
|
editableTabValue.status = 'Modifying'
|
||||||
editableTabValue.change = value
|
this.isShowUpdateBtn = true
|
||||||
|
editableTabValue.change = value
|
||||||
|
}
|
||||||
|
this.updateSaveTitle()
|
||||||
|
},
|
||||||
|
updateSaveTitle(){
|
||||||
|
// 判断this.editableTabs中的status是否有Modifying的数量
|
||||||
|
const modifyingTags = this.editableTabs.filter(editable => editable.status === 'Modifying')
|
||||||
|
if (modifyingTags) {
|
||||||
|
let modifyingLength = modifyingTags.length
|
||||||
|
if(modifyingLength > 1) {
|
||||||
|
this.saveTitle = '保存全部'
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.saveTitle = '保存'
|
||||||
},
|
},
|
||||||
saveAll(isClose){
|
saveAll(isClose){
|
||||||
this.editableTabs.forEach((tab,index) => {
|
this.editableTabs.forEach((tab,index) => {
|
||||||
@ -957,6 +971,7 @@
|
|||||||
this.isShowUpdateBtn = false
|
this.isShowUpdateBtn = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.updateSaveTitle()
|
||||||
if(!this.modifyMsg){
|
if(!this.modifyMsg){
|
||||||
this.$refs.historyPopover.loadHistoryPathList(this.editableTabsValue)
|
this.$refs.historyPopover.loadHistoryPathList(this.editableTabsValue)
|
||||||
this.modifyMsg = this.$message({
|
this.modifyMsg = this.$message({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user