|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div id="news">
|
|
|
+ <div id="chengguo">
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="news">
|
|
|
<el-col :span="24" class="topTit">
|
|
@@ -11,19 +11,14 @@
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="newsMain">
|
|
|
- <!-- <el-col :span="14" class="block">
|
|
|
- <el-carousel ref="shubiao">
|
|
|
- <el-carousel-item v-for="(item, index) in newsList" :key="index" :name="`${index}`">
|
|
|
- <el-link :underline="false" ><img :src="item.picurl" class="newsList" /></el-link>
|
|
|
- </el-carousel-item>
|
|
|
- </el-carousel>
|
|
|
- </el-col> -->
|
|
|
- <el-col :span="24" class="newsLi">
|
|
|
- <ul>
|
|
|
- <li v-for="(tag, index) in newsList" :key="index" :type="tag.type" @click="$router.push({ path: '/detail', params:{id:tag.id} })">
|
|
|
- <el-link :underline="false" class="newsListTit" >{{ tag.title }}</el-link>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <el-col class="chengguolist" :span="24" v-for="(tag, index) in newslist" :key="index" :type="tag.type"
|
|
|
+ @click="$router.push({ path: '/detail', params:{id:tag.id} })">
|
|
|
+ <el-col :span="20">
|
|
|
+ {{tag.title}}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" style="text-align:right;">
|
|
|
+ {{tag.time}}
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -33,76 +28,41 @@
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
- name: 'news',
|
|
|
+ name: 'chengguo',
|
|
|
props: {
|
|
|
- // newsList:null,
|
|
|
- // title: null,
|
|
|
+ newslist: null,
|
|
|
},
|
|
|
components: {},
|
|
|
data: () => ({
|
|
|
- borderColor:'#850000',
|
|
|
- Color:'#850000',
|
|
|
- title:"最近新闻",
|
|
|
- newsList:[],
|
|
|
+ borderColor: '#850000',
|
|
|
+ Color: '#850000',
|
|
|
+ title: '新闻动态'
|
|
|
}),
|
|
|
created() {
|
|
|
- this.testList();
|
|
|
},
|
|
|
computed: {},
|
|
|
- methods: {
|
|
|
- testList() {
|
|
|
- let arr = [];
|
|
|
- for (let index = 0; index < 8; index++){
|
|
|
- arr.push({title:`测试标题${index+1}`});
|
|
|
- }
|
|
|
- this.$set(this, `newsList`, arr);
|
|
|
- },
|
|
|
- },
|
|
|
+ methods: {},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-ul {
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
-}
|
|
|
-li {
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
- list-style: none;
|
|
|
+.news {
|
|
|
+ padding: 10px;
|
|
|
}
|
|
|
-.news{
|
|
|
- padding:10px;
|
|
|
+.topTit {
|
|
|
+ border-bottom: 1px solid #ccc;
|
|
|
}
|
|
|
-.topTit{
|
|
|
- border-bottom:1px solid #ccc;
|
|
|
-}
|
|
|
-.topTit span{
|
|
|
+.topTit span {
|
|
|
display: inline-block;
|
|
|
height: 30px;
|
|
|
- border-bottom:1px solid transparent;
|
|
|
-}
|
|
|
-.newsMain{
|
|
|
- padding:5px 0;
|
|
|
-}
|
|
|
-.block{
|
|
|
- height:250px;
|
|
|
-}
|
|
|
-.newsList{
|
|
|
- height:250px;
|
|
|
-}
|
|
|
-.newsLi ul li{
|
|
|
- padding:9px;
|
|
|
- border-bottom:1px dashed #ccc;
|
|
|
- margin:1px;
|
|
|
+ border-bottom: 1px solid transparent;
|
|
|
}
|
|
|
-.newsListTit{
|
|
|
- color:#606266;
|
|
|
+.chengguolist {
|
|
|
+ padding: 10px 0;
|
|
|
+ border-bottom: 1px dashed #ccc;
|
|
|
+ margin: 1px;
|
|
|
}
|
|
|
-/deep/.newsListTit .el-link--inner{
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- width:270px;
|
|
|
+.newsMain {
|
|
|
+ padding: 5px 0;
|
|
|
}
|
|
|
</style>
|