Skip to content

Commit 45444bb

Browse files
feat: chat
1 parent be75970 commit 45444bb

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed

ui/src/layout/hooks/useResize.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { nextTick, onBeforeMount, onMounted, onBeforeUnmount } from 'vue'
2-
import { useRoute } from 'vue-router'
32
import useStore from '@/stores'
43
import { DeviceType } from '@/enums/common'
54
/** 参考 Bootstrap 的响应式设计 WIDTH = 768 */
@@ -32,7 +31,7 @@ export default () => {
3231
})
3332
})
3433

35-
onBeforeUnmount(() => {
36-
window.removeEventListener('resize', _resizeHandler)
37-
})
34+
// onBeforeUnmount(() => {
35+
// window.removeEventListener('resize', _resizeHandler)
36+
// })
3837
}

ui/src/styles/app.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,5 +533,5 @@ h5 {
533533
.chat-background {
534534
background-repeat: no-repeat;
535535
background-position: center;
536-
background-size: auto 100%;
536+
background-size: cover;
537537
}

ui/src/views/chat/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ const components: any = import.meta.glob('@/views/chat/**/index.vue', {
2121
2222
const {
2323
query: { mode },
24-
params: { accessToken },
2524
} = route as any
2625
2726
const currentTemplate = computed(() => {
27+
console.log(common.isMobile())
2828
let modeName = ''
2929
if (!mode || mode === 'pc') {
3030
modeName = common.isMobile() ? 'mobile' : 'pc'

ui/src/views/chat/mobile/index.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<div
33
class="chat-mobile layout-bg chat-background"
44
v-loading="loading"
5+
:class="classObj"
56
:style="{
67
'--el-color-primary': applicationDetail?.custom_theme?.theme_color,
78
'--el-color-primary-light-9': hexToRgba(applicationDetail?.custom_theme?.theme_color, 0.1),
@@ -164,7 +165,7 @@ import { t } from '@/locales'
164165
import UserCenter from './component/UserCenter.vue'
165166
import chatAPI from '@/api/chat/chat'
166167
167-
const { user, chatLog, chatUser } = useStore()
168+
const { user, chatLog, chatUser, common } = useStore()
168169
169170
const AiChatRef = ref()
170171
const loading = ref(false)
@@ -199,6 +200,12 @@ const customStyle = computed(() => {
199200
}
200201
})
201202
203+
const classObj = computed(() => {
204+
return {
205+
mobile: common.isMobile(),
206+
}
207+
})
208+
202209
function editName(val: string, item: any) {
203210
if (val) {
204211
const obj = {

ui/src/views/chat/pc/index.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,6 @@ const handleResetPassword = (param: ResetCurrentUserPasswordRequest) => {
367367
})
368368
}
369369
370-
const customStyle = computed(() => {
371-
return {
372-
background: applicationDetail.value?.custom_theme?.theme_color,
373-
color: applicationDetail.value?.custom_theme?.header_font_color,
374-
}
375-
})
376-
377370
const classObj = computed(() => {
378371
return {
379372
mobile: common.isMobile(),
@@ -576,12 +569,6 @@ async function exportHTML(): Promise<void> {
576569
*初始化历史对话记录
577570
*/
578571
const init = () => {
579-
// if (
580-
// (applicationDetail.value.show_history || !user.isEnterprise()) &&
581-
// props.applicationAvailable
582-
// ) {
583-
// getChatLog(applicationDetail.value.id)
584-
// }
585572
getChatLog(applicationDetail.value?.id)
586573
}
587574
onMounted(() => {
@@ -639,6 +626,7 @@ function closeExecutionDetail() {
639626
640627
&__left {
641628
position: relative;
629+
z-index: 1;
642630
643631
.el-menu {
644632
display: flex;

0 commit comments

Comments
 (0)