import React from "react"; import { StyleSheet, Dimensions } from "react-native"; import { Card, Text, Button, Layout, Avatar, } from "@ui-kitten/components"; import { useModel } from "flooks"; const {width} = Dimensions.get("window"); const styles = StyleSheet.create({ card: { width: (width - 35) / 2, }, layout: { // flexDirection: "row", }, avatar: { width: (width - 35) / 2, height: (width - 35) / 2, }, main: { padding: 6, }, butContent: { marginLeft: 6, }, fontColor: { color: "#B5B5B5", }, price: { marginTop: 5, }, sub: { marginTop: 2, }, remove: { minHeight: 33, minWidth: 33, position: "absolute", right: 11, bottom: 4, }, }); export default function GoodsCard(props) { const { remove } = useModel("wordsModel"); const { info,removeEvent } = props; const { id, img, name, totalSales, discountAmount, amount } = info || {}; return ( {id ? ( {name} 月售 {' '} {totalSales} ¥ {discountAmount} {" "} ¥ {amount} ) : ( )} ); }