Skip to content

Instantly share code, notes, and snippets.

@cristijora
Last active June 30, 2019 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cristijora/fd5d2c58d0c6c13ab285e3f35b8443fe to your computer and use it in GitHub Desktop.
Save cristijora/fd5d2c58d0c6c13ab285e3f35b8443fe to your computer and use it in GitHub Desktop.
<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