<template>
  <el-dialog title="提示" width="480px" :visible="comLockCostTipDialog" :close-on-click-modal="false" class="lock-cost-tip-container"
    @close="dialogClose" :destroy-on-close="true">
    <div class="lock-cost-tip-content">{{tipContent}}</div>
    <!-- 底部按钮 -->
    <div class="lock-cost-tip-footer">
      <div class="cancel-btn" @click="cancel">取消</div>
      <div class="ok-btn" @click="ok">确定锁定</div>
    </div>
  </el-dialog>
</template>
<script>
export default {
  name: "lockCostTip",
  model: {
    prop: "lockCostTipDialog",
    event: "update:lockCostTipDialog"
  },
  props: {
    lockCostTipDialog: {
      type: Boolean,
      default: false
    },
    tipContent: {
      type: String,
      default: ""
    }
  },
  watch: {
    lockCostTipDialog: {
      handler(newValue) {
        this.comLockCostTipDialog = newValue;
      }
    }
  },
  data() {
    return {
      comLockCostTipDialog: this.lockCostTipDialog
    };
  },
  //可访问data属性
  created() {

  },
  //计算集
  computed: {

  },
  //方法集
  methods: {
    dialogClose() {
      this.$emit("update:lockCostTipDialog", false);
    },
    cancel() {
      this.comLockCostTipDialog = false;
    },
    ok() {
      this.$emit("ok");
    }
  },
}
</script>
<style lang="scss" scoped>
.lock-cost-tip-container {
  ::v-deep .el-dialog {
    min-height: 240px;
    margin-top: 0px !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4px;

    .el-dialog__header {
      padding: 0px 20px;
      height: 56px;
      box-sizing: border-box;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid #eeeeee;

      .el-dialog__title {
        color: #232323;
        font-size: 16px;
        font-weight: bold;
      }

      .el-dialog__headerbtn {
        position: static;
        width: 16px;
        height: 16px;
      }
    }

    .el-dialog__body {
      padding: 0px;

      .lock-cost-tip-content {
        min-height: 120px;
        padding: 24px 20px;
        box-sizing: border-box;
        color: rgba(35, 35, 35, 0.8);
        line-height: 20px;
        font-size: 14px;
        font-weight: 350;
      }

      .lock-cost-tip-footer {
        height: 64px;
        width: 100%;
        border-top: 1px solid #eeeeee;
        padding: 0px 20px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: flex-end;

        .cancel-btn,
        .ok-btn {
          height: 32px;
          padding: 0px 16px;
          border-radius: 4px;
          box-sizing: border-box;
          font-size: 14px;
          font-weight: 350;
          display: flex;
          align-items: center;
          justify-content: center;
          cursor: pointer;
        }

        .cancel-btn {
          margin-right: 12px;
          color: rgba(35, 35, 35, 0.8);
          border: 1px solid #dcdfe6;
        }

        .ok-btn {
          background: #0081ff;
          color: #fff;
        }
      }
    }
  }
}
</style>
