<template>
  <el-dialog v-drag-dialog
    :title="title"
    :visible.sync="visible"
    :modal-append-to-body="false"
    :top="'10%'"
    :modal="true"
    :width="'400px'">
    <div class="el-message-box__container">
        <div class="el-message-box__status el-icon-warning"></div>
        <div class="el-message-box__message"><p v-html="content"></p></div>
    </div>
    <span slot="footer" class="dialog-footer">
        <el-button @click="no()">否</el-button>
        <el-button type="primary" @click="yes()">是</el-button>
    </span>
    </el-dialog>
</template>
<script>
export default {
    data() {
      return {
        title: "",
        content:"",
        visible: false
      };
    },
    methods: {
        yes() {
            this.$emit("confirm", true);
            this.visible = false;
        },
        no() {
            this.$emit("confirm", false);
            this.visible = false;
        }
    }
  };
</script>

<style>

</style>