提交 91aa5bac authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 a7223678
...@@ -76,17 +76,11 @@ function handleTop(data: CourseListItemType) { ...@@ -76,17 +76,11 @@ function handleTop(data: CourseListItemType) {
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.12); box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.12);
border-radius: 6px; border-radius: 6px;
&:hover {
.course-item__top {
display: block;
}
}
&.is-active { &.is-active {
background: rgba(247, 248, 250, 1); background: rgba(247, 248, 250, 1);
} }
} }
.course-item__top { .course-item__top {
display: none;
position: absolute; position: absolute;
top: 5px; top: 5px;
right: 5px; right: 5px;
......
...@@ -76,12 +76,19 @@ function showInfo(title: string, content: string) { ...@@ -76,12 +76,19 @@ function showInfo(title: string, content: string) {
<li>{{ detail.credit }}学分</li> <li>{{ detail.credit }}学分</li>
<li v-if="detail.semester">{{ detail.semester.name }}</li> <li v-if="detail.semester">{{ detail.semester.name }}</li>
</ul> </ul>
<el-button round @click="showInfo('课程简介', detail.represent)">课程简介</el-button> <el-button round @click="showInfo('课程简介', detail.represent)" v-if="detail.represent">课程简介</el-button>
<el-button round @click="showInfo('预备知识', detail.previous_preparation)">预备知识</el-button> <el-button round @click="showInfo('预备知识', detail.previous_preparation)" v-if="detail.previous_preparation"
<el-button round @click="showInfo('授课目标', detail.target)">授课目标</el-button> >预备知识</el-button
>
<el-button round @click="showInfo('授课目标', detail.target)" v-if="detail.target">授课目标</el-button>
</div> </div>
<div class="course-lecturers" v-if="detail.lecturers?.length"> <div class="course-lecturers" v-if="detail.lecturers?.length">
<el-carousel :autoplay="false" indicator-position="none" arrow="always" height="126px"> <el-carousel
:autoplay="false"
indicator-position="none"
:arrow="detail.lecturers.length > 1 ? 'always' : 'never'"
height="126px"
>
<el-carousel-item v-for="item in detail.lecturers" :key="item.id" class="lecturer-item"> <el-carousel-item v-for="item in detail.lecturers" :key="item.id" class="lecturer-item">
<img :src="item.avatar" class="lecturer-item__pic" /> <img :src="item.avatar" class="lecturer-item__pic" />
<div class="lecturer-item__info"> <div class="lecturer-item__info">
......
...@@ -15,8 +15,7 @@ const form = reactive({ ...@@ -15,8 +15,7 @@ const form = reactive({
gender: 1 gender: 1
}) })
const rules = ref<FormRules>({ const rules = ref<FormRules>({
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }], real_name: [{ required: true, message: '请输入昵称', trigger: 'blur' }]
mobile: [{ required: true, message: '请输入手机号', trigger: 'blur' }]
}) })
onMounted(() => { onMounted(() => {
Object.assign(form, pick(userInfo, ['real_name', 'avatar', 'gender'])) Object.assign(form, pick(userInfo, ['real_name', 'avatar', 'gender']))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论