小程序页面优化
CI / verify (pull_request) Has been cancelled

This commit is contained in:
2026-07-23 14:03:22 +08:00
parent d11757c854
commit 6479365d6a
5 changed files with 250 additions and 238 deletions
@@ -7,10 +7,11 @@ type CouponBadgeProps = {
/** Taro 友好版权益角标(对齐 shared-ui CouponBadge */
export default function CouponBadge({ amount, label = '好客权益' }: CouponBadgeProps) {
const n = Number(amount);
const display = Number.isFinite(n) ? (Number.isInteger(n) ? String(n) : n.toFixed(0)) : String(amount);
return (
<Text className="coupon-badge">
¥{amount}
{label}
¥{display} {label}
</Text>
);
}
@@ -26,6 +26,7 @@ export default function PageShell({
'page-shell',
`page-shell--${variant}`,
hasFixedFooter ? 'page-shell--fixed-footer' : '',
variant === 'tab' && process.env.TARO_ENV === 'weapp' ? 'page-shell--native-tabbar' : '',
className,
]
.filter(Boolean)