popUpComponent.vue 1.27 KB
<template>
  <view>
    <u-popup :show="show" mode="bottom" @open="open" :customStyle="{width:'100vw'}" round="6" safeAreaInsetBottom>
      <view class="popCss">
        <view class="padding-top text-lg text-center">
          {{title}}
        </view>
        <view class="padding">
          <u-textarea v-model="textarea" placeholder="请简单描述原因"></u-textarea>
        </view>
        <view class="flex justify-between">
          <view class="w50" @click="close">
            <u-button>取消</u-button>
          </view>
          <view class="w50" @click="confirm">
            <u-button :customStyle="{color:'#CF000D'}">确定</u-button>
          </view>
        </view>
      </view>
    </u-popup>
  </view>
</template>

<script>
  export default {
    name: "popUpComponent",
    props: {
      title: {
        type: String,
        default: "同意"
      }
    },
    data() {
      return {
        textarea:"",
        show: false,
      };
    },
    methods: {
      open() {
        this.show = true;
      },
      close() {
        this.show = false;
      },
      confirm(){
        console.log(this.textarea);
        this.show = false;
        this.textarea = "";
      }
    }
  }
</script>

<style lang="scss">
  .popCss {
    // text-align: center;
  }
</style>