diff --git a/src/address-list/Item.tsx b/src/address-list/Item.tsx
index 1ac884c32..018fe455c 100644
--- a/src/address-list/Item.tsx
+++ b/src/address-list/Item.tsx
@@ -60,28 +60,36 @@ function AddressItem(
/>
);
- const genContent = () => {
+ function genTag() {
+ if (props.data.isDefault && props.defaultTagText) {
+ return (
+
+ {props.defaultTagText}
+
+ );
+ }
+ }
+
+ function genContent() {
const { data } = props;
const Info = [
{`${data.name} ${data.tel}`}
- {data.isDefault && props.defaultTagText && (
-
- {props.defaultTagText}
-
- )}
+ {genTag()}
,
{data.address}
];
- return switchable && !disabled ? (
-
- {Info}
-
- ) : (
- Info
- );
- };
+ if (switchable && !disabled) {
+ return (
+
+ {Info}
+
+ );
+ }
+
+ return Info;
+ }
return (
(AddressItem);
+export default createComponent(
+ AddressItem
+);
|