新增: 全局色弱模式;

This commit is contained in:
iczer
2020-06-20 11:55:59 +08:00
parent 5bbe94728e
commit 3d568c6caa
10 changed files with 80 additions and 38 deletions

View File

@@ -42,7 +42,7 @@
<a-list :split="false">
<a-list-item>
色弱模式
<a-switch slot="actions" size="small" />
<a-switch :checked="weekMode" slot="actions" size="small" @change="setWeekMode" />
</a-list-item>
<a-list-item>
显示抽屉按钮
@@ -110,7 +110,7 @@ export default {
directions() {
return this.animates.find(item => item.name == this.animate).directions
},
...mapState('setting', ['animates', 'multiPage'])
...mapState('setting', ['animates', 'multiPage', 'weekMode'])
},
methods: {
onColorChange (values, colors) {
@@ -140,6 +140,9 @@ export default {
setMultiPage (checked) {
this.$store.commit('setting/setMultiPage', checked)
},
setWeekMode(checked) {
this.$store.commit('setting/setWeekMode', checked)
},
setAnimate() {
this.direction = this.directions[0]
let animate = {

View File

@@ -8,7 +8,7 @@
</template>
<script>
import {animates} from '@/config'
import animates from '@/config/animates'
export default {
name: 'PageToggleTransition',
@@ -16,7 +16,7 @@
animate: {
type: String,
validator(value) {
return animates.find(item => item.name == value) != -1
return animates.findIndex(item => item.name == value) != -1
},
default: 'bounce'
},