clay commit : 解决有三级菜单时面包屑问题

This commit is contained in:
clay
2022-10-09 22:21:21 +08:00
parent b533dddb3f
commit d1215780d3
6 changed files with 66 additions and 32 deletions

View File

@@ -153,14 +153,26 @@ export default {
let time = new Date(date);
let year = time.getFullYear();
let month = time.getMonth() + 1
if (month < 10){
month = "0"+month
}
let day = time.getDate();
if (day<10){
day = "0"+ day
}
return year + "-" + month + "-" + day;
},
getMonthTime(date) {
let time = new Date(date);
let month = time.getMonth() + 1
if (month < 10){
month = "0"+month
}
let day = time.getDate();
if (day<10){
day = "0"+ day
}
return month + "-" + day;
},
},

View File

@@ -81,7 +81,13 @@ export default {
let time = new Date(date);
let year = time.getFullYear();
let month = time.getMonth() + 1
if (month < 10){
month = "0"+month
}
let day = time.getDate();
if (day<10){
day = "0"+ day
}
return year + "-" + month + "-" + day;
},
},
@@ -318,7 +324,6 @@ export default {
}
.time {
width: 6rem;
height: 1.4rem;
font-size: 1rem;
font-weight: 500;

View File

@@ -9,12 +9,13 @@
<span>{{ $t("message.undergraduate_education") }}</span>
</div>
<div class="vline">
<div class="undergraduate_content" v-for="(item,index) in undergraduateData" :key="index" @click="getArticle(item)">
<div class="undergraduate_content" v-for="(item,index) in undergraduateData" :key="index"
@click="getArticle(item)">
<div class="undergraduate_content_time">
{{getMonthTime(item.publishTime)}}
{{ getMonthTime(item.publishTime) }}
</div>
<div class="undergraduate_content_text">
{{item.title}}
{{ item.title }}
</div>
</div>
<div class="more" @click="lookMore('KW_T7dJ2lt5sC-RJZSnPtk0')">
@@ -25,15 +26,17 @@
</el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="graduate headline">
<img class="graduate_img" src="../../../assets/index/undergraduate_and_graduate/boshimaobeifen.png" alt=""/>
<img class="graduate_img" src="../../../assets/index/undergraduate_and_graduate/boshimaobeifen.png"
alt=""/>
<span>{{ $t("message.postgraduate_education") }}</span>
</div>
<div class="undergraduate_content" v-for="(item,index) in graduateData" :key="index" @click="getArticle(item)">
<div class="undergraduate_content" v-for="(item,index) in graduateData" :key="index"
@click="getArticle(item)">
<div class="undergraduate_content_time">
{{getMonthTime(item.publishTime)}}
{{ getMonthTime(item.publishTime) }}
</div>
<div class="undergraduate_content_text">
{{item.title}}
{{ item.title }}
</div>
</div>
<div class="more" @click="lookMore('1yaM_T4qiBsFULvLXHbMflQ')">
@@ -54,10 +57,10 @@ import {lookMoreFixedComment} from "../../../utils/sist";
export default {
name: "undergraduate_and_graduate",
data(){
return{
undergraduateData:[],
graduateData:[],
data() {
return {
undergraduateData: [],
graduateData: [],
width: document.documentElement.clientWidth > 992
}
},
@@ -97,18 +100,16 @@ export default {
});
},
getDateTime(date) {
let time = new Date(date);
let year = time.getFullYear();
let month = time.getMonth() + 1
let day = time.getDate();
return year + "-" + month + "-" + day;
},
getMonthTime(date) {
let time = new Date(date);
let month = time.getMonth() + 1
if (month < 10) {
month = "0" + month
}
let day = time.getDate();
if (day < 10) {
day = "0" + day
}
return month + "-" + day;
},
},
@@ -118,9 +119,10 @@ export default {
<style scoped lang="scss">
.undergraduate_content{
.undergraduate_content {
cursor: pointer;
}
@media screen and (max-width: 960px) {
.undergraduate {
border-radius: 36px 36px 0 0 !important;
@@ -129,12 +131,13 @@ export default {
border-radius: 36px 36px 0 0 !important;
}
.more {
justify-content: center!important;
justify-content: center !important;
}
.vline {
border-right: none!important;
border-right: none !important;
}
}
@media screen and (max-width: 768px) {
.undergraduate {
border-radius: 36px 36px 0 0 !important;
@@ -143,11 +146,11 @@ export default {
border-radius: 36px 36px 0 0 !important;
}
.more {
justify-content: center!important;
justify-content: center !important;
}
.vline {
border-right: none!important;
border-right: none !important;
}
}
@@ -193,10 +196,12 @@ export default {
.undergraduate {
border-radius: 36px 0 0 0;
&_img{
&_img {
width: 3.1rem;
height: 3.3rem;
}
&_content {
display: flex;
margin-bottom: 1.5rem;
@@ -259,7 +264,8 @@ export default {
.graduate {
border-radius: 0 36px 0 0;
&_img{
&_img {
width: 4.3rem;
height: 3.3rem;
}