weex icon indicating copy to clipboard operation
weex copied to clipboard

通过变量绑定方式切换背景色时有bug

Open pp1232 opened this issue 10 years ago • 2 comments

在通过变量绑定方式对背景颜色进行切换的过程中发现,由有背景色切换到无背景色时,背景色不会变为无色 华为mate7 android 4.4 自己app使用weex sdk 0.7

<style>
    .btn{
        background-color:white;
        border-radius: 10;
        width:100;
        height: 60;
        flex-direction:row;
        align-items:center;
        justify-content:center;
        margin: 20;
    }
</style>
<template><div style="background-color:gray;">
    <div class="btn" onclick="changeColor('red')"><text>红色</text></div>
    <div class="btn" onclick="changeColor('yellow')"><text>黄色</text></div>
        <div class="btn" onclick="changeColor('')"><text>无色</text></div>
    <div style="width:200;height:200;background-color:{{bgcolor}}">
    </div>
    <text style="font-size:40;width:200;background-color:{{bgcolor}};margin-top:20">文字背景色</text>
</div></template>
<script>
    module.exports={
        data:{
            bgcolor:"red"
        },
        methods:{
            changeColor:function(color){
                this.bgcolor=color;
            }
        }
    }
</script>

pp1232 avatar Aug 26 '16 06:08 pp1232

可以尝试 传 transparent 进去试一试

SimonTal avatar Aug 30 '16 01:08 SimonTal

这个问题长时间没有讨论和反馈,如果有更多讨论仍然可以在这里继续,但这里会做close处理 谢谢

Jinjiang avatar Oct 24 '16 12:10 Jinjiang