Commit a9624d26 by pangchong

feat: 调整

parent 5e412241
......@@ -5,25 +5,21 @@
</div>
<div class="flex flex-col flex-auto" :class="{ 'items-end': isSelf }">
<div class="mx-2 mb-1">
<span class="mb-2 inline-block text-theme-text1" v-if="!isSelf">孙婉茹</span>
<p class="text-theme-text3">2024-03-04 05:10:45</p>
<span class="mb-2 inline-block text-theme-text1" v-if="!isSelf">{{ data.fromName || '' }}</span>
<p class="text-theme-text3">{{ data.sendTime || '' }}</p>
</div>
<!-- 聊天信息 -->
<template v-if="type == 'text'">
<div :class="{ 'bg-primary-hover': isSelf, 'bg-theme-bg3': !isSelf }" class="p-4 rounded leading-[22px] text-theme-text1">字节跳动的核心产品头条(“头条号”)是中国及全球的内容平台</div>
<div :class="{ 'bg-primary-hover': isSelf, 'bg-theme-bg3': !isSelf }" class="p-4 rounded leading-[22px] text-theme-text1">{{ data.message || '' }}</div>
</template>
<template v-else-if="type == 'image'">
<a-image
width="100%"
:height="160"
src="https://s3-alpha-sig.figma.com/img/0541/c168/c14a6d7b205f6fbd37f935f30aa16eed?Expires=1714953600&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=VxIHNdXoU14s4dxHDN433j7lQXZZ61vQW5uON0q5Xk9fs3YTOcEKj0wqTVwjmaDz7g6z4Gaavwdlngrp-lYGch8delQHP5YbqTzO9Q5r657B7f-smrvBC7AAvkdhkq3i6FxCw0~EQCxnYW5o-NPV4417Qp9BN0~gbXt~eUQ5sMY2wzKg8ihGbWWKjjgnVpOZnKMMlUx6X-VBUd5aQYP9Rpy7liwvvDyNcZsl5FSa1GKnsaaNxyfdQj8Ug4vu3EDr~tsqlqqDmR0a7laXSnQz5YHHpVcAef54s7iTnV2qswtrsPyeInoADfQgHviRr-sNLVFPyQf0cVfRdjyVZm5YvA__"
></a-image>
<a-image width="100%" :height="160" :src="data.src"></a-image>
</template>
<template v-else-if="type == 'pdf'">
<div :class="{ 'bg-primary-hover': isSelf, 'bg-theme-bg3': !isSelf }" class="py-[10px] px-3 rounded flex-center justify-between leading-[22px] text-theme-text1 w-full">
<div class="flex-center">
<global-icon icon="file"></global-icon>
<span class="ml-3">可携带文件格式.pdf</span>
<span class="ml-3">{{ (data.fileName || '') + '.pdf' }}</span>
</div>
<global-icon icon="download" class="cursor-pointer"></global-icon>
</div>
......@@ -39,10 +35,12 @@
interface Props {
isSelf?: boolean
type?: 'text' | 'image' | 'pdf' | 'video'
data?: any
}
const ps = withDefaults(defineProps<Props>(), {
isSelf: false,
type: 'text'
type: 'text',
data: {}
})
</script>
<style lang="less" scoped></style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment