Merge branch 'dev-3.7' of git.mesalab.cn:nezha/nezha-fronted into dev-3.7

This commit is contained in:
zyh
2023-08-07 13:57:50 +08:00
3 changed files with 15 additions and 1 deletions

View File

@@ -267,6 +267,9 @@ export default {
this.fileDirectoryShow = show
})
},
clearTerminal () {
this.term.clear()
},
enterStr (message) {
if (this.terminalSocket && this.terminal.isLogin) {
this.term.send(message)

View File

@@ -150,7 +150,7 @@
<!-- <i class="nz-icon nz-icon-delete" v-if="!item.isDir" @click="delFile(item)"></i>-->
</div>
</div>
<div class="file-item">
<div class="file-item" v-if="overNum">
{{$t('fileDirectory.overNum', {num: overNum})}}
</div>
</div>

View File

@@ -45,6 +45,11 @@
<i class="nz-icon nz-icon-SFTP"></i>
{{$t('terminal.sftp')}}
</div>
<!-- <div @click="clearTerminal(item, index)" class="webshell-box-item" v-if="item.terminal.isLogin && item.terminal.terminalType == '1'">-->
<!-- <i class="nz-icon nz-icon-Clear"></i>-->
<!--&lt;!&ndash; {{$t('terminal.sftp')}}&ndash;&gt;-->
<!-- Clear Screen CLS-->
<!-- </div>-->
</div>
<div class="webshell-box-item webshell-box-bottom" @click="closeShell(item,index)">
<div >
@@ -785,6 +790,12 @@ export default {
this.$refs['popover' + index][0].doClose()
}
},
clearTerminal (item, index) {
this.$refs['console' + index][0].clearTerminal(true)
if (this.$refs['popover' + index] && this.$refs['popover' + index][0]) {
this.$refs['popover' + index][0].doClose()
}
},
closeShell (item, index) {
this.removeTab(item.name)
if (this.$refs['popover' + index] && this.$refs['popover' + index][0]) {