<template>
  <section>
    <h2 class="dialog-title">提示</h2>
    <p class="dialog-tip">{{ tip }}</p>
    <button class="dialog_btn_confirm" @click="checkForm">确定</button>
    <button class="dialog_btn_cancel" @click="closeDialog">取消</button>
  </section>
</template>

<script>
export default {
  props: ["tip"],
  methods: {
    checkForm() {
      this.$emit("confirm");
    },
    closeDialog() {
      this.$emit("close");
    },
  },
};
</script>
<style lang="less" scoped>
section {
  width: 535px;
  height: 285px;
  background: #ffffff;
  box-shadow: 0px 0px 20px 0px rgba(61, 118, 249, 0.18);
}
.dialog-title {
  padding-left: 44px;
  padding-top: 34px;
  color: #000;
  font-size: 22px;
}
.dialog-tip {
  text-align: center;
  padding-top: 48px;
  font-size: 22px;
  padding-bottom: 54px;
}
.dialog_btn_confirm {
  float: right;
  width: 120px;
  height: 40px;
  color: #fff;
  font-size: 14px;
  margin-right: 50px;
  outline: none;
  background: #3f79fe;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.dialog_btn_cancel {
  float: right;
  margin-right: 18px; /* 28 - 10 */
  border: none;
  width: 48px; /* 28 + 增大20 */
  height: 40px;
  outline: none;
  background: #fff;
  color: #5c6476;
  font-size: 14px;
  cursor: pointer;
}
</style>