Last active
June 30, 2019 17:05
-
-
Save cristijora/fd5d2c58d0c6c13ab285e3f35b8443fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<price-details :order="order" | |
@total-change="totalChange"> | |
</price-details> | |
export default { | |
// other properties which are not relevant in this example | |
methods: { | |
totalChange(grandTotal) { | |
if (this.isSpecialCustomer) { | |
this.order = { | |
...this.order, | |
discount: this.order.discount + 0.1 | |
}; | |
} | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment