修复协议弹窗在导入数据时不倒计时的问题

pull/225/head
lyswhut 2020-04-26 22:44:47 +08:00
parent 9ff5147418
commit ef04e43323
2 changed files with 14 additions and 10 deletions

View File

@ -91,6 +91,9 @@ export default {
mounted() {
if (this.setting.randomAnimate) this.createWatch()
},
beforeDestroy() {
this.removeWatch()
},
methods: {
createWatch() {
this.removeWatch()

View File

@ -60,15 +60,9 @@ import { mapGetters, mapMutations } from 'vuex'
import { rendererSend } from '../../../common/ipc'
import { openUrl } from '../../utils'
export default {
props: {
show: {
type: Boolean,
default: false,
},
},
data() {
return {
time: 20,
time: 2,
globalObj: {
isShowPact: false,
},
@ -83,12 +77,19 @@ export default {
return this.btnEnable ? '' : `(${this.time})`
},
},
mounted() {
if (!this.setting.isAgreePact) {
watch: {
'setting.isAgreePact'(n) {
if (n) return
this.time = 10
this.startTimeout()
}
},
},
mounted() {
this.$nextTick(() => {
this.globalObj = window.globalObj
if (!this.setting.isAgreePact) {
this.startTimeout()
}
})
},
methods: {