Commit b426ce75 authored by 毛线's avatar 毛线

静音开关

parent 07087907
<template>
<div class="audio-ctrl">
<img v-if="!mute" class="btn" src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/sound_open.png" alt="" @click="SetMute(!mute)">
<img v-else class="btn" src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/sound_close.png" alt="" @click="SetMute(!mute)">
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex'
export default {
data() {
return {}
},
computed: {
...mapState('audio', [
'mute', // 静音状态
]),
},
methods: {
...mapMutations('audio', [
'SetMute', // 设置静音状态
]),
},
}
</script>
<style lang="scss" scoped>
.audio-ctrl {
.btn {
width: 30px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment