我在控制台中看到此错误:
isNaN(...).toFixed 不是函数
这是我用 Vue.js 编写的一些 HTML 代码:
<v-flex xs3 class="text-lg-right"
v-for="(mrp, index) in [medicine.orderedMedView.combinations[combinationIndex]]" :key="index">
<div class="primary-header-font">
₹ {{ isNaN((mrp && (mrp.totalPrice - (mrp.totalPrice * (medicine.discountPercentage / 100))))).toFixed(2) ?
0 :
(( mrp && mrp.totalPrice - (mrp.totalPrice * (medicine.discountPercentage / 100)))).toFixed(2) || 0 }}
</div>
<span v-if="mrp && mrp.totalPrice != NaN" class="secondary-header-font">
{{ medicine.discountPercentage }}%
</span>
<span v-if="mrp && mrp.totalPrice != NaN" class="secondary-header-font strike-through">
₹ {{ mrp && mrp.totalPrice && (mrp.totalPrice).toFixed(2) || 0 }}
</span>
</v-flex>
我猜在我使用它的药物状态下,反应会延迟......所以也许这就是它说“不是功能”的原因。我怎样才能解决这个问题?