提交 1318a542 authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 4de6f667
<script setup lang="ts">
interface Props {
src?: string
}
const props = defineProps<Props>()
const currentUrl = $computed(() => {
return props.src || 'https://webapp-pub.ezijing.com/website/base/images/avatar.svg'
})
</script>
<template>
<img :src="currentUrl" />
</template>
<style scoped>
img {
width: 100%;
height: 100%;
object-fit: cover;
}
</style>
<script setup lang="ts">
import type { DiscussInfo, DiscussCommentItem } from '../types'
import { ChatLineRound } from '@element-plus/icons-vue'
import Avatar from '@/components/Avatar.vue'
interface Props {
info: DiscussInfo
......@@ -16,7 +17,7 @@ defineEmits<{
<div class="discuss-item">
<div class="discuss-box">
<div class="discuss-box-user">
<div class="discuss-box-user__avatar"><img :src="info.created_operator_avatar" /></div>
<div class="discuss-box-user__avatar"><Avatar :src="info.created_operator_avatar" /></div>
<div class="discuss-box-user__content">
<h3>{{ info.student_id_name }}</h3>
<p>{{ info.created_time }}</p>
......@@ -32,7 +33,7 @@ defineEmits<{
</div>
<div class="discuss-comment" v-for="item in list" :key="item.id">
<div class="discuss-comment__avatar">
<img :src="item.sso_id_avatar" />
<Avatar :src="item.sso_id_avatar" />
</div>
<div class="discuss-comment-content">
<span class="discuss-comment__username">{{ item.sso_id_name }}</span
......
......@@ -10,7 +10,7 @@ defineProps<Props>()
<div class="list-item">
<div class="list-item-pic">
<router-link :to="`/admin/lab/video/${data.id}`" target="_blank">
<img :src="data.cover" />
<el-image :src="data.cover" fit="cover" />
<el-icon><VideoPlay /></el-icon>
</router-link>
</div>
......@@ -64,10 +64,9 @@ defineProps<Props>()
.list-item-pic {
position: relative;
height: 185px;
img {
.el-image {
width: 100%;
height: 100%;
object-fit: cover;
}
.el-icon {
display: none;
......
<script setup lang="ts">
import type { ExperimentDiscussType } from '../types'
import { ChatLineRound } from '@element-plus/icons-vue'
import Avatar from '@/components/Avatar.vue'
const DiscussCommentPublish = defineAsyncComponent(() => import('./DiscussCommentPublish.vue'))
......@@ -19,7 +20,7 @@ const commentVisible = $ref(false)
<div class="discuss-item">
<div class="discuss-box">
<div class="discuss-box-user">
<div class="discuss-box-user__avatar"><img :src="data.sso_user.avatar" /></div>
<div class="discuss-box-user__avatar"><Avatar :src="data.sso_user.avatar" /></div>
<div class="discuss-box-user__content">
<h3>{{ data.sso_user.real_name || data.sso_user.nickname || data.sso_user.username }}</h3>
<p>{{ data.created_time }}</p>
......@@ -40,7 +41,7 @@ const commentVisible = $ref(false)
<DiscussCommentPublish :data="data" @update="$emit('update')"></DiscussCommentPublish>
<div class="discuss-comment" v-for="item in data.replies" :key="item.id">
<div class="discuss-comment__avatar">
<img :src="item.sso_user.avatar" />
<Avatar :src="item.sso_user.avatar" />
</div>
<div class="discuss-comment-content">
<span class="discuss-comment__username">{{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论