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/change', (msg) => this.onmessage(msg))
|
||||||
|
|
||||||
|
Bus.$on('msg/file/operation/fault', (msg) => this.onmessageFault(msg))
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener('keydown', this.keydown, false)
|
window.removeEventListener('keydown', this.keydown, false)
|
||||||
@ -991,6 +993,12 @@ export default {
|
|||||||
this.selectPin = false
|
this.selectPin = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onmessageFault(msg) {
|
||||||
|
if ('fault' === msg) {
|
||||||
|
this.getFileList()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
},
|
||||||
onmessage(msg) {
|
onmessage(msg) {
|
||||||
let fileDoc = JSON.parse(msg.body)
|
let fileDoc = JSON.parse(msg.body)
|
||||||
const url = msg.headers.url
|
const url = msg.headers.url
|
||||||
|
|||||||
@ -56,6 +56,7 @@ function connect(username,token){
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Bus.$emit('msg/file/operation/fault', 'fault')
|
||||||
Bus.$notify({
|
Bus.$notify({
|
||||||
title: `${doc.operation}失败`,
|
title: `${doc.operation}失败`,
|
||||||
dangerouslyUseHTMLString: true,
|
dangerouslyUseHTMLString: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user