ModleView.vue
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<template>
<div class="error-container">
<el-dialog
title="错误信息"
:visible.sync="dialogVisible"
@open="dialogOpenEvent"
@close="dialogCloseEvent"
>
<el-table :data="errorMessageData">
<el-table-column
type="index"
width="50"
align="center"
></el-table-column>
<el-table-column label="错误信息" prop="errorMessage" width="200">
<template slot-scope="scope">
<div v-for="(m, key) in scope.row.errorMessage" :key="key">
{{ m }}
</div>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
dialogVisible: false,
errorMessageData: [],
};
},
computed: {},
created() {},
mounted() {},
methods: {
dialogOpenEvent(data) {
if (data && data.length) {
this.errorMessageData = data;
console.log(data);
}
this.dialogVisible = true;
this.$emit("open");
},
dialogCloseEvent() {
this.dialogVisible = false;
this.$emit("close");
},
},
};
</script>
<style lang='scss' scoped>
</style>