安卓端写好的宽度加载不出来
发布于 6 年前 作者 weiyu 3829 次浏览 来自 问答
  • 当前 Bug 的表现

这个项目之前一直都是好的,今天突然出现这个问题,ios端正常显示,但是安卓端用了3部手机都是宽度无法正常显示,不知道是什么原因。

  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo
<view class='TitleText-2'>
  <radio-group class="radio-gro" bindchange="TomatoTimeBind">
    <view class="flex_box">
      <label class="{{TomatoTime==0.25?'active2':'flex_item'}}">0.25
        <radio style='width:100%;' value="0.25" hidden="true"></radio>
      </label>
      <label class="{{TomatoTime==0.5?'active2':'flex_item'}}"> 0.5
        <radio value="0.5" hidden="true"></radio>
      </label>
      <label class="{{TomatoTime==0.75?'active2':'flex_item'}}"> 0.75
        <radio value="0.75" hidden="true"></radio>
      </label>
      <label class="{{TomatoTime==1?'active2':'flex_item'}}"> 1
        <radio value="1" hidden="true"></radio>
      </label>
      <label class="{{TomatoTime==2?'active2':'flex_item'}}"> 2
        <radio value="2" hidden="true"></radio>
      </label>
      <label class="{{TomatoTime==3?'active2':'flex_item'}}"> 3
        <radio value="3" hidden="true"></radio>
      </label>
      <label class="{{TomatoTime==4?'active2':'flex_item'}}"> 4
        <radio value="4" hidden="true"></radio>
      </label>
      <label class="{{TomatoTime==5?'active2':'flex_item'}}"> 5
        <radio value="5" hidden="true"></radio>
      </label>
    </view>
  </radio-group>
</view>
.TitleText-2 {
  width: 90vw;
  color: #54534e;
  margin:10px 5vw;
  font-size: 13px;
  float: left;
}
.TitleText-2 radio-group{
  display: flex;
   
}
.flex_box {
  width: 100%;
  /* flex:1; */
  height: 100%;
  display: flex;
  flex-wrap: wrap;
}
 
.flex_item {
  float: left;
  width: 25%;
  height:30px;
  background-color: #efefef;
  color: #54534e;
  text-align: center;
  border-left: 1px white solid;
  border-top: 1px white solid;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}
回到顶部