Add vue component for save button and integrate into FormMixin
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import savebutton from '../components/save_button'
|
||||
|
||||
export default {
|
||||
mounted: function() {
|
||||
this.$root.$on('field-change', this.handleFieldChange)
|
||||
@@ -8,7 +10,25 @@ export default {
|
||||
const { value, name } = event
|
||||
if (typeof this[name] !== undefined) {
|
||||
this[name] = value
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
disabled: this.disableSave,
|
||||
}
|
||||
},
|
||||
|
||||
props: {
|
||||
disableSave: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
|
||||
components: {
|
||||
savebutton,
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user