待写
1、 const Recommend: React.FC
- interface RecommendProps {
-
- shopId?: number,
-
- details: ItemType[],
-
- scroll?: boolean,
-
- ref?: any,
-
- onScrollToUpper?: (state: boolean) => void
-
- }
-
- const Recommend: React.FC<RecommendProps> = (props) => {
-
- const { details, scroll, shopId } = props
参考:
React+Typescript最佳实践_前端梦想家的博客-CSDN博客_react typescript (简洁,重要)