style: 优化操作失败的提示
This commit is contained in:
parent
ac421e1161
commit
ff9a439975
@ -916,6 +916,8 @@ export default {
|
||||
}
|
||||
|
||||
Bus.$on('msg/file/change', (msg) => this.onmessage(msg))
|
||||
|
||||
Bus.$on('msg/file/operation/fault', (msg) => this.onmessageFault(msg))
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('keydown', this.keydown, false)
|
||||
@ -991,6 +993,12 @@ export default {
|
||||
this.selectPin = false
|
||||
}
|
||||
},
|
||||
onmessageFault(msg) {
|
||||
if ('fault' === msg) {
|
||||
this.getFileList()
|
||||
return
|
||||
}
|
||||
},
|
||||
onmessage(msg) {
|
||||
let fileDoc = JSON.parse(msg.body)
|
||||
const url = msg.headers.url
|
||||
|
||||
@ -56,6 +56,7 @@ function connect(username,token){
|
||||
type: 'success',
|
||||
});
|
||||
} else {
|
||||
Bus.$emit('msg/file/operation/fault', 'fault')
|
||||
Bus.$notify({
|
||||
title: `${doc.operation}失败`,
|
||||
dangerouslyUseHTMLString: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user