Skip to content

Commit

Permalink
feat: 优化测试键盘页面交互
Browse files Browse the repository at this point in the history
  • Loading branch information
YasinChan committed Dec 10, 2023
1 parent 27e9bd8 commit 2dc96fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/key/KeyWrap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import { onMounted, onBeforeUnmount, reactive } from 'vue';
import { CAN_PRINT_KEY } from '@/config/key';
import { useConfigStore } from '@/store/config';
import { storeToRefs } from 'pinia';
const configStore = useConfigStore();
const { onlyShowMain } = storeToRefs(configStore);
defineProps({
title: {
Expand Down Expand Up @@ -66,7 +68,9 @@ onBeforeUnmount(() => {
<div class="y-key-wrap" :class="className">
<slot :keys-pressed="state.keysPressed"></slot>
</div>
<div class="y-key-wrap__title">{{ title }}</div>
<Transition name="menu">
<div class="y-key-wrap__title" v-show="!onlyShowMain">{{ title }}</div>
</Transition>
</template>
<style lang="scss">
.y-key-wrap {
Expand Down

0 comments on commit 2dc96fc

Please sign in to comment.