明梦爽
2022-03-03 40dd36a940f53dc57115483d069dd27d87b8cb1f
src/components/page/News.vue
@@ -3,10 +3,10 @@
    <!-- <p>{{ this.$route.query.id }}</p> -->
    <div class="header">
      <h2>{{ title }}</h2>
      <p>发布日期:{{ releaseTime }} 点击量:[ {{hits}} ]</p>
      <p>发布日期:{{ releaseTime }} 点击量:[ {{(hits+1)/2}} ]</p>
    </div>
    <hr>
    <div v-html="content"></div>
    <div v-html="content" class="ql-editor"></div>
  </div>
</template>
<script>
@@ -22,9 +22,8 @@
    }
  },
  created(){
    console.log(">>>>>>>>",this.$route.query.id);
    // console.log(">>>>>>>>",this.$route.query.id);
    this.getalone();
    // this.queryAll();
  },
  methods:{
    getalone(){
@@ -37,25 +36,33 @@
        this.title = res.data.title;
      })
    },
    // queryAll(){
    //   this.content = ``
    // }
  },
}
</script>
<style>
h2{
.box {
  width: 1200px;
  margin: 0 auto;
}
.header h2{
  color: rgb(3, 73, 144);
  text-align: center;
}
p{
.header p{
  background-color: rgb(246, 246, 246);
  text-align: center;
  height: 35px;
  line-height: 35px;
}
.box {
  width: 1200px;
  margin: 0 auto;
.ql-editor{
  padding: 12px 0px !important;
}
.ql-editor p{
  letter-spacing: 1px;
  line-height: 25px;
}
.ql-editor img{
  width: 600px;
  height: 400px;
}
</style>