Use variable to make canSave clearer
This commit is contained in:
parent
90b057d0b2
commit
41f21ad830
@ -50,9 +50,11 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
if (!this.invalid) {
|
const formValid = !this.invalid
|
||||||
|
|
||||||
|
if (formValid) {
|
||||||
return true
|
return true
|
||||||
} else if (this.changed && !this.invalid) {
|
} else if (this.changed && formValid) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user