fix: module info鼠标悬浮框,没有数据时不展示悬浮框,增加报错提示

This commit is contained in:
@changcode
2021-10-29 09:52:17 +08:00
parent ab87e01394
commit 7d1bef73a1

View File

@@ -56,24 +56,18 @@ export default {
data () {
return {
loading: true,
moduleInfo: {
project: { name: '' },
name: '',
type: 'http',
remark: '',
port: '',
path: '',
seq: '',
assetNum: '',
endpointNum: ''
}
moduleInfo: {}
}
},
mounted () {
this.loading = true
this.$get('/monitor/module/' + this.moduleId).then(res => {
this.loading = false
this.moduleInfo = res.data
if (res.code === 200) {
this.moduleInfo = res.data
} else {
this.$message.error(res.msg)
}
})
},
methods: {},