refactor: 小bug

pull/67/head
xiaojunnuo 4 years ago
parent 7f23b9a5df
commit 25118efba3

@ -156,13 +156,14 @@ export default {
console.log('index mounted') console.log('index mounted')
}, },
methods: { methods: {
modeChange (mode) { async modeChange () {
const mode = this.config.app.mode
if (mode === 'ow') { if (mode === 'ow') {
this.config.server.dns.speedTest.enabled = false this.config.server.dns.speedTest.enabled = false
this.config.plugins.overwall.enabled = true this.config.plugin.overwall.enabled = true
} else if (mode === 'default') { } else if (mode === 'default') {
this.config.server.dns.speedTest.enabled = false this.config.server.dns.speedTest.enabled = true
this.config.plugins.overwall.enabled = true this.config.plugin.overwall.enabled = false
} }
this.$api.config.save(this.config).then(() => { this.$api.config.save(this.config).then(() => {
this.$message.info('设置已保存') this.$message.info('设置已保存')

Loading…
Cancel
Save