去掉滚动折叠
This commit is contained in:
@@ -8,19 +8,22 @@ interface IProps {
|
||||
errorImg?: string;
|
||||
btnText?: string;
|
||||
btnImg?: string;
|
||||
height?: string
|
||||
wrapperHeight?: string;
|
||||
width?: string;
|
||||
height?: string;
|
||||
}
|
||||
|
||||
const ListLoadError = (props: IProps) => {
|
||||
const { reload, text, errorImg, btnText, btnImg, height = "unset" } = props;
|
||||
const { reload, text, errorImg, btnText, btnImg, wrapperHeight="", width = "", height = "" } = props;
|
||||
const handleReload = () => {
|
||||
reload && typeof reload === "function" && reload();
|
||||
};
|
||||
|
||||
return (
|
||||
<View className={styles.listLoadError} style={{ height }}>
|
||||
<View className={styles.listLoadError} style={{height: wrapperHeight}}>
|
||||
<Image
|
||||
className={styles.listLoadErrorImg}
|
||||
style={{ width, height }}
|
||||
src={errorImg ? img[errorImg] : img.ICON_LIST_LOAD_ERROR}
|
||||
/>
|
||||
{text && <Text className={styles.listLoadErrorText}>{text}</Text>}
|
||||
|
||||
@@ -50,6 +50,7 @@ export default {
|
||||
ICON_LIST_LOAD_ERROR: require('@/static/list/icon-load-error.svg'),
|
||||
ICON_LIST_RELOAD: require('@/static/list/icon-reload.svg'),
|
||||
ICON_LIST_EMPTY: require('@/static/emptyStatus/publish-empty.png'),
|
||||
ICON_LIST_EMPTY_CARD: require('@/static/emptyStatus/publish-empty-card.png'),
|
||||
ICON_LIST_SEARCH_SEARCH: require('@/static/search/icon-search.svg'),
|
||||
ICON_LIST_SEARCH_BACK: require('@/static/search/icon-back.svg'),
|
||||
ICON_LIST_SEARCH_CLEAR: require('@/static/search/icon-search-clear.svg'),
|
||||
|
||||
@@ -29,6 +29,8 @@ const ListContainer = (props) => {
|
||||
collapse = false,
|
||||
defaultShowNum,
|
||||
evaluateFlag,
|
||||
listLoadErrorWrapperHeight,
|
||||
listLoadErrorWidth,
|
||||
listLoadErrorHeight,
|
||||
} = props;
|
||||
const timerRef = useRef<NodeJS.Timeout | null>(null);
|
||||
@@ -163,6 +165,8 @@ const ListContainer = (props) => {
|
||||
btnText={btnText}
|
||||
btnImg={btnImg}
|
||||
text={emptyText || "暂无数据"}
|
||||
wrapperHeight={listLoadErrorWrapperHeight || ""}
|
||||
width={listLoadErrorWidth || ""}
|
||||
height={listLoadErrorHeight || ""}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
// MyselfPageContent 组件使用的类名
|
||||
.myselfPageContentMain {
|
||||
min-height: calc(100vh + 5px);
|
||||
// min-height: calc(100vh + 5px);
|
||||
animation: backgroundGradient 0s ease-in-out forwards;
|
||||
z-index: 5;
|
||||
flex: 1;
|
||||
|
||||
@@ -144,13 +144,13 @@ const MyselfPageContent: React.FC = () => {
|
||||
setActiveTab(tab);
|
||||
};
|
||||
|
||||
const handleScroll = (event: any) => {
|
||||
const scrollData = event.detail;
|
||||
setCollapseProfile(scrollData.scrollTop > 1);
|
||||
};
|
||||
// const handleScroll = (event: any) => {
|
||||
// const scrollData = event.detail;
|
||||
// setCollapseProfile(scrollData.scrollTop > 1);
|
||||
// };
|
||||
|
||||
return (
|
||||
<ScrollView scrollY className={styles.myselfPage} onScroll={handleScroll}>
|
||||
<ScrollView scrollY className={styles.myselfPage}>
|
||||
<View
|
||||
className={styles.myselfPageContentMain}
|
||||
style={{ paddingTop: `${totalHeight}px` }}
|
||||
@@ -225,8 +225,8 @@ const MyselfPageContent: React.FC = () => {
|
||||
recommendList={[]}
|
||||
loading={loading}
|
||||
error={null}
|
||||
errorImg="ICON_LIST_EMPTY"
|
||||
emptyText="暂未发布球局"
|
||||
errorImg="ICON_LIST_EMPTY_CARD"
|
||||
emptyText="还没有发布过球局"
|
||||
btnText="去发布"
|
||||
btnImg="ICON_ADD"
|
||||
reload={goPublish}
|
||||
@@ -234,7 +234,9 @@ const MyselfPageContent: React.FC = () => {
|
||||
loadMoreMatches={() => {}}
|
||||
collapse={true}
|
||||
style={{ paddingBottom: 0, overflow: "hidden" }}
|
||||
listLoadErrorHeight="320px"
|
||||
listLoadErrorWrapperHeight="267px"
|
||||
listLoadErrorWidth="100%"
|
||||
listLoadErrorHeight="152px"
|
||||
defaultShowNum={3}
|
||||
/>
|
||||
</ScrollView>
|
||||
@@ -248,12 +250,14 @@ const MyselfPageContent: React.FC = () => {
|
||||
recommendList={[]}
|
||||
loading={loading}
|
||||
error={null}
|
||||
errorImg="ICON_LIST_EMPTY"
|
||||
errorImg="ICON_LIST_EMPTY_CARD"
|
||||
isShowNoData={ended_game_records.length === 0}
|
||||
loadMoreMatches={() => {}}
|
||||
collapse={true}
|
||||
style={{ paddingBottom: "90px", overflow: "hidden" }}
|
||||
listLoadErrorHeight="320px"
|
||||
listLoadErrorWrapperHeight="220px"
|
||||
listLoadErrorWidth="100%"
|
||||
listLoadErrorHeight="152px"
|
||||
defaultShowNum={3}
|
||||
/>
|
||||
</ScrollView>
|
||||
|
||||
BIN
src/static/emptyStatus/publish-empty-card.png
Normal file
BIN
src/static/emptyStatus/publish-empty-card.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 142 KiB |
@@ -68,7 +68,7 @@
|
||||
|
||||
// 主要内容区域
|
||||
.other_main_content {
|
||||
min-height: calc(100vh + 5px);
|
||||
// min-height: calc(100vh + 5px);
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
flex: 1;
|
||||
|
||||
@@ -237,7 +237,7 @@ const OtherUserPage: React.FC = () => {
|
||||
// };
|
||||
|
||||
return (
|
||||
<ScrollView scrollY className="other_user_page" onScroll={handleScroll}>
|
||||
<ScrollView scrollY className="other_user_page">
|
||||
{/* <CustomNavbar>
|
||||
<View className="navbar_content">
|
||||
<View className="navbar_back" onClick={() => Taro.navigateBack()}>
|
||||
@@ -301,12 +301,14 @@ const OtherUserPage: React.FC = () => {
|
||||
loading={loading}
|
||||
error={null}
|
||||
isShowNoData={game_records.length === 0}
|
||||
errorImg="ICON_LIST_EMPTY"
|
||||
errorImg="ICON_LIST_EMPTY_CARD"
|
||||
emptyText="暂无球局信息"
|
||||
loadMoreMatches={() => { }}
|
||||
collapse={true}
|
||||
style={{ paddingBottom: 0, overflow: "hidden" }}
|
||||
listLoadErrorHeight="320px"
|
||||
listLoadErrorWrapperHeight="267px"
|
||||
listLoadErrorWidth="100%"
|
||||
listLoadErrorHeight="152px"
|
||||
defaultShowNum={3}
|
||||
/>
|
||||
</ScrollView>
|
||||
@@ -342,12 +344,14 @@ const OtherUserPage: React.FC = () => {
|
||||
loading={loading}
|
||||
error={null}
|
||||
isShowNoData={ended_game_records.length === 0}
|
||||
errorImg="ICON_LIST_EMPTY"
|
||||
errorImg="ICON_LIST_EMPTY_CARD"
|
||||
emptyText="暂无球局信息"
|
||||
loadMoreMatches={() => { }}
|
||||
collapse={true}
|
||||
style={{ paddingBottom: "90px", overflow: "hidden" }}
|
||||
listLoadErrorHeight="320px"
|
||||
listLoadErrorWrapperHeight="220px"
|
||||
listLoadErrorWidth="100%"
|
||||
listLoadErrorHeight="152px"
|
||||
defaultShowNum={3}
|
||||
/>
|
||||
</ScrollView>
|
||||
|
||||
Reference in New Issue
Block a user