明梦爽
2022-01-25 546c0df2c7d278cb2a3e6fa6fc2ff730d410fdbd
src/components/page/zhengce.vue
@@ -13,13 +13,16 @@
        </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>
          <!-- 分页 -->
@@ -49,10 +52,10 @@
  },
  data() {
    return {
      cont: '',
      cont: '', //小标题变色
      menuList: [],
      newsList:[],
      pageSize:2,
      pageSize:5,
      currentPage:1,
      total:0,
      item:{},
@@ -66,14 +69,11 @@
  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 => {
@@ -107,6 +107,11 @@
        console.log(error);
      })
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      // this.currentPage = val
      this.getnews(this.item);
    },
    // 跳转到新闻展示页面
    show(item){
      // console.log(item.id);
@@ -118,7 +123,7 @@
<style lang="less" scoped>
ul {
  width: 200px;
  // width: 200px;
  li {
    background-color: rgb(242, 243, 245);
    height: 50px;
@@ -133,11 +138,11 @@
  color: #000;
}
.box-card{
  height: 600px;
  height: 500px;
  position: relative;
  .fenye{
    position: absolute;
    bottom: 2px;
    bottom: 10px;
  }
</style>