This commit is contained in:
parent
5d931ef310
commit
c549b93fd8
|
|
@ -110,9 +110,7 @@ export default function TopTabs({ data, activeIndex, setActiveIndex, className }
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={className}>
|
<div className={className} style={{position: 'relative'}}>
|
||||||
<div ref={containerRef} className={styles.topTabsTabs}
|
|
||||||
>
|
|
||||||
{canScrollLeft && (
|
{canScrollLeft && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
@ -123,6 +121,9 @@ export default function TopTabs({ data, activeIndex, setActiveIndex, className }
|
||||||
<LeftOutlined />
|
<LeftOutlined />
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
<div ref={containerRef} className={styles.topTabsTabs}
|
||||||
|
>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
ref={scrollRef}
|
ref={scrollRef}
|
||||||
className={`${styles.topTabsTabsScroll} ${shouldCenter ? styles.topTabsTabsScrollCenter : ''}`}
|
className={`${styles.topTabsTabsScroll} ${shouldCenter ? styles.topTabsTabsScrollCenter : ''}`}
|
||||||
|
|
@ -137,16 +138,7 @@ export default function TopTabs({ data, activeIndex, setActiveIndex, className }
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{canScrollRight && (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className={`${styles.topTabsNavBtn} ${styles.topTabsNavBtnRight}`}
|
|
||||||
onClick={handleScrollRight}
|
|
||||||
aria-label="向右滚动"
|
|
||||||
>
|
|
||||||
<RightOutlined />
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
<div
|
<div
|
||||||
className={styles.topTabsBottomLine}
|
className={styles.topTabsBottomLine}
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -158,6 +150,16 @@ export default function TopTabs({ data, activeIndex, setActiveIndex, className }
|
||||||
className={styles.topTabsBottomLineWhite}
|
className={styles.topTabsBottomLineWhite}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{canScrollRight && (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className={`${styles.topTabsNavBtn} ${styles.topTabsNavBtnRight}`}
|
||||||
|
onClick={handleScrollRight}
|
||||||
|
aria-label="向右滚动"
|
||||||
|
>
|
||||||
|
<RightOutlined />
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
line-height: 2.125rem;
|
line-height: 2.125rem;
|
||||||
/* border-bottom: .0625rem solid #D5D8DC; */
|
/* border-bottom: .0625rem solid #D5D8DC; */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
/* overflow: hidden; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.topTabsNavBtn {
|
.topTabsNavBtn {
|
||||||
|
|
@ -42,11 +42,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.topTabsNavBtnLeft {
|
.topTabsNavBtnLeft {
|
||||||
left: 0rem;
|
left: -80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topTabsNavBtnRight {
|
.topTabsNavBtnRight {
|
||||||
right: 0rem;
|
right: -80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topTabsTabsScroll {
|
.topTabsTabsScroll {
|
||||||
|
|
@ -54,7 +54,9 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
gap: 8.125rem;
|
padding: 0 20px;
|
||||||
|
gap: 70px;
|
||||||
|
/* gap: 8.125rem; */
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
@ -69,7 +71,7 @@
|
||||||
|
|
||||||
.topTabsTabsScrollCenter {
|
.topTabsTabsScrollCenter {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
/* gap: 130px; */
|
gap: 8.125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topTabsBottomLine {
|
.topTabsBottomLine {
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,8 @@ export default function Foundation() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Banner
|
<Banner
|
||||||
icon={banner?.icon && <img src={banner?.icon} alt="" style={{ width: '26rem', height: '8.375rem' }} />}
|
icon={banner?.icon && <img src={banner?.icon} alt="" style={{ width: '26rem', height: '8.375rem', marginLeft: "-60px" }} />}
|
||||||
subtitle={banner?.title ?? ""}
|
largedesc={banner?.title ?? ""}
|
||||||
content={(banner as BannerConfig)?.content}
|
content={(banner as BannerConfig)?.content}
|
||||||
titleSize={(banner as BannerConfig)?.titleSize ?? "medium"}
|
titleSize={(banner as BannerConfig)?.titleSize ?? "medium"}
|
||||||
backgroundImage={banner?.backgroundImage ?? "/images/bg-overview.png"}
|
backgroundImage={banner?.backgroundImage ?? "/images/bg-overview.png"}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue