<template>
  <view>
    <u-popup :show="show" @close="$emit('close')" mode="center" round="10">
      <view class="content">
        <text>{{ title }}</text>

        <u--input
          v-if="title == '是否确认退款'"
          placeholder="请输入退款金额"
          border="surround"
          type="number"
          v-model="value"
        ></u--input>
        <view class="btn-list">
          <button class="btn-1" @click="$emit('close')">取消</button>
          <button class="btn-2" @click="$emit('refund', 1, value)">确认</button>
        </view>
      </view>
    </u-popup>
  </view>
</template>
<script>
export default {
  props: {
    show: {
      typeof: Boolean,
      default: false,
    },
    title: {
      typeof: String,
      default: "",
    },
  },
  data() {
    return { value: "" };
  },
};
</script>
<style lang="scss" scoped>
.content {
  width: 494rpx;
  padding: 56rpx 0;
  text-align: center;
  .btn-list {
    display: flex;
    margin-top: 52rpx;
    justify-content: space-around;
    .btn-1 {
      margin: 0;
      padding: 0;
      font-size: 32rpx;
      color: #f83224;
      border-radius: 38rpx;
      border: 2rpx solid #f83224;
      background-color: #fff;
      padding: 0 60rpx;
    }
    .btn-2 {
      margin: 0;
      padding: 0;
      font-size: 32rpx;
      color: #fff;
      border-radius: 38rpx;
      border: 2rpx solid #f83224;
      background-color: #f83224;
      padding: 0 60rpx;
    }
  }
}
</style>
