2***@qq.com
2***@qq.com
  • 发布:2022-09-22 16:28
  • 更新:2022-09-23 15:48
  • 阅读:61

【报Bug】支付宝小程序 page-container 页面容器 被当作自定义组件,属性、事件编译之后被剔除

分类:uni-app

产品分类: uniapp/小程序/阿里

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win11 21H2

HBuilderX类型: 正式

HBuilderX版本号: 3.6.3

第三方开发者工具版本号: 3.1.3

基础库版本号: 2.8.0

项目创建方式: HBuilderX

示例代码:
  <button type="primary"  
          @click="data.show = !data.show">{{data}}</button>  
  <!-- #ifdef MP-ALIPAY -->  
  <page-container show="{{data.show}}"  
                  onBeforeEnter="onBeforeEnter"  
                  onEnter="onEnter"  
                  onEnterCancelled="onEnterCancelled"  
                  onAfterEnter="onAfterEnter"  
                  onBeforeLeave="onBeforeLeave"  
                  onLeave="onLeave"  
                  onLeaveCancelled="onLeaveCancelled"  
                  onAfterLeave="onAfterLeave"  
                  onClickOverlay="onClickOverlay">  
    <view>  
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Aperiam dolore   
      cupiditate esse amet deserunt velit explicabo quam fugiat, odit natus hic   
      deleniti quisquam incidunt ipsam quia magnam quasi libero neque?  
    </view>  
  </page-container>  
  <!-- #endif -->
<script setup>  
  import { shallowReactive } from 'vue'  
  import { onLoad } from '@dcloudio/uni-app'  

  const data = shallowReactive({  
    show: false,  
    has: my.canIUse("page-container"),  
    version: my.SDKVersion,  
  })  

  const onBeforeEnter = e => console.log(e)  
  const onEnter = e => console.log(e)  
  const onEnterCancelled = e => console.log(e)  
  const onAfterEnter = e => console.log(e)  
  const onBeforeLeave = e => console.log(e)  
  const onLeave = e => console.log(e)  
  const onLeaveCancelled = e => console.log(e)  
  const onAfterLeave = e => console.log(e)  
  const onClickOverlay = e => console.log(e)  
</script>

操作步骤:

HBuilderX 3.6.6 新建项目、空白模板, 选择vue3版本,复制以上代码,运行至支付宝小程序开发者工具

预期结果:

点击button,page-container组件能正常弹出,绑定事件能依次触发

实际结果:

page-container组件未能弹出,事件未触发

bug描述:

2022-09-22 16:28 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com (作者)

附件图片为编译后index.axml 关键代码,可见page-container被当成自定义组件,事件全被剔除,show属性编译成u-p,导致page-container失效

DCloud_UNI_WZF

DCloud_UNI_WZF

问题已确认,感谢反馈,已加分

要回复问题请先登录注册