Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-04-29 09:36:54 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
12d6b5a0baa7ed0d7f3756f924640797d8fdd79e
12d6b5a0
1 parent
2fe5436b
✨ feat(作品详情页): 返回逻辑调整
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
src/views/client/videoDetail.vue
src/views/client/videoDetailComment.vue
src/views/client/videoDetail.vue
View file @
12d6b5a
...
...
@@ -19,7 +19,8 @@
<div class="video-main">
<van-row>
<van-col span="24" style="padding-top: 0.2rem;">
<van-tabs sticky v-model:active="active" @click-tab="onClickTab" color="#F9D95C" background="#F7F7F7" title-active-color="#222222" title-inactive-color="#777777">
<van-tabs sticky v-model:active="active" @click-tab="onClickTab" color="#F9D95C" background="#F7F7F7"
title-active-color="#222222" title-inactive-color="#777777">
<van-tab title="简介" :title-style="tabClass">
<div class="intro"> 瑟日古娜小朋友是一名来自呼和浩特市新城区蒙古族幼儿园,六岁的蒙古族小姑娘,小姑娘用纯正的蒙古族语言生动形象的演绎了逃家小兔的活泼机灵,以及兔子妈妈的深情。 </div>
</van-tab>
...
...
@@ -37,7 +38,7 @@
<script setup>
import VideoDetail from '@/components/VideoDetail/index.vue'
import { ref, reactive, onMounted } from 'vue'
import { ref, reactive, onMounted
, watch
} from 'vue'
import { useRoute, useRouter } from 'vue-router'
import axios from '@/utils/axios';
import $ from 'jquery'
...
...
@@ -79,6 +80,12 @@ const active = ref(0); // index 0 为简介,1 为留言
const onClickTab = ({ title }) => {
console.warn(title);
};
// 监听路由变化
watch(() => $route.path, (v) => {
if (v === '/client/videoDetail') { // 返回详情主页面的时候激活第一个选中项
active.value = 0;
}
})
const tabClass = {
fontSize: '1rem'
...
...
@@ -113,23 +120,30 @@ export default {
<style lang="less" scoped>
.video-detail-page {
background-color: #FFFFFF;
.detail-header {
padding: 1rem;
.name-info {
color: #222222;
font-size: 1.15rem;
}
.other-info {
color: #999999;
}
}
.video-player {
height: auto;
}
.video-main {
height: auto;
.intro {
padding: 1rem; color: #333333;
padding: 1rem;
color: #333333;
}
}
}
...
...
src/views/client/videoDetailComment.vue
View file @
12d6b5a
...
...
@@ -125,7 +125,7 @@ const closeNotice = () => { // 关闭提示框回调
path: '/client/bookDetail'
});
}
const flag =
fals
e; // 后台接口判断是否上传过作品
const flag =
tru
e; // 后台接口判断是否上传过作品
// 实际调试时,点击回复需要判断是否上传过作品
const setComment = (v, type) => { // 回复/评论
if (flag) {
...
...
Please
register
or
login
to post a comment