feat: 聊天界面调整
This commit is contained in:
13
src/renderer/views/home/components/ChatAvatar.vue
Normal file
13
src/renderer/views/home/components/ChatAvatar.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<img class="w-9 h-9 rounded-full shrink-0" :src="src" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
interface Props {
|
||||
src?: string
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
src: '@assets/images/login/blue_logo.png'
|
||||
})
|
||||
</script>
|
||||
43
src/renderer/views/home/components/ChatOperation.vue
Normal file
43
src/renderer/views/home/components/ChatOperation.vue
Normal file
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<div class="mt-4 text-gray-500 flex items-center justify-between gap-4 ">
|
||||
<RiFileCopyLine size="16px" @click="copyFileClick()" />
|
||||
<div class="flex items-center gap-4">
|
||||
<RiShareForwardLine size="16px" @click="shareForwardClick()" />
|
||||
<RiDownload2Line size="16px" @click="downloadClick()" />
|
||||
<RiThumbUpLine size="16px" @click="thumbUpClick()" />
|
||||
<RiThumbDownLine size="16px" @click="thumbDownClick()" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { RiFileCopyLine, RiShareForwardLine, RiDownload2Line, RiThumbUpLine, RiThumbDownLine } from '@remixicon/vue'
|
||||
import { ChatMessage } from '../model/ChatModel';
|
||||
|
||||
interface Props {
|
||||
msg: ChatMessage
|
||||
}
|
||||
|
||||
const { msg } = defineProps<Props>()
|
||||
|
||||
/// actions 实现复制、分享、下载、点赞等功能
|
||||
const copyFileClick = () => {
|
||||
console.log('copy file', msg)
|
||||
}
|
||||
|
||||
const shareForwardClick = () => {
|
||||
console.log('share forward', msg)
|
||||
}
|
||||
|
||||
const downloadClick = () => {
|
||||
console.log('download', msg)
|
||||
}
|
||||
|
||||
const thumbUpClick = () => {
|
||||
console.log('thumb up', msg)
|
||||
}
|
||||
|
||||
const thumbDownClick = () => {
|
||||
console.log('thumb down', msg)
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user