uniapp 弹窗固定高度



  this.$nextTick(() => {
            this.$refs.yunpop.open();
          });
          
     <yunpop
        ref="yunpop"
        :mydata="mydata"
        @GetGoodsNotice="GetGoodsNotice"
      ></yunpop>
      

<template>
  <view class="myoverlay" @click="close" v-if="show">
    <view class="mycontent">
      <section class="posi">
        <div class="mybot" @click="close">
          <block v-if="mydata.arg_status === 0 ? false : true">
            <u-button
              type="primary"
              :plain="true"
              text="关闭"
              @click="close"
            ></u-button>
            <view class="" style="width: 10px"> </view>
          </block>

          <u-button
            @click="confirm"
            type="primary"
            :text="mydata.arg_status === 0 ? '关闭' : '同意'"
          ></u-button>
        </div>
      </section>
      <view class="mycontent2" v-html="mydata.content"> </view>
    </view>
  </view>
</template>

<script>
export default {
  props: ["mydata"],
  data() {
    return {
      show: false,
    };
  },
  methods: {
    open() {
      console.log(1111111, 11111);

      this.show = true;
    },
    close() {
      console.log(1111111, 11111);

      this.show = false;
    },

    confirm() {
      if (this.mydata.arg_status === 0) {
        this.close();
        return;
      }
      this.$post(
        "/Sale/ArgGoodsNotice",
        {
          id: this.mydata.id,
          status: "0", //0=同意;1=不同意
        },

        {
          isLoading: false,
        }
      ).then((res) => {
        this.close();
        this.$emit("GetGoodsNotice");
      });
    },
  },
};
</script>
<style lang="less" scoped>
.myoverlay {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
}

.mycontent {
  position: relative;
  width: 610/2px;
  border-radius: 10px;

  .mycontent2 {
    padding: 20px;
    position: relative;
    width: 100%;
    height: 500px;

    background-color: white;
    overflow-y: auto;
    font-size: 28px/2;
    color: #666666;
    border-radius: 10px;
    line-height: 1.7;
    padding-bottom: 80px;
  }
}
.posi {
  z-index: 999;
  position: absolute;
  width: 100%;
  bottom: 0;
  left: 0;
  background-color: #fff;
  border-top: 1px solid rgb(214, 215, 217);
}
.mybot {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
}
</style>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值