/* * @Description: * @Autor: 24 * @Date: 2021-12-06 13:43:14 * @LastEditors: lanzhisheng * @LastEditTime: 2022-04-08 16:17:34 */ import React, { FC } from "react"; import { View, Text } from "@tarojs/components"; const poolType = { // 2-跟股池,3-交易池,4-精选池 2: "跟踪池", 3: "交易池", 4: "精选池", }; type Props = { dataItem: any; onClick: any; updateSelfStock: any; type: number; }; const SearchContentItem: FC = (props) => { const { dataItem, onClick, updateSelfStock, type } = props; if (!dataItem) return null; return ( onClick(dataItem)}> {dataItem.secuAbbr} {dataItem.industryName} {dataItem.secuCode} {type === 2 && ( 股票池状态:{" "} {poolType[dataItem["inPool"]]} )} {type === 1 && ( { updateSelfStock(dataItem); }} > {dataItem?.isSelfStock ? "取消自选" : "加自选"} )} ); }; export default SearchContentItem;