diff --git a/src/components/AddressList/index.scss b/src/components/AddressList/index.scss index d2b9ee4..534bd40 100644 --- a/src/components/AddressList/index.scss +++ b/src/components/AddressList/index.scss @@ -11,7 +11,7 @@ } .address-list { width: 704px; - height: 156px; + // height: 156px; background: #ffffff; border-radius: 20px; box-shadow: 2px 4px 12px 0px rgba(0, 0, 0, 0.16); @@ -20,6 +20,7 @@ margin: 18px auto 0; border: 1px solid #ffffff; border: 1px solid rgba(0, 0, 0, 0.16); + position: relative; } .address-active { border: 1px solid #68b4ff; @@ -59,6 +60,13 @@ } .address-edit { padding: 10px; + position: absolute; + margin: auto; + top: 0; + right: 20px; + bottom: 0; + display: flex; + align-items: center; } .address-edit .icon-bianji { font-size: 40px; @@ -69,13 +77,13 @@ font-weight: 400; color: #3c3c3c; display: flex; - width: 100%; + width: 80%; } .address-list-info view { - max-width: 60%; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; + // max-width: 60%; + // text-overflow: ellipsis; + // overflow: hidden; + // white-space: nowrap; } .address-list-bottom { display: flex; diff --git a/src/components/AddressList/index.tsx b/src/components/AddressList/index.tsx index 5be6c9b..a53d2a2 100644 --- a/src/components/AddressList/index.tsx +++ b/src/components/AddressList/index.tsx @@ -94,20 +94,19 @@ const AddressList = (props: Params) => { handleDelete(item)} onClick={() => handleSelect(item, index)} className={`address-list ${focusId == item.id && 'address-active'}`}> {item.name} + {item.phone.replace(item.phone.substring(3, 7), '****')} { - item.is_default - ? 默认 - : {item.phone.replace(item.phone.substring(3, 7), '****')} + item.is_default && 默认 } - {item.province_name + item.city_name + item.district_name} + {item.province_name + item.city_name + item.district_name} {/* {item.address_detail} */} - { + {/* { item.is_default && {item.phone.replace(item.phone.substring(3, 7), '****')} - } + } */} e.stopPropagation()} url={`/pages/addressAdd/index?type=edit&id=${item.id}`} hoverClass="none" className="address-edit">