weex icon indicating copy to clipboard operation
weex copied to clipboard

[bug]安卓端,带子组件的元素if判断隐后会报错强退。

Open SimonTal opened this issue 10 years ago • 4 comments

示例代码如下:

<template>
  <div>
    <text onclick="hideit">隐藏</text>
    <div if={{shown}}>
      <subcomponent></subcomponent>
    </div>
  </div>
</template>
<script>
  module.exports = {
    data:{
      shown:true;
    },
    methods:{
      hideit:function() {
        this.shown = false;
      }
    }

  }
</script>

经测试 weex 0.7 版本,web及ios均正常

SimonTal avatar Aug 23 '16 15:08 SimonTal

@SimonTal 这边没有复现,能再具体说说吗?还有你的这个data里的分号要去掉 data:{ shown:true },`

zshshr avatar Aug 24 '16 02:08 zshshr

手误,实际代码里面没有这个分号的 XD 经过进一步的测试,发现子component里面含有input标签就会导致这个错误 @zshshr

SimonTal avatar Aug 24 '16 05:08 SimonTal

我有类似的问题,加了if后,在方法中动态的改变if条件值后,ios会强退。

xyduane avatar Sep 08 '16 00:09 xyduane

@SimonTal 最新版本的palyground已经修复 ,input组件也是没有问题的,麻烦确认一下http://alibaba.github.io/weex/download.html ` `

zshshr avatar Sep 14 '16 05:09 zshshr