0👍
Is you button in the <template>
tags?
If so, you do not need to use this
delete from the click argument and v-if. However that should only throw a warning.
Can you also post the code for the method addToCart
?
If you are not setting the full discountProduct
object you will need to make sure setting the id is reactive. Like the example below:
this.$set(this.discountProduct, 'id', 1)
Nested Object/keys are not reactive without using $set. See https://v2.vuejs.org/v2/guide/reactivity.html for more details.
Hope this helps
- [Vuejs]-How to check v-model object value
- [Vuejs]-Vue Element Table: undefined nested value crashes Chrome
Source:stackexchange.com