ai页面配置

master
suixy 3 months ago
parent e4cae92058
commit 46f59b31c8

@ -3,6 +3,10 @@
<router-view /> <router-view />
</el-config-provider> </el-config-provider>
<PrintView ref="printView" /> <PrintView ref="printView" />
<ai-assistant ref="aiAssistantRef" />
<div class="floatIcon" @click="openAiAssistantMenu">
<svg-icon class-name="search-icon" icon-class="Ai" />
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -10,6 +14,8 @@ import useSettingsStore from '@/store/modules/settings';
import { handleThemeStyle } from '@/utils/theme'; import { handleThemeStyle } from '@/utils/theme';
import useAppStore from '@/store/modules/app'; import useAppStore from '@/store/modules/app';
import PrintView from '@/views/print/view.vue'; import PrintView from '@/views/print/view.vue';
import SearchMenu from '@/layout/components/TopBar/search.vue';
import AiAssistant from '@/layout/components/TopBar/aiAssistant.vue';
const appStore = useAppStore(); const appStore = useAppStore();
const printView = ref(); const printView = ref();
@ -24,4 +30,19 @@ onMounted(() => {
} }
}); });
}); });
const aiAssistantRef = ref<InstanceType<typeof SearchMenu>>();
const openAiAssistantMenu = () => {
aiAssistantRef.value?.openSearch();
};
</script> </script>
<style>
.floatIcon {
position: fixed;
top: 50%;
right: 0;
width: 24px;
height: 24px;
}
</style>

Loading…
Cancel
Save