style: 优化操作失败的提示

This commit is contained in:
jmal 2023-04-14 23:46:50 +08:00
parent ac421e1161
commit ff9a439975
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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,