Commit 9cfa93d3 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复切换配送方式,地址丢失的问题

parent ad3caed1
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-18 15:30:22
* @LastEditTime: 2021-01-21 13:39:26
* @Description: 换货收货地址
*/
import React from 'react';
......@@ -145,6 +145,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
if (isEdit) {
linkage.show('shippingAddress');
linkage.hide('pickupAddress');
linkage.value('shippingAddress', undefined);
} else {
linkage.hide('*(shippingAddress,pickupAddress)');
linkage.show('shippingAddressShow');
......@@ -156,6 +157,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
if (isEdit) {
linkage.hide('shippingAddress');
linkage.show('pickupAddress');
linkage.value('pickupAddress', undefined);
} else {
setFieldState('shippingAddressShow', fieldState => {
fieldState.title = '换货自提地址'
......@@ -168,6 +170,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
// 无需物流
case 3: {
linkage.hide('*(shippingAddress,pickupAddress)');
linkage.value('*(shippingAddress,pickupAddress)', undefined);
break;
};
default:
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-09 15:56:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-18 15:34:24
* @LastEditTime: 2021-01-21 13:40:28
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -25,6 +25,7 @@ export const schema: ISchema = {
type: 'string',
enum: DELIVERY_TYPE_ENUM,
'x-component-props': {
placeholder: '请选择',
style: {
width: '80%',
},
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 17:22:07
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-08 11:27:55
* @LastEditTime: 2021-01-21 13:41:41
* @Description:
*/
import React, { useState } from 'react';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment