|
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react";
|
|
|
import { FC } from "@tarojs/taro";
|
|
|
import { AtFloatLayout, AtInput, AtTabs, AtTabsPane } from "taro-ui";
|
|
|
import { AtFloatLayoutProps } from "taro-ui/types/float-layout";
|
|
|
-import { View } from "@tarojs/components";
|
|
|
+import { ScrollView, View } from "@tarojs/components";
|
|
|
import { CITY_LIST, SIGHT_LIST } from "../../constants";
|
|
|
import { debounce } from "../../../../utils";
|
|
|
import { getSignListApi } from "../../../../api";
|
|
@@ -97,28 +97,30 @@ export const SearchLayout: FC<SearchLayoutProps> = (props) => {
|
|
|
|
|
|
return (
|
|
|
<AtTabsPane current={curTab} index={item.id}>
|
|
|
- {_list.length
|
|
|
- ? _list.map((subItem) => (
|
|
|
- <View
|
|
|
- key={subItem.id}
|
|
|
- className="search-tab__item"
|
|
|
- onClick={props.openDetail.bind(undefined, subItem)}
|
|
|
- >
|
|
|
- <View className="search-tab__item-inner">
|
|
|
- <View className="search-tab__item-inner__label">
|
|
|
- {subItem.name}
|
|
|
+ <ScrollView scrollY className="search-tab__scroll">
|
|
|
+ {_list.length
|
|
|
+ ? _list.map((subItem) => (
|
|
|
+ <View
|
|
|
+ key={subItem.id}
|
|
|
+ className="search-tab__item"
|
|
|
+ onClick={props.openDetail.bind(undefined, subItem)}
|
|
|
+ >
|
|
|
+ <View className="search-tab__item-inner">
|
|
|
+ <View className="search-tab__item-inner__label">
|
|
|
+ {subItem.name}
|
|
|
+ </View>
|
|
|
+ <View className="limit-line">
|
|
|
+ {subItem.description.slice(0, 50)}
|
|
|
+ </View>
|
|
|
</View>
|
|
|
- <View className="limit-line">
|
|
|
- {subItem.description.slice(0, 50)}
|
|
|
- </View>
|
|
|
- </View>
|
|
|
|
|
|
- <View className="search-tab__item__more" />
|
|
|
- </View>
|
|
|
- ))
|
|
|
- : !loading && (
|
|
|
- <View className="search-tab__nomore">暂无内容</View>
|
|
|
- )}
|
|
|
+ <View className="search-tab__item__more" />
|
|
|
+ </View>
|
|
|
+ ))
|
|
|
+ : !loading && (
|
|
|
+ <View className="search-tab__nomore">暂无内容</View>
|
|
|
+ )}
|
|
|
+ </ScrollView>
|
|
|
</AtTabsPane>
|
|
|
);
|
|
|
})}
|