mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(Card): use tsx (#8067)
This commit is contained in:
parent
3712dac079
commit
25966bcf51
@ -66,9 +66,9 @@ export default createComponent({
|
|||||||
return (
|
return (
|
||||||
<Image
|
<Image
|
||||||
src={props.thumb}
|
src={props.thumb}
|
||||||
|
fit="cover"
|
||||||
width="100%"
|
width="100%"
|
||||||
height="100%"
|
height="100%"
|
||||||
fit="cover"
|
|
||||||
lazyLoad={props.lazyLoad}
|
lazyLoad={props.lazyLoad}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@ -95,14 +95,13 @@ export default createComponent({
|
|||||||
if (slots.desc) {
|
if (slots.desc) {
|
||||||
return slots.desc();
|
return slots.desc();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.desc) {
|
if (props.desc) {
|
||||||
return <div class={[bem('desc'), 'van-ellipsis']}>{props.desc}</div>;
|
return <div class={[bem('desc'), 'van-ellipsis']}>{props.desc}</div>;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderPriceText = () => {
|
const renderPriceText = () => {
|
||||||
const priceArr = props.price.toString().split('.');
|
const priceArr = props.price!.toString().split('.');
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<span class={bem('price-currency')}>{props.currency}</span>
|
<span class={bem('price-currency')}>{props.currency}</span>
|
Loading…
x
Reference in New Issue
Block a user