|
|
@ -3,10 +3,16 @@ |
|
|
|
<el-aside class="menu"> |
|
|
|
<chat-nav /> |
|
|
|
</el-aside> |
|
|
|
<el-container class="side"> |
|
|
|
<el-container class="side" v-if="!isMobileDevice()"> |
|
|
|
<chat-domain v-if="store.navId > 0" /> |
|
|
|
<ai-chat-left v-else /> |
|
|
|
</el-container> |
|
|
|
<van-button v-else icon="apps-o" size="small" type="primary" @click="showLeft = !showLeft"></van-button> |
|
|
|
<!-- 左侧弹出 --> |
|
|
|
<van-popup v-model:show="showLeft" position="left" :style="{ width: '50%', height: '100%' }"> |
|
|
|
<chat-domain v-if="store.navId > 0" /> |
|
|
|
<ai-chat-left v-else /> |
|
|
|
</van-popup> |
|
|
|
<el-container class="chat-box"> |
|
|
|
<chat-content v-if="store.navId > 0" /> |
|
|
|
<ai-chat-main v-else /> |
|
|
@ -18,10 +24,11 @@ |
|
|
|
import { onMounted } from "vue"; |
|
|
|
import { useAiChatStore } from "@/stores/aichat"; |
|
|
|
import { useLocalChatStore } from "@/stores/localchat"; |
|
|
|
import { isMobileDevice } from "@/util/device"; |
|
|
|
|
|
|
|
const store = useLocalChatStore(); |
|
|
|
const aiStore = useAiChatStore(); |
|
|
|
|
|
|
|
const showLeft = ref(false) |
|
|
|
//let source:any; |
|
|
|
onMounted(async () => { |
|
|
|
await store.init() |
|
|
@ -85,5 +92,14 @@ onMounted(async () => { |
|
|
|
.chat-box { |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
|
|
|
|
.van-button { |
|
|
|
position: absolute; |
|
|
|
right: 0; |
|
|
|
top: 50%; |
|
|
|
transform: translateX(-50%); |
|
|
|
z-index: 1; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</style> |