You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

231 lines
6.4 KiB

<template>
<div>
<h-nav />
<div class="search-background">
<div class="d-flex">
<div class="flex-3 flex-wrap">
<span class="ins-title">技术领域</span>
<span
:class="item.isActive ? 'act-color' : ''"
v-for="(item, index) in list"
:key="index"
class="ins-name"
@click="choose(index)"
>
{{ item.name }}
</span>
</div>
</div>
</div>
<div class="inner d-flex flex-wrap">
<div class="pro-box" v-for="(item, index) in lists" :key="index" :class="(index + 1) % 4 === 0 ? 'margin-0' : ''">
<p class="pro-title">{{ item.title }}</p>
<p class="pro-content">{{ item.content }}</p>
<p class="pro-time">时间:{{ item.time }}</p>
<a-button class="pro-btn" type="primary">揭榜</a-button>
</div>
</div>
<div class="inner">
<a-pagination
:current="current"
:total="total"
:page-size="pageSize"
@change="onShowSizeChange"
class="pagination"
show-less-items
show-quick-jumper
/>
</div>
</div>
</template>
<script>
import HNav from './../components/HNav.vue';
export default {
name: 'Release',
components: { HNav },
data() {
return {
str: '发布界面',
current: 1,
pageSize: 8,
total: 10,
list: [
{
id: 1,
name: '功能食品',
isActive: false,
},
{
id: 2,
name: '生物医药',
isActive: false,
},
{
id: 3,
name: '大健康',
isActive: false,
},
],
lists: [
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
],
};
},
methods: {
choose(index) {
const that = this;
// that.achList = [];
const { list } = this;
list[index].isActive = !list[index].isActive;
this.list = [...list];
// for (let i = 0; i < list.length; i++) {
// if (list[i].isActive) {
// this.achList.push(list[i].id);
// }
// }
// this.setAchList(this.achList);
},
// 改变单当前页数
onShowSizeChange(current, size) {
this.current = current;
},
},
};
</script>
<style lang="stylus" scoped>
.search-background {
background: rgba(0, 0, 0, 0.02);
border: 1px solid rgba(0, 0, 0, 0.06);
height: auto;
padding: 0 20px;
width: 82%;
margin: 40px auto;
line-height: 44px;
}
.pagination {
margin: 40px 0;
text-align: right;
}
.ins-title {
font-size: 16px;
font-weight: bold;
color: rgba(0, 0, 0, 0.65);
}
.ins-name {
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
padding: 0 10px;
cursor: pointer;
}
.act-color {
color: #13ACC4 !important;
}
.margin-0 {
margin-right: 0% !important;
}
.pro-box {
width: 20.5%;
margin-right: 6%;
height: 300px;
background: #FFFFFF;
padding: 24px 20px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
position: relative;
margin-bottom: 20px;
opacity: 1;
}
.pro-title {
font-size: 24px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 31px;
color: rgba(0, 0, 0, 0.85);
opacity: 1;
}
.pro-content {
font-size: 16px;
overflow: hidden;
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 24px;
color: rgba(0, 0, 0, 0.65);
opacity: 1;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
}
.pro-time {
position: absolute;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 22px;
color: rgba(0, 0, 0, 0.45);
opacity: 1;
bottom: 60px;
}
.pro-btn {
position: absolute;
bottom: 24px;
width: 100px;
}
</style>