fix: 统一测试存储时的命令提醒

This commit is contained in:
Orange 2020-12-23 15:53:44 +08:00
parent 1ed432b1e2
commit cbc67a5a4c
2 changed files with 6 additions and 14 deletions

View File

@ -73,15 +73,11 @@ export default {
type: 'primary', type: 'primary',
callback: function({ row, col, cellValue, reload }) { callback: function({ row, col, cellValue, reload }) {
TestCommandStorage(cellValue).then(data => { TestCommandStorage(cellValue).then(data => {
let success = 'success'
if (!data.is_valid) { if (!data.is_valid) {
success = 'error' this.$message.error(data.msg)
} else {
this.$message.success(data.msg)
} }
this.$notify({
message: data.msg,
type: success,
duration: 4500
})
}) })
} }
} }

View File

@ -94,15 +94,11 @@ export default {
type: 'primary', type: 'primary',
callback: function({ row, col, cellValue, reload }) { callback: function({ row, col, cellValue, reload }) {
TestReplayStorage(cellValue).then(data => { TestReplayStorage(cellValue).then(data => {
let success = 'success'
if (!data.is_valid) { if (!data.is_valid) {
success = 'error' this.$message.error(data.msg)
} else {
this.$message.success(data.msg)
} }
this.$notify({
message: data.msg,
type: success,
duration: 4500
})
}) })
} }
} }