@oinone/kunlun-vue-admin-base 6.2.4 → 6.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54758,7 +54758,7 @@ let FormM2OAddressFieldWidget = FormM2OAddressFieldWidget_1 = class FormM2OAddre
54758
54758
  this.change(currentValue);
54759
54759
  }
54760
54760
  $onSelectedChangeNext(currentValue, selectedNode) {
54761
- let nextAddressType;
54761
+ let nextAddressType = AddressTypeEnum.Street;
54762
54762
  while (selectedNode) {
54763
54763
  const targetValue = selectedNode.value.data;
54764
54764
  if (!targetValue) {
@@ -54797,16 +54797,41 @@ let FormM2OAddressFieldWidget = FormM2OAddressFieldWidget_1 = class FormM2OAddre
54797
54797
  }
54798
54798
  getResourceAddressValue(currentValue, type) {
54799
54799
  switch (type) {
54800
- case AddressTypeEnum.Country:
54801
- return { code: currentValue.countryCode, name: currentValue.countryName };
54802
- case AddressTypeEnum.Province:
54803
- return { code: currentValue.provinceCode, name: currentValue.provinceName };
54804
- case AddressTypeEnum.City:
54805
- return { code: currentValue.cityCode, name: currentValue.cityName };
54806
- case AddressTypeEnum.District:
54807
- return { code: currentValue.districtCode, name: currentValue.districtName };
54808
- case AddressTypeEnum.Street:
54809
- return { code: currentValue.streetCode, name: currentValue.streetName };
54800
+ case AddressTypeEnum.Country: {
54801
+ const { countryCode, countryName } = currentValue;
54802
+ if (countryCode && countryName) {
54803
+ return { code: countryCode, name: countryName };
54804
+ }
54805
+ return undefined;
54806
+ }
54807
+ case AddressTypeEnum.Province: {
54808
+ const { provinceCode, provinceName } = currentValue;
54809
+ if (provinceCode && provinceName) {
54810
+ return { code: provinceCode, name: provinceName };
54811
+ }
54812
+ return undefined;
54813
+ }
54814
+ case AddressTypeEnum.City: {
54815
+ const { cityCode, cityName } = currentValue;
54816
+ if (cityCode && cityName) {
54817
+ return { code: cityCode, name: cityName };
54818
+ }
54819
+ return undefined;
54820
+ }
54821
+ case AddressTypeEnum.District: {
54822
+ const { districtCode, districtName } = currentValue;
54823
+ if (districtCode && districtName) {
54824
+ return { code: districtCode, name: districtName };
54825
+ }
54826
+ return undefined;
54827
+ }
54828
+ case AddressTypeEnum.Street: {
54829
+ const { streetCode, streetName } = currentValue;
54830
+ if (streetCode && streetName) {
54831
+ return { code: streetCode, name: streetName };
54832
+ }
54833
+ return undefined;
54834
+ }
54810
54835
  default:
54811
54836
  console.error('Invalid region type.', type);
54812
54837
  return undefined;