@kmkf-fe-packages/services-components 0.14.1 → 0.15.0-alpha.0
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.
|
@@ -107,36 +107,39 @@ var BsPosting = /*#__PURE__*/_createClass(function BsPosting(options) {
|
|
|
107
107
|
this.addressDateInstance = BsAddressData.getInstance();
|
|
108
108
|
this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
|
|
109
109
|
id: "".concat(options.id, "_bsPostingProvince"),
|
|
110
|
-
name:
|
|
110
|
+
name: "省",
|
|
111
111
|
addressDateInstance: this.addressDateInstance
|
|
112
112
|
}));
|
|
113
113
|
this.city = new City(_objectSpread(_objectSpread({}, options), {}, {
|
|
114
114
|
id: "".concat(options.id, "_bsPostingCity"),
|
|
115
|
-
name:
|
|
115
|
+
name: "市",
|
|
116
116
|
addressDateInstance: this.addressDateInstance
|
|
117
117
|
}));
|
|
118
118
|
this.district = new District(_objectSpread(_objectSpread({}, options), {}, {
|
|
119
119
|
id: "".concat(options.id, "_bsPostingDistrict"),
|
|
120
|
-
name:
|
|
120
|
+
name: "区/县",
|
|
121
121
|
addressDateInstance: this.addressDateInstance
|
|
122
122
|
}));
|
|
123
123
|
this.detail = new Detail(_objectSpread(_objectSpread({}, options), {}, {
|
|
124
124
|
id: "".concat(options.id, "_bsPostingDetail"),
|
|
125
|
-
name:
|
|
125
|
+
name: "详细地址"
|
|
126
126
|
}));
|
|
127
127
|
this.receiverName = new ReceiverName(_objectSpread(_objectSpread({}, options), {}, {
|
|
128
128
|
id: "".concat(options.id, "_bsPostingReceiverName"),
|
|
129
|
-
name:
|
|
129
|
+
name: "收件人姓名"
|
|
130
130
|
}));
|
|
131
131
|
this.receiverMobile = new ReceiverMobile(_objectSpread(_objectSpread({}, options), {}, {
|
|
132
132
|
id: "".concat(options.id, "_bsPostingReceiverMobile"),
|
|
133
|
-
name:
|
|
133
|
+
name: "收件人电话"
|
|
134
134
|
}));
|
|
135
135
|
this.children = [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile];
|
|
136
136
|
this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
|
|
137
137
|
validator: function validator(_, value) {
|
|
138
138
|
var _value$postingAddress;
|
|
139
|
-
|
|
139
|
+
var addressLen = !(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || (value === null || value === void 0 ? void 0 : value.postingAddress.some(function (t) {
|
|
140
|
+
return !t;
|
|
141
|
+
}));
|
|
142
|
+
if (addressLen || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
|
|
140
143
|
return Promise.reject(new Error("请填写地址"));
|
|
141
144
|
}
|
|
142
145
|
return Promise.resolve();
|
|
@@ -189,36 +189,39 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
189
189
|
this.addressDateInstance = ((_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField) === "bs" ? BsAddressData.getInstance() : AddressData.getInstance();
|
|
190
190
|
this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
|
|
191
191
|
id: "".concat(options.id, "_postingProvince"),
|
|
192
|
-
name:
|
|
192
|
+
name: "省",
|
|
193
193
|
addressDateInstance: this.addressDateInstance
|
|
194
194
|
}));
|
|
195
195
|
this.city = new City(_objectSpread(_objectSpread({}, options), {}, {
|
|
196
196
|
id: "".concat(options.id, "_postingCity"),
|
|
197
|
-
name:
|
|
197
|
+
name: "市",
|
|
198
198
|
addressDateInstance: this.addressDateInstance
|
|
199
199
|
}));
|
|
200
200
|
this.district = new District(_objectSpread(_objectSpread({}, options), {}, {
|
|
201
201
|
id: "".concat(options.id, "_postingDistrict"),
|
|
202
|
-
name:
|
|
202
|
+
name: "区/县",
|
|
203
203
|
addressDateInstance: this.addressDateInstance
|
|
204
204
|
}));
|
|
205
205
|
this.detail = new Detail(_objectSpread(_objectSpread({}, options), {}, {
|
|
206
206
|
id: "".concat(options.id, "_postingDetail"),
|
|
207
|
-
name:
|
|
207
|
+
name: "详细地址"
|
|
208
208
|
}));
|
|
209
209
|
this.receiverName = new ReceiverName(_objectSpread(_objectSpread({}, options), {}, {
|
|
210
210
|
id: "".concat(options.id, "_postingReceiverName"),
|
|
211
|
-
name:
|
|
211
|
+
name: "收件人姓名"
|
|
212
212
|
}));
|
|
213
213
|
this.receiverMobile = new ReceiverMobile(_objectSpread(_objectSpread({}, options), {}, {
|
|
214
214
|
id: "".concat(options.id, "_postingReceiverMobile"),
|
|
215
|
-
name:
|
|
215
|
+
name: "收件人电话"
|
|
216
216
|
}));
|
|
217
217
|
this.children = this.isSplitColumns ? [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile] : [];
|
|
218
218
|
this.rules = options !== null && options !== void 0 && (_options$componentCon3 = options.componentConfig) !== null && _options$componentCon3 !== void 0 && _options$componentCon3.required ? [{
|
|
219
219
|
validator: function validator(_, value) {
|
|
220
|
-
var _value$postingAddress;
|
|
221
|
-
|
|
220
|
+
var _options$componentCon4, _value$postingAddress, _value$postingAddress2;
|
|
221
|
+
var addressLen = (options === null || options === void 0 ? void 0 : (_options$componentCon4 = options.componentConfig) === null || _options$componentCon4 === void 0 ? void 0 : _options$componentCon4.showField) === "bs" ? !(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || (value === null || value === void 0 ? void 0 : value.postingAddress.some(function (t) {
|
|
222
|
+
return !t;
|
|
223
|
+
})) : !(value !== null && value !== void 0 && (_value$postingAddress2 = value.postingAddress) !== null && _value$postingAddress2 !== void 0 && _value$postingAddress2.length);
|
|
224
|
+
if (addressLen || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
|
|
222
225
|
return Promise.reject(new Error("请填写地址"));
|
|
223
226
|
}
|
|
224
227
|
return Promise.resolve();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0-alpha.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.15.0-alpha.0",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.15.0-alpha.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "d655ae092175a9211245feee158c52e6cd288003"
|
|
44
44
|
}
|