fix: improve formatting and consistency in ChatHistoryDrawer.vue
This commit is contained in:
parent
15ec70c4a8
commit
f78027818d
@ -97,9 +97,10 @@ import HistoryPanel from '@/views/chat/component/HistoryPanel.vue'
|
|||||||
import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue'
|
import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue'
|
||||||
import type {ResetCurrentUserPasswordRequest} from '@/api/type/user'
|
import type {ResetCurrentUserPasswordRequest} from '@/api/type/user'
|
||||||
import chatAPI from '@/api/chat/chat'
|
import chatAPI from '@/api/chat/chat'
|
||||||
import { useRouter } from 'vue-router'
|
import {useRoute, useRouter} from 'vue-router'
|
||||||
const router = useRouter()
|
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
const show = defineModel<boolean>('show')
|
const show = defineModel<boolean>('show')
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@ -128,6 +129,7 @@ const handleClickList = (item: any) => {
|
|||||||
const deleteChatLog = (row: any) => {
|
const deleteChatLog = (row: any) => {
|
||||||
emit('deleteLog', row)
|
emit('deleteLog', row)
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshFieldTitle(chatId: string, abstract: string) {
|
function refreshFieldTitle(chatId: string, abstract: string) {
|
||||||
emit('refreshFieldTitle', chatId, abstract)
|
emit('refreshFieldTitle', chatId, abstract)
|
||||||
}
|
}
|
||||||
@ -145,7 +147,12 @@ const handleResetPassword = (param: ResetCurrentUserPasswordRequest) => {
|
|||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
chatUser.logout().then(() => {
|
chatUser.logout().then(() => {
|
||||||
router.push({ name: 'login' })
|
router.push({
|
||||||
|
name: 'login',
|
||||||
|
params: {accessToken: chatUser.accessToken},
|
||||||
|
query: route.query,
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user