| | |
| | | </ul> |
| | | </el-col> |
| | | <el-card class="box-card"> |
| | | <el-col :span="18"> |
| | | <p class="name">{{this.cont}}</p> |
| | | <hr class="namehr"> |
| | | <el-col :span="24"> |
| | | <div> |
| | | <el-row class="marb10" :key="index" v-for="(item, index) in newsList"> |
| | | <div class="flex-v flex-between marb5 cursor" @click="show(item)"> |
| | | <div>{{ item.title }}</div> |
| | | <div>{{ item.releaseTime }}</div> |
| | | </div> |
| | | <el-divider class="hr"></el-divider> |
| | | </el-row> |
| | | </div> |
| | | <!-- 分页 --> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | cont: '', |
| | | cont: '', //小标题变色 |
| | | menuList: [], |
| | | newsList:[], |
| | | pageSize:2, |
| | | pageSize:5, |
| | | currentPage:1, |
| | | total:0, |
| | | item:{}, |
| | |
| | | watch: { |
| | | menuList(n,o){ |
| | | this.cont = this.menuList[0].name; |
| | | this.item = this.menuList[0]; |
| | | this.getnews(this.menuList[0]); |
| | | } |
| | | }, |
| | | methods: { |
| | | handleCurrentChange(val) { |
| | | console.log(`当前页: ${val}`); |
| | | this.getnews(this.item); |
| | | }, |
| | | getTitle(){ |
| | | const data = Number(this.$route.query.id); |
| | | getMinTitle(data).then(res => { |
| | |
| | | console.log(error); |
| | | }) |
| | | }, |
| | | handleCurrentChange(val) { |
| | | console.log(`当前页: ${val}`); |
| | | // this.currentPage = val |
| | | this.getnews(this.item); |
| | | }, |
| | | // 跳转到新闻展示页面 |
| | | show(item){ |
| | | // console.log(item.id); |
| | |
| | | |
| | | <style lang="less" scoped> |
| | | ul { |
| | | width: 200px; |
| | | // width: 200px; |
| | | li { |
| | | background-color: rgb(242, 243, 245); |
| | | height: 50px; |
| | |
| | | color: #000; |
| | | } |
| | | .box-card{ |
| | | height: 600px; |
| | | height: 500px; |
| | | position: relative; |
| | | .fenye{ |
| | | position: absolute; |
| | | bottom: 2px; |
| | | bottom: 10px; |
| | | } |
| | | } |
| | | </style> |