未验证 提交 8923e116 编写于 作者: Y yangxiaolu1993 提交者: GitHub

fix: 修复 address 组件无法设置标题 (#622)

上级 f75dd5ab
......@@ -58,15 +58,15 @@ const defaultProps = {
modelValue: false,
modelSelect: [],
type: 'custom',
customAddressTitle: '请选择所在地区',
customAddressTitle: '',
province: [],
city: [],
country: [],
town: [],
isShowCustomAddress: true,
existAddress: [],
existAddressTitle: '配送至',
customAndExistTitle: '选择其他地址',
existAddressTitle: '',
customAndExistTitle: '',
height: '200px',
defaultIcon: 'location2',
selectedIcon: 'Check',
......@@ -233,8 +233,8 @@ export const Address: FunctionComponent<
<div className={b('header__title')}>
{privateType === 'custom'
? locale.address.selectRegion || customAddressTitle
: locale.address.deliveryTo || existAddressTitle}
? customAddressTitle || locale.address.selectRegion
: existAddressTitle || locale.address.deliveryTo}
</div>
<div onClick={() => handClose()}>
......@@ -305,7 +305,7 @@ export const Address: FunctionComponent<
defaultIcon={defaultIcon}
isShowCustomAddress={isShowCustomAddress}
customAndExistTitle={
locale.address.chooseAnotherAddress || customAndExistTitle
customAndExistTitle || locale.address.chooseAnotherAddress
}
onSelected={selectedExist}
onSwitchModule={onSwitchModule}
......
......@@ -58,15 +58,15 @@ const defaultProps = {
modelValue: false,
modelSelect: [],
type: 'custom',
customAddressTitle: '请选择所在地区',
customAddressTitle: '',
province: [],
city: [],
country: [],
town: [],
isShowCustomAddress: true,
existAddress: [],
existAddressTitle: '配送至',
customAndExistTitle: '选择其他地址',
existAddressTitle: '',
customAndExistTitle: '',
height: '200px',
defaultIcon: 'location2',
selectedIcon: 'Check',
......@@ -233,8 +233,8 @@ export const Address: FunctionComponent<
<div className={b('header__title')}>
{privateType === 'custom'
? locale.address.selectRegion || customAddressTitle
: locale.address.deliveryTo || existAddressTitle}
? customAddressTitle || locale.address.selectRegion
: existAddressTitle || locale.address.deliveryTo}
</div>
<div onClick={() => handClose()}>
......@@ -305,7 +305,7 @@ export const Address: FunctionComponent<
defaultIcon={defaultIcon}
isShowCustomAddress={isShowCustomAddress}
customAndExistTitle={
locale.address.chooseAnotherAddress || customAndExistTitle
customAndExistTitle || locale.address.chooseAnotherAddress
}
onSelected={selectedExist}
onSwitchModule={onSwitchModule}
......
......@@ -27,7 +27,7 @@ const defaultProps = {
defaultIcon: 'location2',
selectedIcon: 'Check',
isShowCustomAddress: true,
customAndExistTitle: '选择其他地址',
customAndExistTitle: '',
} as ExistRenderProps
export const ExistRender: FunctionComponent<
......@@ -122,7 +122,7 @@ export const ExistRender: FunctionComponent<
{isShowCustomAddress && (
<div className={b('choose-other')} onClick={switchModule}>
<div className={b('choose-other-btn')}>
{locale.address.chooseAnotherAddress || customAndExistTitle}
{customAndExistTitle || locale.address.chooseAnotherAddress}
</div>
</div>
)}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册