weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-weex] cyabc opened a new issue #2560: recycle里面里面的组件添加了点击事件,只要给对应点击函数传递了参数,就会出现弹出层无效的问题。点击、滑动都操作在底部页面了0.18版本正常,0.19+至0.24都存在这个问题
Date Mon, 17 Jun 2019 02:53:16 GMT
cyabc opened a new issue #2560: recycle里面里面的组件添加了点击事件,只要给对应点击函数传递了参数,就会出现弹出层无效的问题。点击、滑动都操作在底部页面了0.18版本正常,0.19+至0.24都存在这个问题
URL: https://github.com/apache/incubator-weex/issues/2560
 
 
   <template>
     <div class="container">
       <div class="demo">
         <div
           class="btn"
           @click="openDialog"
         >
           <text class="btn-txt">点我弹对话消息Dialog</text>
         </div>
       </div>
   
       <input style="width:200px;height:100px;border-width:1;border-color:#ccccccc;" />
   
       <div class="demo">
         <div
           class="btn"
           style="width:200px;height:100px;"
           @click="testtt"
         >
           <text class="btn-txt">ccccccccccccccccccccccc</text>
         </div>
       </div>
       <recycle-list
         for="(item, i) in longList"
         switch="type"
       >
         <cell-slot
           @click="abc($event)"
           case="A"
           :style="{width:750,height:100}"
         >
           <text>- A {{i}} -</text>
         </cell-slot>
         <cell-slot case="B"          @click="abc($event)"
    :style="{width:750,height:100}">
           <text>- B {{i}} -</text>
         </cell-slot>
       </recycle-list>
   
       <wxc-dialog
         title="标题"
         content="这里是内容"
         :show="show"
         :single="false"
         :is-checked="isChecked"
         :show-no-prompt="true"
         @wxcDialogCancelBtnClicked="wxcDialogCancelBtnClicked"
         @wxcDialogConfirmBtnClicked="wxcDialogConfirmBtnClicked"
         @wxcDialogNoPromptClicked="wxcDialogNoPromptClicked"
       >
       </wxc-dialog>
     </div>
   </template>
   
   <script>
   const modal = weex.requireModule("modal");
   import { WxcDialog } from "weex-ui";
   export default {
     components: { WxcDialog },
     data: function() {
       return {
         show: false,
         isChecked: false,
         longList: [
           { type: "A" },
           { type: "B" },
           { type: "B" },
           { type: "A" },
           { type: "B" }
         ]
       };
     },
     methods: {
       abc(i) {
         modal.alert({ message: "abc"+i });
       },
       testtt() {
         modal.alert({ message: 1 });
       },
       openDialog() {
         this.show = true;
       },
       wxcDialogCancelBtnClicked() {
         //此处必须设置,组件为无状态组件,自己管理
         this.show = false;
       },
       wxcDialogConfirmBtnClicked() {
         //此处必须设置,组件为无状态组件,自己管理
         this.show = false;
       },
       wxcDialogNoPromptClicked(e) {
         //此处必须设置,组件为无状态组件,自己管理
         this.isChecked = e.isChecked;
       }
     }
   };
   </script>
   确认了一下,recycle里面的节点点击事件abc() ,如果传了参数就出现这个bug。不传参数就正常。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message