import SettingItem from '@/settings/SettingItem' import useSettingsStore from '@/settings/useSettingsStore' import { Radio, Switch } from 'ant-design-vue' import clsx from 'clsx' import { defineComponent, watch } from 'vue' import useLayoutStore from '../useLayoutStore' import { sendParent } from '@/utils/parent' export default defineComponent({ setup() { const settings = useSettingsStore() watch( () => ({ autoSearch: settings.state.autoUseAi === 'auto', showTabButton: settings.state.showPetOnTab, ifSearch: settings.state.autoUseAi !== '' }), (val) => { sendParent([ 'configAI', { autoSearch: val.autoSearch, showTabButton: val.showTabButton, ifSearch: val.ifSearch } ]) console.log({ autoSearch: val.autoSearch, showTabButton: val.showTabButton, ifSearch: val.ifSearch }); }, { immediate: true } ) return () => (