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

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

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