easy3wui 1.5.89-beta11 → 1.5.89-beta13
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.
|
@@ -683,7 +683,7 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
683
683
|
var strValue = value;
|
|
684
684
|
value = _comonConfig.dataDesensitizationFlag ? dataDesensitizationEyeFlag ? value : (0, _easy3wui.Easy3wGetDesensitization)(value) : value;
|
|
685
685
|
if (fieldType === 'mobile' && value) {
|
|
686
|
-
var e3wMobileNation = _this.fetchMobileInfo(strValue, fieldId);
|
|
686
|
+
var e3wMobileNation = _this.fetchMobileInfo(strValue, fieldId) || '+86';
|
|
687
687
|
value = e3wMobileNation ? e3wMobileNation + ' ' + value : value;
|
|
688
688
|
// console.log('valuevaluevaluevalue', value, e3wMobileNation);
|
|
689
689
|
}
|
|
@@ -1657,7 +1657,8 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
1657
1657
|
required = item.required,
|
|
1658
1658
|
_item$cmptPros4 = item.cmptPros,
|
|
1659
1659
|
cmptPros = _item$cmptPros4 === undefined ? {} : _item$cmptPros4,
|
|
1660
|
-
value = item.value
|
|
1660
|
+
value = item.value,
|
|
1661
|
+
readFlag = item.readFlag;
|
|
1661
1662
|
var disabled = cmptPros.disabled;
|
|
1662
1663
|
|
|
1663
1664
|
var addonBeforeCmptPros = item.addonBeforeCmptPros || {};
|
|
@@ -1671,18 +1672,18 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
1671
1672
|
disabled: disabled
|
|
1672
1673
|
}, addonBeforeCmptPros)
|
|
1673
1674
|
});
|
|
1674
|
-
var strMobileAssociation = '
|
|
1675
|
+
var strMobileAssociation = '';
|
|
1675
1676
|
if (value) {
|
|
1676
|
-
strMobileAssociation = _this.fetchMobileInfo(value, fieldId);
|
|
1677
|
+
strMobileAssociation = _this.fetchMobileInfo(value, fieldId) || '+86';
|
|
1677
1678
|
// value = e3wMobileNation ? `${e3wMobileNation} ${value}` : value;
|
|
1678
1679
|
// console.log('valuevaluevaluevalue', value, e3wMobileNation);
|
|
1679
1680
|
}
|
|
1680
1681
|
var decoratorObj = {
|
|
1681
1682
|
rules: [{ required: required, message: '请选择区号' }],
|
|
1682
|
-
initialValue: strMobileAssociation
|
|
1683
|
+
initialValue: readFlag ? 'easy3wView' : strMobileAssociation
|
|
1683
1684
|
};
|
|
1684
1685
|
return _react2['default'].createElement(_input2['default'], (0, _extends3['default'])({
|
|
1685
|
-
addonBefore: _this.props.form.getFieldDecorator(fieldId + 'AddonBefore', (0, _extends3['default'])({}, decoratorObj))(itemArea),
|
|
1686
|
+
addonBefore: _this.props.form.getFieldDecorator(readFlag ? fieldId + 'AddonBeforeEasy3wView' : fieldId + 'AddonBefore', (0, _extends3['default'])({}, decoratorObj))(itemArea),
|
|
1686
1687
|
onBlur: function onBlur(e) {
|
|
1687
1688
|
return _this.onBlurMobile(e, fieldId);
|
|
1688
1689
|
}
|
|
@@ -1713,6 +1714,7 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
1713
1714
|
xhr.send(data); // 发送请求
|
|
1714
1715
|
}
|
|
1715
1716
|
}, _this.fetchMobileInfo = function (value, fieldId) {
|
|
1717
|
+
var e3wMobileNation = void 0;
|
|
1716
1718
|
if (_comonConfig.easy3w4fMobileLibFetchUrl) {
|
|
1717
1719
|
// 同步请求,直接返回查询到的 e3wMobileNation(而非 Promise)
|
|
1718
1720
|
var cacheKey = fieldId + '-' + value;
|
|
@@ -1720,7 +1722,6 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
1720
1722
|
// 已查询过,直接返回缓存结果
|
|
1721
1723
|
return _this[cacheKey];
|
|
1722
1724
|
}
|
|
1723
|
-
var e3wMobileNation = void 0;
|
|
1724
1725
|
var xhr = new XMLHttpRequest();
|
|
1725
1726
|
xhr.open('POST', _comonConfig.easy3w4fMobileLibFetchUrl, false); // 同步请求
|
|
1726
1727
|
xhr.setRequestHeader('Content-Type', 'application/json'); // 设置请求头
|
|
@@ -1744,8 +1745,9 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
1744
1745
|
// 缓存结果,避免重复请求
|
|
1745
1746
|
_this[cacheKey] = e3wMobileNation;
|
|
1746
1747
|
// 直接返回数据
|
|
1747
|
-
return e3wMobileNation;
|
|
1748
1748
|
}
|
|
1749
|
+
e3wMobileNation = e3wMobileNation || '+86';
|
|
1750
|
+
return e3wMobileNation;
|
|
1749
1751
|
}, _this.selectHandler = function (item) {
|
|
1750
1752
|
var cmptPros = item.cmptPros;
|
|
1751
1753
|
var optionLst = cmptPros.optionLst;
|