fix and cleanup reset button
This commit is contained in:
parent
ed34b07b3f
commit
b3d0360699
@ -1,7 +1,7 @@
|
|||||||
import ModifiedIndicator from './modified_indicator.vue'
|
import ModifiedIndicator from './modified_indicator.vue'
|
||||||
import ProfileSettingIndicator from './profile_setting_indicator.vue'
|
import ProfileSettingIndicator from './profile_setting_indicator.vue'
|
||||||
import DraftButtons from './draft_buttons.vue'
|
import DraftButtons from './draft_buttons.vue'
|
||||||
import { get, set } from 'lodash'
|
import { get, set, cloneDeep } from 'lodash'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -218,13 +218,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
reset () {
|
reset () {
|
||||||
console.log('reset')
|
|
||||||
if (this.realDraftMode) {
|
if (this.realDraftMode) {
|
||||||
console.log(this.draft)
|
this.draft = cloneDeep(this.state)
|
||||||
console.log(this.state)
|
|
||||||
this.draft = this.state
|
|
||||||
} else {
|
} else {
|
||||||
set(this.$store.getters.mergedConfig, this.path, this.defaultState)
|
set(this.$store.getters.mergedConfig, this.path, cloneDeep(this.defaultState))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hardReset () {
|
hardReset () {
|
||||||
|
Loading…
Reference in New Issue
Block a user