【发布时间】:2018-05-04 03:32:51
【问题描述】:
付费 HTML
<th class="plan-header blue">
<div class="pricing-plan-name">Not Free and not Recommended</div>
<div class="pricing-plan-price">
<sup>$</sup>0<span>.00</span>
</div>
<div class="pricing-plan-period">month</div>
</th>
免费 HTML
<th class="plan-header free">
<div class="pricing-plan-name">Free</div>
<div class="pricing-plan-price">
<sup>$</sup>0<span>.00</span>
</div>
<div class="pricing-plan-period">month</div>
</th>
非免费和推荐的 Html
<th class="plan-header plan-header-standard">
<div class="inner">
<!--<span class="plan-head"> </span>-->
<span class="recommended-plan-ribbon">RECOMMENDED</span>
<div class="pricing-plan-name">STANDARD</div>
<div class="pricing-plan-price">
<sup>$</sup>34<span>.99</span>
</div>
<div class="pricing-plan-period">month</div>
</div>
</th>
下面是我在 vue.js 中 for 循环中的代码。
<th v-for="Record in Records" class="plan-header" :class="Record.Is_Free ? 'free':'blue'">
<div class="pricing-plan-name">{{ Record.Description }}</div>
<div class="pricing-plan-price">
<sup>$</sup>0<span>.00</span>
</div>
</th>
问题
我必须将推荐模板也放在条件中。我可以在同一个循环中做吗?
我的意思是,我已经有了免费和非免费的条件。
我应该如何在同一 for 循环行中合并推荐选项
目前,我的代码只支持 for 循环内的免费和付费 Html 部分。
或者请推荐
【问题讨论】:
标签: vue.js