From 98bc9b2386bdcdc797594323c184b07a8d8ea27b Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Mon, 22 Jun 2020 10:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E9=83=A8=E5=88=86=E5=8A=A8=E7=94=BB=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88=E7=9A=84bug=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/setting/Setting.vue | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/components/setting/Setting.vue b/src/components/setting/Setting.vue index d7e82ce..2da169b 100644 --- a/src/components/setting/Setting.vue +++ b/src/components/setting/Setting.vue @@ -57,7 +57,7 @@ 动画效果 {{item.alias}} @@ -67,7 +67,7 @@ 动画方向 {{item}} @@ -84,7 +84,7 @@ import SettingItem from './SettingItem' import ColorCheckbox from '../checkbox/ColorCheckbox' import ImgCheckbox from '../checkbox/ImgCheckbox' import Clipboard from 'clipboard' -import themeUtil from '../../utils/themeUtil'; +import themeUtil from '../../utils/themeUtil' import { mapState } from 'vuex' const ColorCheckboxGroup = ColorCheckbox.Group @@ -101,11 +101,6 @@ export default { colors, } }, - watch: { - animate() { - this.direction = this.directions[0] - } - }, computed: { directions() { return this.animates.find(item => item.name == this.animate).directions @@ -143,12 +138,11 @@ export default { setWeekMode(checked) { this.$store.commit('setting/setWeekMode', checked) }, - setAnimate() { - let animate = { - name: this.animate, - direction: this.direction + setAnimate(animate, direction) { + if (direction == undefined) { + this.direction = this.directions[0] } - this.$store.commit('setting/setAnimate', animate) + this.$store.commit('setting/setAnimate', {name: this.animate, direction: this.direction}) }, setFixedHeader(checked) { this.$store.commit('setting/setFixedHeader', checked)