clay commit : header icon
This commit is contained in:
22
README.md
22
README.md
@@ -29,4 +29,24 @@ npm install --registry=https://registry.npm.taobao.org
|
||||
### 启动服务
|
||||
```
|
||||
npm run dev
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1. title上间距太大,更紧凑一点
|
||||
2. 通知公告调整到4个, 第4个永远写死
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
11
src/main.js
11
src/main.js
@@ -9,6 +9,17 @@ import 'element-ui/lib/theme-chalk/display.css';
|
||||
import en from 'element-ui/lib/locale/lang/en'
|
||||
import cn from 'element-ui/lib/locale/lang/zh-CN'
|
||||
|
||||
//要添加的代码
|
||||
router.beforeEach((to, from, next) => {
|
||||
// chrome
|
||||
document.body.scrollTop = 0
|
||||
// firefox
|
||||
document.documentElement.scrollTop = 0
|
||||
// safari
|
||||
window.pageYOffset = 0
|
||||
next()
|
||||
})
|
||||
|
||||
i18n.mergeLocaleMessage('en', en)
|
||||
i18n.mergeLocaleMessage('zh', cn)
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="tw_context_title" @click="getContext(item)">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div v-if="item.description" class="tw_context_text">{{item.description}}</div>
|
||||
<div v-if="item.description" class="tw_context_text">{{ item.description }}</div>
|
||||
<div v-if="!item.description" class="tw_context_text" v-html="item.content"></div>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -55,18 +55,18 @@
|
||||
|
||||
<el-row>
|
||||
<el-col class="pagination_p">
|
||||
<el-pagination v-if="!small"
|
||||
:small="!small"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page.sync="listData.pageNum"
|
||||
:page-sizes="[10,20, 30, 50, 100]"
|
||||
layout="prev, pager,next,sizes, jumper"
|
||||
:total="listData.total">
|
||||
<el-pagination v-if="!small"
|
||||
:small="!small"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page.sync="listData.pageNum"
|
||||
:page-size="listData.pageSize"
|
||||
:page-sizes="[5,10,20, 30, 50, 100]"
|
||||
layout="prev, pager,next,sizes, jumper"
|
||||
:total="listData.total">
|
||||
</el-pagination>
|
||||
<el-pagination v-if="small"
|
||||
:small="small"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page.sync="listData.pageNum"
|
||||
layout="prev ,pager,next"
|
||||
@@ -90,21 +90,21 @@ export default {
|
||||
return {
|
||||
data: [],
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 5,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listData : this.list,
|
||||
listData: this.list,
|
||||
width: document.documentElement.clientWidth,
|
||||
small: document.documentElement.clientWidth <= 992,
|
||||
query: '',
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
list(val){
|
||||
watch: {
|
||||
list(val) {
|
||||
this.listData = val
|
||||
}
|
||||
},
|
||||
@@ -123,7 +123,7 @@ export default {
|
||||
} else {
|
||||
routeData = this.$router.resolve({path: "/pc/" + this.listData.secondId + router});
|
||||
}
|
||||
window.open(routeData.href,"_blank")
|
||||
window.open(routeData.href, "_blank")
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
console.log(`每页 ${val} 条`);
|
||||
@@ -288,6 +288,7 @@ export default {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
.query {
|
||||
//margin: 1rem 0;
|
||||
z-index: 50;
|
||||
|
||||
@@ -214,8 +214,8 @@ export default {
|
||||
text-align: left;
|
||||
background: linear-gradient(240deg, rgba(0, 75, 177, 0) 0%, rgba(6, 79, 175, 0.64) 44%, #0A51AE 100%);
|
||||
padding-left: 1.9rem;
|
||||
margin-top: 5rem;
|
||||
margin-bottom: 5rem;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.sciences_content {
|
||||
|
||||
@@ -104,8 +104,8 @@ export default {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 6.3rem;
|
||||
padding-bottom: 5.6rem;
|
||||
padding-top: 2rem;
|
||||
padding-bottom: 2rem;
|
||||
|
||||
.line_left {
|
||||
line-height: 4.4rem;
|
||||
|
||||
@@ -158,7 +158,8 @@ export default {
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
//width: 100%;
|
||||
height: 61rem;
|
||||
//height: 61rem;
|
||||
padding-bottom: 2rem;
|
||||
|
||||
.headline {
|
||||
display: flex;
|
||||
@@ -180,7 +181,7 @@ export default {
|
||||
text-align: left;
|
||||
background: linear-gradient(240deg, rgba(0, 75, 177, 0) 0%, rgba(6, 79, 175, 0.64) 44%, #0A51AE 100%);
|
||||
padding-left: 1.9rem;
|
||||
margin-top: 6.3rem;
|
||||
margin-top: 2rem;
|
||||
|
||||
.vertica_line {
|
||||
width: .1rem;
|
||||
@@ -208,7 +209,7 @@ export default {
|
||||
.more {
|
||||
display: flex;
|
||||
height: 3.7rem;
|
||||
margin-top: 9.8rem;
|
||||
margin-top: 4rem;
|
||||
cursor: pointer;
|
||||
|
||||
.more_text {
|
||||
|
||||
@@ -92,8 +92,8 @@ export default {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 6.3rem;
|
||||
padding-bottom: 4.4rem;
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 2rem;
|
||||
|
||||
.line_left {
|
||||
line-height: 4.4rem;
|
||||
|
||||
@@ -164,8 +164,8 @@ export default {
|
||||
&_bgc {
|
||||
background-color: #fff;
|
||||
//height: 33.8rem;
|
||||
margin-top: 8.1rem;
|
||||
margin-bottom: 5rem;
|
||||
margin-top: 3rem;
|
||||
margin-bottom: 3rem;
|
||||
border-radius: 36px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user