<template>
  <el-dialog title="错误信息" :visible.sync="visible" append-to-body>
    <div class="ied">
      <ul>
        <li v-for="(item,index) in data" :key="index">{{item}}</li>
      </ul>
    </div>
    <template #footer>
      <el-button @click="close">关闭</el-button>
    </template>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      data: [],
      visible: false,
    };
  },
  methods: {
    show(data) {
      this.data = data;
      this.visible = true;
      this.$nextTick(() => {
        this.$refs.table && this.$refs.table.doLayout();
      });
    },
    close() {
      this.data = [];
      this.visible = false;
    },
  },
};
</script>

<style>
.ied ul li {
  list-style: none;
  padding-left: 10px;
}
</style>