地址组件优化
This commit is contained in:
parent
4cfec8308d
commit
f3e4b68448
@ -26,7 +26,7 @@
|
||||
width: 100px;
|
||||
height: 2px;
|
||||
border-radius: 50px;
|
||||
background-color:$color_font_two;
|
||||
background-color:$color_main;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@ -48,6 +48,7 @@
|
||||
}
|
||||
.address_iconfont{
|
||||
font-size: 30px !important;
|
||||
color: $color_main;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import Taro from "@tarojs/taro";
|
||||
import { GetAddressListApi } from "@/api/addressList";
|
||||
import { alert } from "@/common/common";
|
||||
|
||||
|
||||
type DefaultValueParm = {name?: string, id?:string|number}
|
||||
@ -153,7 +154,7 @@ export default memo(({
|
||||
addressOnClose?.()
|
||||
addressOnSelect?.(selectArr)
|
||||
} else {
|
||||
Taro.showToast({title:'请选择完整地址',icon:'none'})
|
||||
alert.error("请选择完整地址");
|
||||
}
|
||||
} else {
|
||||
addressOnClose?.()
|
||||
@ -208,7 +209,7 @@ export default memo(({
|
||||
return (
|
||||
<View onClick={() => selectItem(item)} className={classnames(styles.address_list_item, {[styles.addresst_select]:(selectId == item.id)})}>
|
||||
<View className={styles.address_list_item_name}>{item.name}</View>
|
||||
{(selectId == item.id)&&<View className={`iconfont icon-a-tick1 ${styles.address_iconfont}` }></View>}
|
||||
{(selectArr[selectIndex]?.id == item.id)&&<View className={`iconfont icon-tick ${styles.address_iconfont}` }></View>}
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
|
@ -123,7 +123,7 @@ export default ()=>{
|
||||
<Button style={{"background": hozon?'#007aff':''}} hoverClass="none" className={`add-address-save`} onClick={handleSave}>
|
||||
保存
|
||||
</Button>
|
||||
<Address addressOnSelect={handleSetSite} defaultValue={formData.siteArray} addressOnClose={()=>setShowSiteModal(false)} show={showSiteModal}/>
|
||||
<Address addressOnSelect={handleSetSite} defaultValue={[ {name: "广东省", id: 193}, {name: "佛山市", id: 202}, {name: "高明区", id: 204}]} addressOnClose={()=>setShowSiteModal(false)} show={showSiteModal}/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user