<template>
  <view>
    <u-popup
      v-model="flag"
      mode="bottom"
      border-radius="30"
      :mask-close-able="maskClose"
      :closeable="closeable"
    >
      <view class="popup-content">
        <slot></slot>
      </view>
    </u-popup>
  </view>
</template>
<script>
export default {
  name: "spDialog",
  props: {
    // 显示
    value: {
      type: Boolean,
      default: false,
    },
    // 是否显示关闭按钮
    showClose: {
      type: Boolean,
      default: false,
    },
    maskClose: {
      type: Boolean,
      default: false,
    },
    closeable: {
      type: Boolean,
      default: false,
    },
  },
  model: {
    prop: "value",
    event: "changevalue",
  },
  watch: {
    value(v) {
      this.flag = v;
    },
  },
  data() {
    return {
      flag: this.value,
    };
  },
};
</script>
<style lang="scss" scoped>
.popup-content {
  position: relative;
  background: #fff;
  box-shadow: 0px, -2px rgba(0, 0, 0, 0.25);
  padding: 52rpx;
  position: relative;
  min-height: 780rpx;
}
</style>