lixin-web
Version:
vue and bootstrap
45 lines (44 loc) • 814 B
JavaScript
import {isIE,isEdge} from '_Will'
import {mapGetters,mapActions} from 'vuex'
export default {
data(){
return {
isIE,
isEdge,
}
},
watch:{
GA(val){
//the page GA first value is false .so watch it change true
if(val) {
this.getGACfg()
}
}
},
created(){
this.getGACfg()
},
methods:{
keySubmit(type){
if(!this.GACfg[type]) {
this.submit()
}
},
resetForm(){
this.$form.resetFields();
Object.values(this.$refs).filter(vm => vm !== this.$form).forEach(vm => vm.setCurrentValue(''))
},
...mapActions([
'getGACfg'
])
},
computed:{
...mapGetters([
'GA',
'GACfg'
])
},
mounted(){
this.$form = this.$refs.form
}
}