Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

popup组件点击关闭按钮或遮罩层无法关闭弹窗 #406

Open
1 task done
RexHarris opened this issue Jul 8, 2021 · 3 comments
Open
1 task done

popup组件点击关闭按钮或遮罩层无法关闭弹窗 #406

RexHarris opened this issue Jul 8, 2021 · 3 comments

Comments

@RexHarris
Copy link

RexHarris commented Jul 8, 2021

  • 我已经搜索过相关 issues ,确定这个问题没有人提过。

重现链接

重现步骤

<template>
  <view>
    <row label="基本信息"
      :layout="{
        labelCol: { span: 4 },
        wrapperCol: { span: 8 },
      }"
    >
      <icon type="info" @click="onShowBaseInfo"/>
      <wux-popup :visible="showBaseInfo" closable :close="onCloseBaseInfo">
        <scroll-view class="scrollContent" scroll-y="true">
          <view v-for="(note, index) in baseInfoNotes" 
            :key="index" 
            class="itemInScrollContent"
          >{{note}}</view>
        </scroll-view>
      </wux-popup>
    </row>
   
  </view>  
</template>

<script>
import { baseInfoNotes } from '../notes';
export default {
  data() {
    return { baseInfoNotes, showBaseInfo: false }
  },
  methods: {
    onShowBaseInfo() {
      this.showBaseInfo = true;
    },
    onCloseBaseInfo() {
      this.showBaseInfo = false;
    }
  }
}
</script>

<style>
.scrollContent {
  background-color: #ffffff;
}
.itemInScrollContent {
  margin: 50rpx 30rpx;
}
input {
  width: 70rpx;
}
</style>

期望的结果是什么?

点击关闭按钮或遮罩层后popup正常关闭

实际的结果是什么?

popup未能关闭

环境 版本
Wux v3.5.0
微信小程序基础库 2.18.0
系统 macos 10.14.6

补充说明

使用uni-app开发小程序,尝试过版本3.2.2、3.4.0、3.5.0、3.6.0、3.8.8均遇到该问题

@skyvow
Copy link
Member

skyvow commented Jul 9, 2021

@RexHarris 可以试试这样行不行 setTimeout(() => (this.showBaseInfo = false), 300)

@RexHarris
Copy link
Author

@skyvow 不得行,onCloseBaseInfo方法即关闭事件应该都没有触发,并且鼠标移到关闭按钮时,光标的样式为text
image

@RexHarris
Copy link
Author

暂时还没有人给出解决方案,现使用原生小程序中的page-container组件实现需求

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants