云际专区新闻区域样式调整

This commit is contained in:
jhnine 2024-01-29 11:19:02 +08:00
parent 492100f768
commit 857dabe4dd
2 changed files with 15 additions and 7 deletions

View File

@ -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>
)

View File

@ -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;
}
}
}