Skip to content

Commit

Permalink
feat: 修正ES Build错误
Browse files Browse the repository at this point in the history
  • Loading branch information
liguobao committed Feb 28, 2024
1 parent 650ec35 commit b8b84a9
Show file tree
Hide file tree
Showing 4 changed files with 445 additions and 372 deletions.
108 changes: 53 additions & 55 deletions House-Map.newUI/src/components/house-card.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import React, { FC } from 'react'
import { Card } from '@arco-design/web-react';
import { isMobile } from '../utils/base';
import { FC } from "react";
import { Card } from "@arco-design/web-react";
import { isMobile } from "../utils/base";
const { Meta } = Card;
const mobile=isMobile()
interface houseCardProps{
className?:string,
pictures?:string[],
price?:string,
title?:string,
publishDate?:string
const mobile = isMobile();
interface HouseCardProps {
className?: string;
pictures?: string[];
price?: string;
title?: string;
publishDate?: string;
}
const houseCard: FC = (props:houseCardProps) => {
const HouseCard: FC<HouseCardProps> = (props: HouseCardProps) => {
return (
<>
{/* <Card
{/* <Card
className={props.className}
key={props.id}>
<CardMedia
Expand All @@ -32,53 +32,51 @@ const houseCard: FC = (props:houseCardProps) => {
{props.publishDate}
</Typography>
</Card> */}
<Card
className={props.className}
hoverable
cover={
<div style={{ height: 150}}>
<img
style={{ width: '100%',height:'100%',objectFit: 'fill'}}
alt='暂无图片'
src={props.pictures[0]}
/>
</div>
}
>
<Meta
title={
<div style={{fontSize:'20px'}}>
{props.price=='-1'?'暂无':props.price}
<Card
className={props.className}
hoverable
cover={
<div style={{ height: 150 }}>
<img
style={{ width: "100%", height: "100%", objectFit: "fill" }}
alt="暂无图片"
src={props && props.pictures && props.pictures[0]}
/>
</div>
}
description=
{
<p
style={mobile ? {
margin: '5px auto',
// whiteSpace: 'nowrap',
// overflow: 'hidden',
// textOverflow: 'ellipsis'
} : {
margin: '5px auto',
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis'
}}>
{props.title}
</p>
>
<Meta
title={
<div style={{ fontSize: "20px" }}>
{props.price == "-1" ? "暂无" : props.price}
</div>
}
avatar={
<p style={{marginTop:'-10px'}}>
{props.publishDate}
description={
<p
style={
mobile
? {
margin: "5px auto",
// whiteSpace: 'nowrap',
// overflow: 'hidden',
// textOverflow: 'ellipsis'
}
: {
margin: "5px auto",
whiteSpace: "nowrap",
overflow: "hidden",
textOverflow: "ellipsis",
}
}
>
{props.title}
</p>

}
/>
</Card>
avatar={<p style={{ marginTop: "-10px" }}>{props.publishDate}</p>}
/>
</Card>
</>
)
}
);
};

export default houseCard
export default HouseCard;
Loading

0 comments on commit b8b84a9

Please sign in to comment.