一 原生用法

style="width: 100%; margin-top: 20px"

二  三元表达式

<a :style="{color:(index==0?arr.conFontColor:'#000')}" :href="con.subTitleHref" target="_self">{{con.subTitle}}</a>

三 函数用法

  <div :style="{ height: tableRowHeight(item) }" class="tableRowCox">
              {{ item.id ? item.id : "--" }}
  </div>

四 变量用法

<div :style="{ height:conFontHeight}"> {{ item.id ? item.id : "--" }} </div>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2021-06-18
猜你喜欢
  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
  • 2021-06-18
  • 2021-05-30
  • 2022-12-23
  • 2021-11-29
相关资源
相似解决方案