cover-image 组件不稳定的bug
发布于 5 年前 作者 oluo 15260 次浏览 来自 问答

如题,cover-image组件,同样的代码,不做任何改动,每次扫描预览的结果都不一样(布局问题)

在安卓下,布局没有问题,但是多次扫描,cover-image 时而能显示时而不能显示;

在iPhone下,cover-image 每次到是可以显示,但是布局不稳定,时而错位时而正常;



<view class=“body” style=‘height: 85vh;top:5vh’>

    <camera device-position="{{back}}" flash=“off” style=“width:{{cwidth}}px; height:{{cheight}}px;border:1px solid #ccc;margin-top:5px”>

        <cover-image style=‘width:{{cwidth}}px; height:{{cheight}}px;line-height:0;margin:0;’ src="{{cover}}">

        </cover-image>

    </camera>

    <view class=“timer”>

    {{timer}}

    </view>

</view>



.body {

    position: fixed;

    top: 5vh;

    height: 85vh;

    width: 100vw;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

}

camera {

    background-color: #000;

}

.timer {

    display: flex;

    justify-content: center;

    align-items: center;

    color: #000;

    background-color: #fff;

}


3 回复

好多问题,心累

是啊 我们也遇到了

请问解决了吗

回到顶部