This commit is contained in:
expdsn 2024-11-27 18:52:35 +08:00
parent db9089c799
commit f20e662bfa
5 changed files with 46 additions and 32 deletions

BIN
public/fox.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

View File

@ -31,7 +31,7 @@ const router = useRouterStore()
const layout = useLayoutStore() const layout = useLayoutStore()
</script> </script>
<template> <template>
<!-- <ConfigProvider :locale="zhCN"> --> <ConfigProvider :locale="zhCN">
<div class="fixed left-0 top-0 w-full h-screen style-root" @contextmenu.prevent> <div class="fixed left-0 top-0 w-full h-screen style-root" @contextmenu.prevent>
<Header /> <Header />
<Background <Background
@ -78,7 +78,7 @@ const layout = useLayoutStore()
<BackupRecovery v-if="router.path === 'global-backup'"></BackupRecovery> <BackupRecovery v-if="router.path === 'global-backup'"></BackupRecovery>
</div> </div>
<ModalPgae /> <ModalPgae />
<!-- </ConfigProvider> --> </ConfigProvider>
</template> </template>
<style lang="less"> <style lang="less">

View File

@ -9,6 +9,8 @@ import useRouterStore from '@/useRouterStore'
import useSearchStore from '@/layout/header/search/useSearchStore' import useSearchStore from '@/layout/header/search/useSearchStore'
import useLayoutStore from '@/layout/useLayoutStore' import useLayoutStore from '@/layout/useLayoutStore'
import { sendParent } from '@/utils/parent' import { sendParent } from '@/utils/parent'
import FoxImg from '~/fox.jpg'
import clsx from 'clsx'
const stageStrList = [ const stageStrList = [
'dazhaohu', 'dazhaohu',
@ -122,15 +124,26 @@ export default defineComponent(() => {
} }
) )
return () => ( return () => (
<canvas <>
ref={(el) => (container = el as any)} <img
onMouseenter={() => { src={FoxImg}
run('dianji') onClick={() => {
}} run('aixin')
onClick={() => { sendParent(['openSide'])
run('aixin') }}
sendParent(['openSide']) class={clsx('cursor-pointer fixed w-[40px] right-0 bottom-10 ', layout.isCompact ? 'block' : 'hidden')}
}} ></img>
/> <canvas
class={clsx(layout.isCompact ? 'hidden' : 'block')}
ref={(el) => (container = el as any)}
onMouseenter={() => {
run('dianji')
}}
onClick={() => {
run('aixin')
sendParent(['openSide'])
}}
/>
</>
) )
}) })

View File

@ -9,7 +9,6 @@ import { sendParent } from '@/utils/parent'
export default defineComponent({ export default defineComponent({
setup() { setup() {
const settings = useSettingsStore() const settings = useSettingsStore()
const layout = useLayoutStore()
watch( watch(
() => ({ () => ({
autoSearch: settings.state.autoUseAi === 'show', autoSearch: settings.state.autoUseAi === 'show',
@ -17,6 +16,7 @@ export default defineComponent({
isSearch: settings.state.autoUseAi === '' isSearch: settings.state.autoUseAi === ''
}), }),
(val) => { (val) => {
sendParent([ sendParent([
'configAI', 'configAI',
{ {
@ -57,6 +57,21 @@ export default defineComponent({
> >
</span> </span>
<SettingItem
v-slots={{
label: () => <div></div>
}}
desc="浏览其它网页时的侧边栏功能"
noRoundedT
>
<Switch
checked={settings.state.showPetOnTab}
onUpdate:checked={(e) => {
if (e) settings.state.showPetOnTab = true
else settings.state.showPetOnTab = false
}}
/>
</SettingItem>
<SettingItem <SettingItem
v-slots={{ v-slots={{
label: () => <div></div> label: () => <div></div>
@ -72,21 +87,7 @@ export default defineComponent({
}} }}
/> />
</SettingItem> </SettingItem>
<SettingItem
v-slots={{
label: () => <div></div>
}}
desc="fatfox标签页内的小助手"
noRoundedT
>
<Switch
checked={settings.state.showPetOnTab}
onUpdate:checked={(e) => {
if (e) settings.state.showPetOnTab = true
else settings.state.showPetOnTab = false
}}
/>
</SettingItem>
<span <span
class={clsx( class={clsx(
'text-[14px] font-bold my-2', 'text-[14px] font-bold my-2',

View File

@ -27,10 +27,10 @@ export default function useSortable(list: Ref<any[]>, type: Ref<string>) {
scrollSpeed: 10, scrollSpeed: 10,
...(type.value === 'page' ...(type.value === 'page'
? { ? {
invertSwap: true, invertSwap: true,
invertedSwapThreshold: 1, invertedSwapThreshold: 1,
filter: '.operation-button' filter: '.operation-button'
} }
: {}), : {}),
ghostClass: 'opacity-0', ghostClass: 'opacity-0',
onStart: (e: any) => { onStart: (e: any) => {