This commit is contained in:
expdsn 2024-11-28 16:44:29 +08:00
parent f20e662bfa
commit 3a40fa7a25
2 changed files with 17 additions and 14 deletions

View File

@ -11,9 +11,9 @@ export default defineComponent({
const settings = useSettingsStore() const settings = useSettingsStore()
watch( watch(
() => ({ () => ({
autoSearch: settings.state.autoUseAi === 'show', autoSearch: settings.state.autoUseAi === 'auto',
showTabButton: settings.state.showPetOnTab, showTabButton: settings.state.showPetOnTab,
isSearch: settings.state.autoUseAi === '' ifSearch: settings.state.autoUseAi !== ''
}), }),
(val) => { (val) => {
@ -22,9 +22,15 @@ export default defineComponent({
{ {
autoSearch: val.autoSearch, autoSearch: val.autoSearch,
showTabButton: val.showTabButton, showTabButton: val.showTabButton,
isSearch: val.isSearch ifSearch: val.ifSearch
} }
]) ])
console.log({
autoSearch: val.autoSearch,
showTabButton: val.showTabButton,
ifSearch: val.ifSearch
});
}, },
{ {
immediate: true immediate: true
@ -111,7 +117,7 @@ export default defineComponent({
/> />
</SettingItem> </SettingItem>
<div {/* <div
class={clsx('flex w-full py-2 px-3 rounded-lg flex-col', { class={clsx('flex w-full py-2 px-3 rounded-lg flex-col', {
'bg-black/5': useLayoutStore().state.current !== 0, 'bg-black/5': useLayoutStore().state.current !== 0,
'bg-white/10': useLayoutStore().state.current === 0 'bg-white/10': useLayoutStore().state.current === 0
@ -126,14 +132,11 @@ export default defineComponent({
desc="每次搜索直接询问fatfox" desc="每次搜索直接询问fatfox"
> >
<Radio <Radio
checked={settings.state.autoUseAi === 'show'} checked={settings.state.autoUseAi === 'auto'}
onClick={() => { onClick={() => {
settings.state.autoUseAi = 'show' settings.state.autoUseAi = 'auto'
}}
onUpdate:checked={(e) => {
if (e) settings.state.showSider = 'auto'
else settings.state.showSider = 'show'
}} }}
/> />
</SettingItem> </SettingItem>
<SettingItem <SettingItem
@ -144,13 +147,13 @@ export default defineComponent({
desc="每次搜索,提示您进行手动查询" desc="每次搜索,提示您进行手动查询"
> >
<Radio <Radio
checked={settings.state.autoUseAi === 'auto'} checked={settings.state.autoUseAi === 'show'}
onClick={() => { onClick={() => {
settings.state.autoUseAi = 'auto' settings.state.autoUseAi = 'show'
}} }}
/> />
</SettingItem> </SettingItem>
</div> </div> */}
</div> </div>
) )
} }

View File

@ -9,7 +9,7 @@ export function sendParent(
{ {
autoSearch: boolean autoSearch: boolean
showTabButton: boolean showTabButton: boolean
isSearch: boolean ifSearch: boolean
} }
] ]
) { ) {