fix: 设置-快捷栏-自动隐藏功能不生效

This commit is contained in:
expdsn 2024-11-15 14:47:10 +08:00
parent b3fa5b1e91
commit 4fa96b4705
2 changed files with 4 additions and 10 deletions

View File

@ -33,11 +33,7 @@ export default defineComponent(() => {
<div
class={clsx(
'fixed bottom-4 left-1/2 duration-150 -translate-x-1/2 p-4 rounded-lg bg-white/60 backdrop-blur flex gap-4 shadow-lg',
setting.state.showDock === 'auto'
? show.value
? 'bottom-4'
: '-bottom-[90px]'
: 'bottom-4'
setting.state.showDock === 'auto' ? show.value ? 'bottom-4' : 'bottom-[-90px]' : 'bottom-4'
)}
ref={container}
onMouseleave={() => {
@ -58,8 +54,8 @@ export default defineComponent(() => {
style={
current.value >= 0
? {
transform: `translateY(${current.value === i - 1 || current.value === i + 1 ? '-5%' : current.value === i ? '-10%' : '0'}) scale(${current.value === i - 1 || current.value === i + 1 ? 1.1 : current.value === i ? 1.2 : 1})`
}
transform: `translateY(${current.value === i - 1 || current.value === i + 1 ? '-5%' : current.value === i ? '-10%' : '0'}) scale(${current.value === i - 1 || current.value === i + 1 ? 1.1 : current.value === i ? 1.2 : 1})`
}
: {}
}
id={block?.id || ''}

View File

@ -1,13 +1,11 @@
import SettingItem from '@/settings/SettingItem'
import useSettingsStore from '@/settings/useSettingsStore'
import { Button, Modal, Switch } from 'ant-design-vue'
import { Button } from 'ant-design-vue'
import clsx from 'clsx'
import { computed, defineComponent, ref } from 'vue'
import useLayoutStore from '../useLayoutStore'
export default defineComponent({
setup() {
const settings = useSettingsStore()
const open = ref(false)
const layout = useLayoutStore()
const isGame = computed(() => {