解决图片滚动问题

This commit is contained in:
al 2024-08-05 17:24:27 +08:00
parent fa57a4fddf
commit ec868c0d20
3 changed files with 12 additions and 4 deletions

View File

@ -84,6 +84,9 @@ export default function Search() {
autoFocus={true}
value={searchValue}
ref={inputRef}
style={{
"--font-size": "16px",
}}
onChange={(val) => {
setSearchValue((old) => {
let test = (e) => {

View File

@ -71,6 +71,11 @@ export default function Photos({
mediaDom.className = `${
photos[index]?.type == "hid" ? "mediaDom photos-body" : "mediaDom"
}`;
const bodyBox = document.getElementsByClassName("photos-bodyBox")[0];
setTimeout(() => {
bodyBox.firstChild.lastChild.style.transform=`translateX(-${index*(window.innerWidth+16)}px)`;
console.log(bodyBox.firstChild.lastChild.style.transform)
}, 600);
},
afterClose: () => {
mediaDom.remove();

View File

@ -25,7 +25,7 @@ export default function StreamerNavigator({
return (
<Mask visible={visible} onMaskClick={handleCloseMask}>
<div
className="fixed top-[12.5%] left-[12.5%] w-3/4 flex-1 justify-center items-center bg-[#00000080]"
className="fixed top-[20%] left-[12.5%] w-3/4 flex-1 justify-center items-center "
>
<div
@ -50,18 +50,18 @@ export default function StreamerNavigator({
</div>
</div>
<p className="text-sm text-[#FFFFFFB2] mt-1 truncate ">
{streamerInfo?.streamer_ext?.bio}
{!streamerInfo?.streamer_ext?.zones?.length ? streamerInfo?.streamer_ext?.bio:streamerInfo?.streamer_ext?.zones[0]?.profile}
</p>
<div
onClick={
streamerInfo?.streamer_ext?.zones?.length === 0
? () => {
handleCloseMask();
router.push("/profile/"+streamerInfo?.mid);
router.replace("/profile/"+streamerInfo?.streamer_ext?.mid);
}
: () => {
handleCloseMask();
router.push("/space/person_space_introduce/"+streamerInfo?.mid);
router.replace("/space/person_space_introduce/"+streamerInfo?.streamer_ext?.mid);
}
}
className="w-full p-2 mt-4 text-base rounded-full bg-[#FF669E] text-center"