Vue 2 Mixin Doesn't Work Properly In V-for "[Vue Warn]: Error In Render: "TypeError: Cannot Read Property 'discountCalc' Of Undefined""
#laravel-8 + vue 2 I made a mixin like this : mixins/globalMixin.js : import Vue from 'vue'; Vue.mixin({ methods: { price(item, pricePeriod) { return priceP
Solution 1:
You should remove this
from the template :
<ul class="list-unstyled mb-3 position-relative">
<li v-for="(subItem, index) in JSON.parse(item.info)" :key="index">
{{
discountCalc(
price(item, pricing.period),
item.coupon,
localCurrency.name
)
}}
</li>
</ul>
Post a Comment for "Vue 2 Mixin Doesn't Work Properly In V-for "[Vue Warn]: Error In Render: "TypeError: Cannot Read Property 'discountCalc' Of Undefined"""