<template>
  <div class="dialog">
    <el-dialog
      :title="dialogObj.title"
      :show-close=false
      :visible.sync="dialogObj.visible"
      :close-on-click-modal="false"
      width="600px"
      center>
      <p style="text-align: center;">{{dialogObj.message}}</p>
      <span slot="footer" class="dialog-footer">
        <el-button @click="confirm">确 定</el-button>
        <el-button type="primary" @click="hide">取 消</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    dialogObj: {
      type: Object,
      default: () => {
        return null;
      }
    }
  },
  data() {
    return {
    }
  },
  created() {},
  methods: {
    confirm() {
      this.$emit('confirm');
    },
    hide() {
      this.$emit('hide');
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
