import Taro from "@tarojs/taro"; import { View } from "@tarojs/components"; import { IProps } from "../../../@types/card.d"; import { BG_COLOR_LIST } from "../../lib/model"; import ClText from "../text"; import { classNames } from "../../lib"; import "./index.scss"; export default function ClCard(props: IProps) { const typeClassName = props.type === "full" ? "no-card" : ""; const colorClassName = props.bgColor ? BG_COLOR_LIST[props.bgColor] : "bg-white"; return ( {props.title && props.title.text ? ( ) : ( "" )} {this.props.renderTitle} {this.props.children} ); } ClCard.options = { addGlobalClass: true }; ClCard.defaultProps = { type: "card", bgColor: "white", shadow: true, active: false, title: {} } as IProps;