<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" v-if="dialogObj.confirmMsg">{{dialogObj.confirmMsg}}</el-button>
        <el-button type="primary" @click="hide" v-if="dialogObj.hideMsg">{{dialogObj.hideMsg}}</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>
