优化滚动
This commit is contained in:
@@ -10,7 +10,7 @@ export type AddressInfoParam = {
|
||||
city_name: string,
|
||||
district_name: string,
|
||||
address_detail: string,
|
||||
id: number,
|
||||
id?: number,
|
||||
name: string,
|
||||
phone: string
|
||||
}
|
||||
|
||||
@@ -5,9 +5,11 @@ import classnames from "classnames";
|
||||
import styles from './index.module.scss'
|
||||
type Param = {
|
||||
style?: Object,
|
||||
number?: number
|
||||
number?: number,
|
||||
title?: string,
|
||||
status?: true|false, //true 加大加深
|
||||
}
|
||||
export default memo(({style, number = 0}:Param) => {
|
||||
export default memo(({style, number = 0, status = true, title = ''}:Param) => {
|
||||
const priceDom = useCallback(() => {
|
||||
let res = number.toFixed(2).split('.')
|
||||
let int_num = parseInt(res[0]) + ''
|
||||
@@ -21,40 +23,16 @@ export default memo(({style, number = 0}:Param) => {
|
||||
)
|
||||
}, [number])
|
||||
return (
|
||||
<>
|
||||
<>
|
||||
<View className={styles.order_price}>
|
||||
<View className={styles.order_price_text}>
|
||||
<Text>合计金额</Text>
|
||||
<View className={classnames(styles.order_price_text, status&&styles.emphasis)}>
|
||||
<Text>{title}</Text>
|
||||
<View className={styles.iconfont_msg}>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-zhushi')}></Text>
|
||||
{/* <View className={classnames(styles.message)}>123123123121212312312312312</View> */}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.order_price_num} style={style}>
|
||||
{priceDom()}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.order_price}>
|
||||
<View className={styles.order_price_text}>
|
||||
<Text>空差优惠</Text>
|
||||
<View className={styles.iconfont_msg}>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-zhushi')}></Text>
|
||||
{/* <View className={classnames(styles.message)}>123123123121212312312312312</View> */}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.order_price_num} style={style}>
|
||||
{priceDom()}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.order_price}>
|
||||
<View className={classnames(styles.order_price_text, styles.emphasis)}>
|
||||
<Text>应付金额</Text>
|
||||
<View className={styles.iconfont_msg}>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-zhushi')}></Text>
|
||||
{/* <View className={classnames(styles.message)}>123123123121212312312312312</View> */}
|
||||
</View>
|
||||
</View>
|
||||
<View className={classnames(styles.order_price_num, styles.emphasis_num)} style={style}>
|
||||
<View className={classnames(styles.order_price_num, status&&styles.emphasis_num)} style={style}>
|
||||
{priceDom()}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -64,7 +64,7 @@ export default memo(({value}:{value:OrderParam|null}) => {
|
||||
})
|
||||
}
|
||||
<View className={styles.order_estimated_amount}>
|
||||
<EstimatedAmount number={formatPriceDiv(value?.estimate_amount)}/>
|
||||
<EstimatedAmount number={formatPriceDiv(value?.estimate_amount)} title="预估金额" />
|
||||
</View>
|
||||
</View>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user