收藏
回答

template组建中flex嵌套flex,第一个display和<image>的样式为什么没生效?

<template name="fuctListTemp02">
    <view class="functStytemp row">
        <view class="functSty2temp row">
          <image class="iuncttemp" src="{{funcImgSrc}}" mode="scaleToFill">
          </image>
          <label class="la1temp">
              {{itemFunctDesc}}
          </label>
        </view>
        <view class="functSty22temp row">
          <label class="">
            {{itemFunctVal}}
         </label>
         <label class="la1temp">
            〉
         </label>
        </view>
    </view>
</template>
.row{
  display: flex;
  flex-direction: row;
}
.functStytemp{
  justify-content: space-between;
  width: 100%;
  height: 100rpx;
  /* border-bottom: 1rpx solid #ccc; */
}
.functSty2temp{
  align-items: center;
}
.functSty22temp{
  justify-content: flex-end;
  align-items: center;
  color: #999999;
}
.la1temp{
  padding-left: 20rpx;
}
.iuncttemp{
  width: 60rpx;
  height: 60rpx;
  border-radius: 10rpx;
}


回答关注问题邀请回答
收藏

1 个回答

  • Lin-Y-N
    Lin-Y-N
    2023-09-22

    样式通过data的动态参数方式传到template中生效了,效果正常显示

    2023-09-22
    有用
    回复
登录 后发表内容