云际专区新闻区域样式调整
This commit is contained in:
parent
492100f768
commit
857dabe4dd
|
|
@ -110,7 +110,6 @@ function HeaderPageJCC(props){
|
|||
// 获取所有 tab节点
|
||||
let tabs = document.querySelectorAll('.zone_news .ant-tabs-tab')
|
||||
const tabIndex = idList.indexOf(Number(value))
|
||||
console.log('tabIndex',tabIndex)
|
||||
if(tabIndex !== -1 ){
|
||||
if(tabIndex !== idList.length -1){
|
||||
tabs[tabIndex + 1].click()
|
||||
|
|
@ -120,7 +119,6 @@ function HeaderPageJCC(props){
|
|||
}
|
||||
}
|
||||
function handleTabChange(key) {
|
||||
console.log('key',key)
|
||||
setTimeout(()=>{
|
||||
setActiveKey(key)
|
||||
},100)
|
||||
|
|
@ -174,12 +172,12 @@ function HeaderPageJCC(props){
|
|||
{
|
||||
newsList.map((i,k)=>{
|
||||
return(
|
||||
<Tabs.TabPane tab={i.name} key={i.id} onClick={() => { history.push(`/zone/${deptId}/newdetail/${i.id}`) }}>
|
||||
<Tabs.TabPane tab={i.name} key={i.id}>
|
||||
<div className='tab-content'>
|
||||
<div className='title'>{i.name}</div>
|
||||
<Link to={`/zone/${deptId}/newdetail/${i.id}`}><div className='title'>{i.name}</div>
|
||||
<p><img src={shijian} alt="" className="mr3 photo" />{i.publishTime}</p>
|
||||
<p className='new_desc'>{i.summary || '-'}</p>
|
||||
<img src={newsList[k].headImg || img1} alt="" height="250px" style={{width:"100%",objectFit:"cover"}}/>
|
||||
<img src={newsList[k].headImg || img1} alt="" height="260px" style={{width:"100%",objectFit:"cover"}}/></Link>
|
||||
</div>
|
||||
</Tabs.TabPane>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -120,9 +120,13 @@
|
|||
}
|
||||
.news_tab{
|
||||
color: #fff;
|
||||
height: 380px;
|
||||
.ant-tabs-bar{
|
||||
background-color: rgba(33, 84, 118, 0.5);
|
||||
}
|
||||
.ant-tabs-left-bar {
|
||||
border-right-color: transparent !important;
|
||||
}
|
||||
.ant-tabs-nav-container{
|
||||
font-size: 18px;
|
||||
}
|
||||
|
|
@ -137,6 +141,7 @@
|
|||
}
|
||||
.ant-tabs-left-content {
|
||||
padding-left: 100px;
|
||||
border-left-color: transparent !important;
|
||||
}
|
||||
.ant-tabs-tab-active{
|
||||
background-color: #04BBF7;
|
||||
|
|
@ -152,15 +157,19 @@
|
|||
color: white;
|
||||
}
|
||||
.tab-content{
|
||||
height: 20.2vw;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title{
|
||||
font-size: 20px;
|
||||
margin-bottom: 10px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
a:link, a:visited {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.new_desc{
|
||||
height: 48px;
|
||||
font-size: 15px;
|
||||
|
|
@ -170,6 +179,7 @@
|
|||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue