尝试修复闪动问题
This commit is contained in:
@@ -80,6 +80,7 @@
|
||||
.listPage {
|
||||
background-color: #FAFAFA;
|
||||
font-family: "PingFang SC";
|
||||
transition: padding-top 0.3s ease-in-out; // 添加过渡动画,让布局变化更平滑
|
||||
|
||||
.listTopSearchWrapper {
|
||||
padding: 0 15px;
|
||||
|
||||
@@ -30,7 +30,7 @@ const ListPage = () => {
|
||||
const { statusNavbarHeightInfo, getCurrentLocationInfo } =
|
||||
useGlobalState() || {};
|
||||
|
||||
const { totalHeight } = statusNavbarHeightInfo || {};
|
||||
const { totalHeight = 98 } = statusNavbarHeightInfo || {}; // 设置默认值,避免从0跳到实际值
|
||||
const {
|
||||
listPageState,
|
||||
loading,
|
||||
@@ -323,7 +323,7 @@ const ListPage = () => {
|
||||
// })
|
||||
// }, [])
|
||||
|
||||
const area_city = area.at(-2);
|
||||
const area_city = area?.at(-2) || "上海"; // 设置默认值,避免条件渲染的突然切换
|
||||
|
||||
function renderCityQrcode() {
|
||||
let item = cityQrCode.find((item) => item.city_name === area_city);
|
||||
|
||||
Reference in New Issue
Block a user