Commit 1ad54ef8 by yanju

首页加载更多

parent 65c65c28
......@@ -14,7 +14,7 @@
<yun-div :font-style="[24,32,500,'#999','left']">换一换</yun-div>
</yun-div>
<slot></slot>
<yun-div :show-ske="false" width-v="100%" :font-style="[24,104,500,'#999','center']" bg-color-v="#fff">
<yun-div v-if="showMore" :show-ske="false" width-v="100%" :font-style="[24,104,500,'#999','center']" bg-color-v="#fff">
<span v-tap="handleMore">加载更多</span>
</yun-div>
<yun-div :width-v="750" :height-v="24"></yun-div>
......@@ -28,11 +28,15 @@ export default {
mixins: [commonMixin],
methods: {
handleMore() {
console.log(2);
this.$emit('getMore',1)
}
},
props:{
title:String,
showMore:{
default:false,
type:Boolean,
}
}
}
......
......@@ -6,26 +6,37 @@
<banner :linkArr="linkArr" :imgArr="imgArr" ></banner>
<container-card
title="项目推荐"
:showMore="true"
@getMore="changeRoute1(routesObject.project.index)"
>
<project-card v-for="val in projectList" :key="val.projectId" :info="val" ></project-card>
</container-card>
<container-card
title="最新资讯"
:showMore="true"
@getMore="changeRoute1(routesObject.news.index)"
>
<project-card v-for="val in newsList" :key="val.contentId" :info="val" ></project-card>
</container-card>
<container-card
title="社区精英"
>
<user-card-x v-for="val in elitesList" :key="val.userId" :info="val"></user-card-x>
</container-card>
<container-card
title="精选博文"
:showMore="true"
@getMore="changeRoute1(routesObject.blog.index)"
>
<project-card v-for="val in blogList" :key="val.blogId" :info="val" ></project-card>
</container-card>
<container-card
title="推荐问答"
:showMore="true"
@getMore="changeRoute1(routesObject.answer.index)"
>
<answer-card v-for="val in answerList" :key="val.questionId" :info="val"></answer-card>
</container-card>
......@@ -41,7 +52,10 @@ import containerCard from '../components/moblie/containerCard';
import answerCard from '../components/moblie/answerCard';
import userCardX from '../components/moblie/userCardX'
import config from "../action/config";
import commonMixin from "../components/moblie/commonMixin";
export default {
mixins:[commonMixin],
components: {
projectCard,YunButton,banner,containerCard,answerCard,userCardX
},
......
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