1👍
Parent
computed: {
isSaving() {
// add `this.`
return (
this.status && this.status != "done"
)
);
}
}
<SaveButton v-bind:saveState="isSaving"/>
Child
<script>
export default {
name: "saveButton",
props: ['saveState']
}
</script>
<template>
<div class="settings--button-wrapper">
<!-- use `saveState` -->
<button>
{{ saveState ? 'Saving..' : 'Save' }}
</button>
</div>
</template>
- [Vuejs]-Use window.open in a Nuxt store (vuex)
- [Vuejs]-Firestore, vue, vuex, vuexfire: How to make getter actually get data from store?
-1👍
You should use saveState
instead of isSaving.
Source:stackexchange.com