|
@@ -41,31 +41,42 @@ export default defineComponent({
|
|
|
|
|
|
return () => (
|
|
|
<>
|
|
|
- <Cell
|
|
|
- class={styles.cell}
|
|
|
- is-link={props.isLink}
|
|
|
- onClick={() => selectAddress()}
|
|
|
- v-slots={{
|
|
|
- icon: () => <Icon name={iconAddress} size={19} />,
|
|
|
- title: () => (
|
|
|
- <div>
|
|
|
- <span class={styles.userName}>{props.item.name}</span>
|
|
|
- <span class={styles.phone}>
|
|
|
- {(props.item &&
|
|
|
- props.item.phoneNumber &&
|
|
|
- props.item.phoneNumber.replace(
|
|
|
- /^(\d{3})\d{4}(\d+)/,
|
|
|
- '$1****$2'
|
|
|
- )) ||
|
|
|
- '去填写收货地址'}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- ),
|
|
|
- label: () => (
|
|
|
- <span class={styles.addressInfo}>{addressInfo.value}</span>
|
|
|
- )
|
|
|
- }}
|
|
|
- ></Cell>
|
|
|
+ {props.item && props.item.phoneNumber ? (
|
|
|
+ <Cell
|
|
|
+ class={styles.cell}
|
|
|
+ is-link={props.isLink}
|
|
|
+ onClick={() => selectAddress()}
|
|
|
+ v-slots={{
|
|
|
+ icon: () => <Icon name={iconAddress} size={19} />,
|
|
|
+ title: () => (
|
|
|
+ <div>
|
|
|
+ <span class={styles.userName}>{props.item.name}</span>
|
|
|
+ <span class={styles.phone}>
|
|
|
+ {(props.item &&
|
|
|
+ props.item.phoneNumber &&
|
|
|
+ props.item.phoneNumber.replace(
|
|
|
+ /^(\d{3})\d{4}(\d+)/,
|
|
|
+ '$1****$2'
|
|
|
+ ))}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ ),
|
|
|
+ label: () => (
|
|
|
+ <span class={styles.addressInfo}>{addressInfo.value}</span>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ ></Cell>
|
|
|
+ ) : (
|
|
|
+ <Cell
|
|
|
+ class={styles.cell}
|
|
|
+ is-link={props.isLink}
|
|
|
+ onClick={() => selectAddress()}
|
|
|
+ v-slots={{
|
|
|
+ icon: () => <Icon name={iconAddress} size={19} />,
|
|
|
+ title: () => <div class={styles.emtry}>去填写收货地址</div>
|
|
|
+ }}
|
|
|
+ ></Cell>
|
|
|
+ )}
|
|
|
</>
|
|
|
)
|
|
|
}
|