form-driver 0.4.15 → 0.4.17

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.
package/es/m3.js CHANGED
@@ -16045,9 +16045,105 @@ var MCnAddress = _.assign({}, EmtpyType, {
16045
16045
  }
16046
16046
  });
16047
16047
 
16048
+ /**
16049
+ * 适配 {areaCode, phone} 对象格式的非空校验
16050
+ * - required 时:检查 value?.phone 是否为空
16051
+ * - 非 required 时:如果整个值为 nil 或 phone 为空,则短路(pass)
16052
+ */
16053
+
16054
+ var validatePhoneRequired = function validatePhoneRequired(a, schema, value, path) {
16055
+ if (schema.required) {
16056
+ if (_.isNil(value) || !value.phone || value.phone === "") {
16057
+ return {
16058
+ message: "您还没有填完这一项",
16059
+ path: path
16060
+ };
16061
+ }
16062
+ } else {
16063
+ if (_.isNil(value) || !value.phone || value.phone === "") {
16064
+ return "pass";
16065
+ }
16066
+ }
16067
+
16068
+ return undefined;
16069
+ };
16070
+ /**
16071
+ * 根据区号决定是否校验手机号格式
16072
+ * - 区号为 "86" 时:对 phone 执行中国手机号正则校验
16073
+ * - 其他区号:不校验格式(仅由 required 校验覆盖非空)
16074
+ */
16075
+
16076
+ var validatePhoneByAreaCode = function validatePhoneByAreaCode(a, schema, value, path) {
16077
+ if (_.isNil(value) || !value.phone) {
16078
+ return undefined;
16079
+ }
16080
+
16081
+ if (value.areaCode === "86") {
16082
+ if (!/^[1][0-9]{10}$/.test(value.phone)) {
16083
+ return {
16084
+ message: "输入有效手机号",
16085
+ path: path
16086
+ };
16087
+ }
16088
+ }
16089
+
16090
+ return undefined;
16091
+ };
16048
16092
  var MCnPhoneType = _.assign({}, EmtpyType, {
16049
- // validators: [validateRequired, generateRegexValidate(/^1[3456789]\d{9}$/, "输入有效手机号")],
16050
- validators: [validateRequired$1, generateRegexValidate$1(/^[1][0-9]{10}$/, "输入有效手机号")]
16093
+ validators: [validatePhoneRequired, validatePhoneByAreaCode],
16094
+ toReadable: function toReadable(assembly, s, v) {
16095
+ if (_.isNil(v)) {
16096
+ return assembly.theme.READABLE_BLANK;
16097
+ } // 兼容旧字符串格式
16098
+
16099
+
16100
+ if (_.isString(v)) {
16101
+ return v;
16102
+ }
16103
+
16104
+ if (v.phone) {
16105
+ return "+" + (v.areaCode || "86") + " " + v.phone;
16106
+ }
16107
+
16108
+ return assembly.theme.READABLE_BLANK;
16109
+ },
16110
+ standardValue: function standardValue(assembly, s, v, strict) {
16111
+ if (_.isNil(v)) {
16112
+ return v;
16113
+ } // 旧字符串格式自动转为对象格式
16114
+
16115
+
16116
+ if (_.isString(v)) {
16117
+ return {
16118
+ areaCode: "86",
16119
+ phone: v
16120
+ };
16121
+ } // 已经是对象格式,确保 areaCode 有默认值
16122
+
16123
+
16124
+ if (_.isObject(v)) {
16125
+ if (!v.areaCode) {
16126
+ v.areaCode = "86";
16127
+ }
16128
+
16129
+ return v;
16130
+ }
16131
+
16132
+ return {
16133
+ areaCode: "86",
16134
+ phone: ""
16135
+ };
16136
+ },
16137
+ createDefaultValue: function createDefaultValue(assembly, s) {
16138
+ if (s.defaultValue) {
16139
+ return _.clone(s.defaultValue);
16140
+ }
16141
+
16142
+ return {
16143
+ areaCode: "86",
16144
+ phone: ""
16145
+ };
16146
+ }
16051
16147
  });
16052
16148
  var MEmailType = _.assign({}, EmtpyType, {
16053
16149
  validators: [validateRequired$1, generateRegexValidate$1(/^.+[@].+[.].+$/, "输入有效电子邮件地址")]
@@ -17732,12 +17828,1313 @@ function _openKey(data, yyClosed) {
17732
17828
  return (_$first = _.first(_.difference(_.keys(data), yyClosed))) == null ? void 0 : _$first.toString();
17733
17829
  }
17734
17830
 
17831
+ var AREA_CODE_LIST = [{
17832
+ label: "+86",
17833
+ value: "86",
17834
+ country: "中国",
17835
+ englishName: "China",
17836
+ countryCode: "CN"
17837
+ }, {
17838
+ label: "+852",
17839
+ value: "852",
17840
+ country: "中国香港",
17841
+ englishName: "Hong Kong",
17842
+ countryCode: "HK"
17843
+ }, {
17844
+ label: "+853",
17845
+ value: "853",
17846
+ country: "中国澳门",
17847
+ englishName: "Macau",
17848
+ countryCode: "MO"
17849
+ }, {
17850
+ label: "+886",
17851
+ value: "886",
17852
+ country: "中国台湾",
17853
+ englishName: "Taiwan",
17854
+ countryCode: "TW"
17855
+ }, {
17856
+ label: "+93",
17857
+ value: "93",
17858
+ country: "阿富汗",
17859
+ englishName: "Afghanistan",
17860
+ countryCode: "AF"
17861
+ }, {
17862
+ label: "+355",
17863
+ value: "355",
17864
+ country: "阿尔巴尼亚",
17865
+ englishName: "Albania",
17866
+ countryCode: "AL"
17867
+ }, {
17868
+ label: "+213",
17869
+ value: "213",
17870
+ country: "阿尔及利亚",
17871
+ englishName: "Algeria",
17872
+ countryCode: "DZ"
17873
+ }, {
17874
+ label: "+1684",
17875
+ value: "1684",
17876
+ country: "美属萨摩亚",
17877
+ englishName: "American Samoa",
17878
+ countryCode: "AS"
17879
+ }, {
17880
+ label: "+376",
17881
+ value: "376",
17882
+ country: "安道尔",
17883
+ englishName: "Andorra",
17884
+ countryCode: "AD"
17885
+ }, {
17886
+ label: "+244",
17887
+ value: "244",
17888
+ country: "安哥拉",
17889
+ englishName: "Angola",
17890
+ countryCode: "AO"
17891
+ }, {
17892
+ label: "+1264",
17893
+ value: "1264",
17894
+ country: "安圭拉",
17895
+ englishName: "Anguilla",
17896
+ countryCode: "AI"
17897
+ }, {
17898
+ label: "+1268",
17899
+ value: "1268",
17900
+ country: "安提瓜和巴布达",
17901
+ englishName: "Antigua and Barbuda",
17902
+ countryCode: "AG"
17903
+ }, {
17904
+ label: "+54",
17905
+ value: "54",
17906
+ country: "阿根廷",
17907
+ englishName: "Argentina",
17908
+ countryCode: "AR"
17909
+ }, {
17910
+ label: "+374",
17911
+ value: "374",
17912
+ country: "亚美尼亚",
17913
+ englishName: "Armenia",
17914
+ countryCode: "AM"
17915
+ }, {
17916
+ label: "+297",
17917
+ value: "297",
17918
+ country: "阿鲁巴",
17919
+ englishName: "Aruba",
17920
+ countryCode: "AW"
17921
+ }, {
17922
+ label: "+61",
17923
+ value: "61",
17924
+ country: "澳大利亚",
17925
+ englishName: "Australia",
17926
+ countryCode: "AU"
17927
+ }, {
17928
+ label: "+43",
17929
+ value: "43",
17930
+ country: "奥地利",
17931
+ englishName: "Austria",
17932
+ countryCode: "AT"
17933
+ }, {
17934
+ label: "+994",
17935
+ value: "994",
17936
+ country: "阿塞拜疆",
17937
+ englishName: "Azerbaijan",
17938
+ countryCode: "AZ"
17939
+ }, {
17940
+ label: "+1242",
17941
+ value: "1242",
17942
+ country: "巴哈马",
17943
+ englishName: "Bahamas",
17944
+ countryCode: "BS"
17945
+ }, {
17946
+ label: "+973",
17947
+ value: "973",
17948
+ country: "巴林",
17949
+ englishName: "Bahrain",
17950
+ countryCode: "BH"
17951
+ }, {
17952
+ label: "+880",
17953
+ value: "880",
17954
+ country: "孟加拉国",
17955
+ englishName: "Bangladesh",
17956
+ countryCode: "BD"
17957
+ }, {
17958
+ label: "+1246",
17959
+ value: "1246",
17960
+ country: "巴巴多斯",
17961
+ englishName: "Barbados",
17962
+ countryCode: "BB"
17963
+ }, {
17964
+ label: "+375",
17965
+ value: "375",
17966
+ country: "白俄罗斯",
17967
+ englishName: "Belarus",
17968
+ countryCode: "BY"
17969
+ }, {
17970
+ label: "+32",
17971
+ value: "32",
17972
+ country: "比利时",
17973
+ englishName: "Belgium",
17974
+ countryCode: "BE"
17975
+ }, {
17976
+ label: "+501",
17977
+ value: "501",
17978
+ country: "伯利兹",
17979
+ englishName: "Belize",
17980
+ countryCode: "BZ"
17981
+ }, {
17982
+ label: "+229",
17983
+ value: "229",
17984
+ country: "贝宁",
17985
+ englishName: "Benin",
17986
+ countryCode: "BJ"
17987
+ }, {
17988
+ label: "+1441",
17989
+ value: "1441",
17990
+ country: "百慕大群岛",
17991
+ englishName: "Bermuda",
17992
+ countryCode: "BM"
17993
+ }, {
17994
+ label: "+975",
17995
+ value: "975",
17996
+ country: "不丹",
17997
+ englishName: "Bhutan",
17998
+ countryCode: "BT"
17999
+ }, {
18000
+ label: "+591",
18001
+ value: "591",
18002
+ country: "玻利维亚",
18003
+ englishName: "Bolivia",
18004
+ countryCode: "BO"
18005
+ }, {
18006
+ label: "+387",
18007
+ value: "387",
18008
+ country: "波斯尼亚和黑塞哥维那",
18009
+ englishName: "Bosnia and Herzegovina",
18010
+ countryCode: "BA"
18011
+ }, {
18012
+ label: "+267",
18013
+ value: "267",
18014
+ country: "博茨瓦纳",
18015
+ englishName: "Botswana",
18016
+ countryCode: "BW"
18017
+ }, {
18018
+ label: "+55",
18019
+ value: "55",
18020
+ country: "巴西",
18021
+ englishName: "Brazil",
18022
+ countryCode: "BR"
18023
+ }, {
18024
+ label: "+673",
18025
+ value: "673",
18026
+ country: "文莱",
18027
+ englishName: "Brunei",
18028
+ countryCode: "BN"
18029
+ }, {
18030
+ label: "+359",
18031
+ value: "359",
18032
+ country: "保加利亚",
18033
+ englishName: "Bulgaria",
18034
+ countryCode: "BG"
18035
+ }, {
18036
+ label: "+226",
18037
+ value: "226",
18038
+ country: "布基纳法索",
18039
+ englishName: "Burkina Faso",
18040
+ countryCode: "BF"
18041
+ }, {
18042
+ label: "+257",
18043
+ value: "257",
18044
+ country: "布隆迪",
18045
+ englishName: "Burundi",
18046
+ countryCode: "BI"
18047
+ }, {
18048
+ label: "+855",
18049
+ value: "855",
18050
+ country: "柬埔寨",
18051
+ englishName: "Cambodia",
18052
+ countryCode: "KH"
18053
+ }, {
18054
+ label: "+237",
18055
+ value: "237",
18056
+ country: "喀麦隆",
18057
+ englishName: "Cameroon",
18058
+ countryCode: "CM"
18059
+ }, {
18060
+ label: "+1",
18061
+ value: "1",
18062
+ country: "加拿大",
18063
+ englishName: "Canada",
18064
+ countryCode: "CA"
18065
+ }, {
18066
+ label: "+238",
18067
+ value: "238",
18068
+ country: "开普",
18069
+ englishName: "Cape Verde",
18070
+ countryCode: "CV"
18071
+ }, {
18072
+ label: "+1345",
18073
+ value: "1345",
18074
+ country: "开曼群岛",
18075
+ englishName: "Cayman Islands",
18076
+ countryCode: "KY"
18077
+ }, {
18078
+ label: "+236",
18079
+ value: "236",
18080
+ country: "中非共和国",
18081
+ englishName: "Central African Republic",
18082
+ countryCode: "CF"
18083
+ }, {
18084
+ label: "+235",
18085
+ value: "235",
18086
+ country: "乍得",
18087
+ englishName: "Chad",
18088
+ countryCode: "TD"
18089
+ }, {
18090
+ label: "+56",
18091
+ value: "56",
18092
+ country: "智利",
18093
+ englishName: "Chile",
18094
+ countryCode: "CL"
18095
+ }, {
18096
+ label: "+57",
18097
+ value: "57",
18098
+ country: "哥伦比亚",
18099
+ englishName: "Colombia",
18100
+ countryCode: "CO"
18101
+ }, {
18102
+ label: "+269",
18103
+ value: "269",
18104
+ country: "科摩罗",
18105
+ englishName: "Comoros",
18106
+ countryCode: "KM"
18107
+ }, {
18108
+ label: "+682",
18109
+ value: "682",
18110
+ country: "库克群岛",
18111
+ englishName: "Cook Islands",
18112
+ countryCode: "CK"
18113
+ }, {
18114
+ label: "+506",
18115
+ value: "506",
18116
+ country: "哥斯达黎加",
18117
+ englishName: "Costa Rica",
18118
+ countryCode: "CR"
18119
+ }, {
18120
+ label: "+385",
18121
+ value: "385",
18122
+ country: "克罗地亚",
18123
+ englishName: "Croatia",
18124
+ countryCode: "HR"
18125
+ }, {
18126
+ label: "+53",
18127
+ value: "53",
18128
+ country: "古巴",
18129
+ englishName: "Cuba",
18130
+ countryCode: "CU"
18131
+ }, {
18132
+ label: "+599",
18133
+ value: "599",
18134
+ country: "库拉索",
18135
+ englishName: "Curacao",
18136
+ countryCode: "CW"
18137
+ }, {
18138
+ label: "+357",
18139
+ value: "357",
18140
+ country: "塞浦路斯",
18141
+ englishName: "Cyprus",
18142
+ countryCode: "CY"
18143
+ }, {
18144
+ label: "+420",
18145
+ value: "420",
18146
+ country: "捷克",
18147
+ englishName: "Czech",
18148
+ countryCode: "CZ"
18149
+ }, {
18150
+ label: "+243",
18151
+ value: "243",
18152
+ country: "刚果民主共和国",
18153
+ englishName: "Democratic Republic of the Congo",
18154
+ countryCode: "CD"
18155
+ }, {
18156
+ label: "+45",
18157
+ value: "45",
18158
+ country: "丹麦",
18159
+ englishName: "Denmark",
18160
+ countryCode: "DK"
18161
+ }, {
18162
+ label: "+253",
18163
+ value: "253",
18164
+ country: "吉布提",
18165
+ englishName: "Djibouti",
18166
+ countryCode: "DJ"
18167
+ }, {
18168
+ label: "+1767",
18169
+ value: "1767",
18170
+ country: "多米尼克",
18171
+ englishName: "Dominica",
18172
+ countryCode: "DM"
18173
+ }, {
18174
+ label: "+1809",
18175
+ value: "1809",
18176
+ country: "多米尼加共和国",
18177
+ englishName: "Dominican Republic",
18178
+ countryCode: "DO"
18179
+ }, {
18180
+ label: "+593",
18181
+ value: "593",
18182
+ country: "厄瓜多尔",
18183
+ englishName: "Ecuador",
18184
+ countryCode: "EC"
18185
+ }, {
18186
+ label: "+20",
18187
+ value: "20",
18188
+ country: "埃及",
18189
+ englishName: "Egypt",
18190
+ countryCode: "EG"
18191
+ }, {
18192
+ label: "+503",
18193
+ value: "503",
18194
+ country: "萨尔瓦多",
18195
+ englishName: "El Salvador",
18196
+ countryCode: "SV"
18197
+ }, {
18198
+ label: "+240",
18199
+ value: "240",
18200
+ country: "赤道几内亚",
18201
+ englishName: "Equatorial Guinea",
18202
+ countryCode: "GQ"
18203
+ }, {
18204
+ label: "+291",
18205
+ value: "291",
18206
+ country: "厄立特里亚",
18207
+ englishName: "Eritrea",
18208
+ countryCode: "ER"
18209
+ }, {
18210
+ label: "+372",
18211
+ value: "372",
18212
+ country: "爱沙尼亚",
18213
+ englishName: "Estonia",
18214
+ countryCode: "EE"
18215
+ }, {
18216
+ label: "+251",
18217
+ value: "251",
18218
+ country: "埃塞俄比亚",
18219
+ englishName: "Ethiopia",
18220
+ countryCode: "ET"
18221
+ }, {
18222
+ label: "+298",
18223
+ value: "298",
18224
+ country: "法罗群岛",
18225
+ englishName: "Faroe Islands",
18226
+ countryCode: "FO"
18227
+ }, {
18228
+ label: "+679",
18229
+ value: "679",
18230
+ country: "斐济",
18231
+ englishName: "Fiji",
18232
+ countryCode: "FJ"
18233
+ }, {
18234
+ label: "+358",
18235
+ value: "358",
18236
+ country: "芬兰",
18237
+ englishName: "Finland",
18238
+ countryCode: "FI"
18239
+ }, {
18240
+ label: "+33",
18241
+ value: "33",
18242
+ country: "法国",
18243
+ englishName: "France",
18244
+ countryCode: "FR"
18245
+ }, {
18246
+ label: "+594",
18247
+ value: "594",
18248
+ country: "法属圭亚那",
18249
+ englishName: "French Guiana",
18250
+ countryCode: "GF"
18251
+ }, {
18252
+ label: "+689",
18253
+ value: "689",
18254
+ country: "法属波利尼西亚",
18255
+ englishName: "French Polynesia",
18256
+ countryCode: "PF"
18257
+ }, {
18258
+ label: "+241",
18259
+ value: "241",
18260
+ country: "加蓬",
18261
+ englishName: "Gabon",
18262
+ countryCode: "GA"
18263
+ }, {
18264
+ label: "+220",
18265
+ value: "220",
18266
+ country: "冈比亚",
18267
+ englishName: "Gambia",
18268
+ countryCode: "GM"
18269
+ }, {
18270
+ label: "+995",
18271
+ value: "995",
18272
+ country: "格鲁吉亚",
18273
+ englishName: "Georgia",
18274
+ countryCode: "GE"
18275
+ }, {
18276
+ label: "+49",
18277
+ value: "49",
18278
+ country: "德国",
18279
+ englishName: "Germany",
18280
+ countryCode: "DE"
18281
+ }, {
18282
+ label: "+233",
18283
+ value: "233",
18284
+ country: "加纳",
18285
+ englishName: "Ghana",
18286
+ countryCode: "GH"
18287
+ }, {
18288
+ label: "+350",
18289
+ value: "350",
18290
+ country: "直布罗陀",
18291
+ englishName: "Gibraltar",
18292
+ countryCode: "GI"
18293
+ }, {
18294
+ label: "+30",
18295
+ value: "30",
18296
+ country: "希腊",
18297
+ englishName: "Greece",
18298
+ countryCode: "GR"
18299
+ }, {
18300
+ label: "+299",
18301
+ value: "299",
18302
+ country: "格陵兰岛",
18303
+ englishName: "Greenland",
18304
+ countryCode: "GL"
18305
+ }, {
18306
+ label: "+1473",
18307
+ value: "1473",
18308
+ country: "格林纳达",
18309
+ englishName: "Grenada",
18310
+ countryCode: "GD"
18311
+ }, {
18312
+ label: "+590",
18313
+ value: "590",
18314
+ country: "瓜德罗普岛",
18315
+ englishName: "Guadeloupe",
18316
+ countryCode: "GP"
18317
+ }, {
18318
+ label: "+1671",
18319
+ value: "1671",
18320
+ country: "关岛",
18321
+ englishName: "Guam",
18322
+ countryCode: "GU"
18323
+ }, {
18324
+ label: "+502",
18325
+ value: "502",
18326
+ country: "瓜地马拉",
18327
+ englishName: "Guatemala",
18328
+ countryCode: "GT"
18329
+ }, {
18330
+ label: "+224",
18331
+ value: "224",
18332
+ country: "几内亚",
18333
+ englishName: "Guinea",
18334
+ countryCode: "GN"
18335
+ }, {
18336
+ label: "+245",
18337
+ value: "245",
18338
+ country: "几内亚比绍共和国",
18339
+ englishName: "Guinea-Bissau",
18340
+ countryCode: "GW"
18341
+ }, {
18342
+ label: "+592",
18343
+ value: "592",
18344
+ country: "圭亚那",
18345
+ englishName: "Guyana",
18346
+ countryCode: "GY"
18347
+ }, {
18348
+ label: "+509",
18349
+ value: "509",
18350
+ country: "海地",
18351
+ englishName: "Haiti",
18352
+ countryCode: "HT"
18353
+ }, {
18354
+ label: "+504",
18355
+ value: "504",
18356
+ country: "洪都拉斯",
18357
+ englishName: "Honduras",
18358
+ countryCode: "HN"
18359
+ }, {
18360
+ label: "+36",
18361
+ value: "36",
18362
+ country: "匈牙利",
18363
+ englishName: "Hungary",
18364
+ countryCode: "HU"
18365
+ }, {
18366
+ label: "+354",
18367
+ value: "354",
18368
+ country: "冰岛",
18369
+ englishName: "Iceland",
18370
+ countryCode: "IS"
18371
+ }, {
18372
+ label: "+91",
18373
+ value: "91",
18374
+ country: "印度",
18375
+ englishName: "India",
18376
+ countryCode: "IN"
18377
+ }, {
18378
+ label: "+62",
18379
+ value: "62",
18380
+ country: "印度尼西亚",
18381
+ englishName: "Indonesia",
18382
+ countryCode: "ID"
18383
+ }, {
18384
+ label: "+98",
18385
+ value: "98",
18386
+ country: "伊朗",
18387
+ englishName: "Iran",
18388
+ countryCode: "IR"
18389
+ }, {
18390
+ label: "+964",
18391
+ value: "964",
18392
+ country: "伊拉克",
18393
+ englishName: "Iraq",
18394
+ countryCode: "IQ"
18395
+ }, {
18396
+ label: "+353",
18397
+ value: "353",
18398
+ country: "爱尔兰",
18399
+ englishName: "Ireland",
18400
+ countryCode: "IE"
18401
+ }, {
18402
+ label: "+972",
18403
+ value: "972",
18404
+ country: "以色列",
18405
+ englishName: "Israel",
18406
+ countryCode: "IL"
18407
+ }, {
18408
+ label: "+39",
18409
+ value: "39",
18410
+ country: "意大利",
18411
+ englishName: "Italy",
18412
+ countryCode: "IT"
18413
+ }, {
18414
+ label: "+225",
18415
+ value: "225",
18416
+ country: "象牙海岸",
18417
+ englishName: "Ivory Coast",
18418
+ countryCode: "CI"
18419
+ }, {
18420
+ label: "+1876",
18421
+ value: "1876",
18422
+ country: "牙买加",
18423
+ englishName: "Jamaica",
18424
+ countryCode: "JM"
18425
+ }, {
18426
+ label: "+81",
18427
+ value: "81",
18428
+ country: "日本",
18429
+ englishName: "Japan",
18430
+ countryCode: "JP"
18431
+ }, {
18432
+ label: "+962",
18433
+ value: "962",
18434
+ country: "约旦",
18435
+ englishName: "Jordan",
18436
+ countryCode: "JO"
18437
+ }, {
18438
+ label: "+7",
18439
+ value: "7",
18440
+ country: "哈萨克斯坦",
18441
+ englishName: "Kazakhstan",
18442
+ countryCode: "KZ"
18443
+ }, {
18444
+ label: "+254",
18445
+ value: "254",
18446
+ country: "肯尼亚",
18447
+ englishName: "Kenya",
18448
+ countryCode: "KE"
18449
+ }, {
18450
+ label: "+686",
18451
+ value: "686",
18452
+ country: "基里巴斯",
18453
+ englishName: "Kiribati",
18454
+ countryCode: "KI"
18455
+ }, {
18456
+ label: "+965",
18457
+ value: "965",
18458
+ country: "科威特",
18459
+ englishName: "Kuwait",
18460
+ countryCode: "KW"
18461
+ }, {
18462
+ label: "+996",
18463
+ value: "996",
18464
+ country: "吉尔吉斯斯坦",
18465
+ englishName: "Kyrgyzstan",
18466
+ countryCode: "KG"
18467
+ }, {
18468
+ label: "+856",
18469
+ value: "856",
18470
+ country: "老挝",
18471
+ englishName: "Laos",
18472
+ countryCode: "LA"
18473
+ }, {
18474
+ label: "+371",
18475
+ value: "371",
18476
+ country: "拉脱维亚",
18477
+ englishName: "Latvia",
18478
+ countryCode: "LV"
18479
+ }, {
18480
+ label: "+961",
18481
+ value: "961",
18482
+ country: "黎巴嫩",
18483
+ englishName: "Lebanon",
18484
+ countryCode: "LB"
18485
+ }, {
18486
+ label: "+266",
18487
+ value: "266",
18488
+ country: "莱索托",
18489
+ englishName: "Lesotho",
18490
+ countryCode: "LS"
18491
+ }, {
18492
+ label: "+231",
18493
+ value: "231",
18494
+ country: "利比里亚",
18495
+ englishName: "Liberia",
18496
+ countryCode: "LR"
18497
+ }, {
18498
+ label: "+218",
18499
+ value: "218",
18500
+ country: "利比亚",
18501
+ englishName: "Libya",
18502
+ countryCode: "LY"
18503
+ }, {
18504
+ label: "+423",
18505
+ value: "423",
18506
+ country: "列支敦士登",
18507
+ englishName: "Liechtenstein",
18508
+ countryCode: "LI"
18509
+ }, {
18510
+ label: "+370",
18511
+ value: "370",
18512
+ country: "立陶宛",
18513
+ englishName: "Lithuania",
18514
+ countryCode: "LT"
18515
+ }, {
18516
+ label: "+352",
18517
+ value: "352",
18518
+ country: "卢森堡",
18519
+ englishName: "Luxembourg",
18520
+ countryCode: "LU"
18521
+ }, {
18522
+ label: "+389",
18523
+ value: "389",
18524
+ country: "马其顿",
18525
+ englishName: "Macedonia",
18526
+ countryCode: "MK"
18527
+ }, {
18528
+ label: "+261",
18529
+ value: "261",
18530
+ country: "马达加斯加",
18531
+ englishName: "Madagascar",
18532
+ countryCode: "MG"
18533
+ }, {
18534
+ label: "+265",
18535
+ value: "265",
18536
+ country: "马拉维",
18537
+ englishName: "Malawi",
18538
+ countryCode: "MW"
18539
+ }, {
18540
+ label: "+60",
18541
+ value: "60",
18542
+ country: "马来西亚",
18543
+ englishName: "Malaysia",
18544
+ countryCode: "MY"
18545
+ }, {
18546
+ label: "+960",
18547
+ value: "960",
18548
+ country: "马尔代夫",
18549
+ englishName: "Maldives",
18550
+ countryCode: "MV"
18551
+ }, {
18552
+ label: "+223",
18553
+ value: "223",
18554
+ country: "马里",
18555
+ englishName: "Mali",
18556
+ countryCode: "ML"
18557
+ }, {
18558
+ label: "+356",
18559
+ value: "356",
18560
+ country: "马耳他",
18561
+ englishName: "Malta",
18562
+ countryCode: "MT"
18563
+ }, {
18564
+ label: "+596",
18565
+ value: "596",
18566
+ country: "马提尼克",
18567
+ englishName: "Martinique",
18568
+ countryCode: "MQ"
18569
+ }, {
18570
+ label: "+222",
18571
+ value: "222",
18572
+ country: "毛里塔尼亚",
18573
+ englishName: "Mauritania",
18574
+ countryCode: "MR"
18575
+ }, {
18576
+ label: "+230",
18577
+ value: "230",
18578
+ country: "毛里求斯",
18579
+ englishName: "Mauritius",
18580
+ countryCode: "MU"
18581
+ }, {
18582
+ label: "+269",
18583
+ value: "269",
18584
+ country: "马约特",
18585
+ englishName: "Mayotte",
18586
+ countryCode: "YT"
18587
+ }, {
18588
+ label: "+52",
18589
+ value: "52",
18590
+ country: "墨西哥",
18591
+ englishName: "Mexico",
18592
+ countryCode: "MX"
18593
+ }, {
18594
+ label: "+373",
18595
+ value: "373",
18596
+ country: "摩尔多瓦",
18597
+ englishName: "Moldova",
18598
+ countryCode: "MD"
18599
+ }, {
18600
+ label: "+377",
18601
+ value: "377",
18602
+ country: "摩纳哥",
18603
+ englishName: "Monaco",
18604
+ countryCode: "MC"
18605
+ }, {
18606
+ label: "+976",
18607
+ value: "976",
18608
+ country: "蒙古",
18609
+ englishName: "Mongolia",
18610
+ countryCode: "MN"
18611
+ }, {
18612
+ label: "+382",
18613
+ value: "382",
18614
+ country: "黑山",
18615
+ englishName: "Montenegro",
18616
+ countryCode: "ME"
18617
+ }, {
18618
+ label: "+1664",
18619
+ value: "1664",
18620
+ country: "蒙特塞拉特岛",
18621
+ englishName: "Montserrat",
18622
+ countryCode: "MS"
18623
+ }, {
18624
+ label: "+212",
18625
+ value: "212",
18626
+ country: "摩洛哥",
18627
+ englishName: "Morocco",
18628
+ countryCode: "MA"
18629
+ }, {
18630
+ label: "+258",
18631
+ value: "258",
18632
+ country: "莫桑比克",
18633
+ englishName: "Mozambique",
18634
+ countryCode: "MZ"
18635
+ }, {
18636
+ label: "+95",
18637
+ value: "95",
18638
+ country: "缅甸",
18639
+ englishName: "Myanmar",
18640
+ countryCode: "MM"
18641
+ }, {
18642
+ label: "+264",
18643
+ value: "264",
18644
+ country: "纳米比亚",
18645
+ englishName: "Namibia",
18646
+ countryCode: "NA"
18647
+ }, {
18648
+ label: "+977",
18649
+ value: "977",
18650
+ country: "尼泊尔",
18651
+ englishName: "Nepal",
18652
+ countryCode: "NP"
18653
+ }, {
18654
+ label: "+31",
18655
+ value: "31",
18656
+ country: "荷兰",
18657
+ englishName: "Netherlands",
18658
+ countryCode: "NL"
18659
+ }, {
18660
+ label: "+687",
18661
+ value: "687",
18662
+ country: "新喀里多尼亚",
18663
+ englishName: "New Caledonia",
18664
+ countryCode: "NC"
18665
+ }, {
18666
+ label: "+64",
18667
+ value: "64",
18668
+ country: "新西兰",
18669
+ englishName: "New Zealand",
18670
+ countryCode: "NZ"
18671
+ }, {
18672
+ label: "+505",
18673
+ value: "505",
18674
+ country: "尼加拉瓜",
18675
+ englishName: "Nicaragua",
18676
+ countryCode: "NI"
18677
+ }, {
18678
+ label: "+227",
18679
+ value: "227",
18680
+ country: "尼日尔",
18681
+ englishName: "Niger",
18682
+ countryCode: "NE"
18683
+ }, {
18684
+ label: "+234",
18685
+ value: "234",
18686
+ country: "尼日利亚",
18687
+ englishName: "Nigeria",
18688
+ countryCode: "NG"
18689
+ }, {
18690
+ label: "+47",
18691
+ value: "47",
18692
+ country: "挪威",
18693
+ englishName: "Norway",
18694
+ countryCode: "NO"
18695
+ }, {
18696
+ label: "+968",
18697
+ value: "968",
18698
+ country: "阿曼",
18699
+ englishName: "Oman",
18700
+ countryCode: "OM"
18701
+ }, {
18702
+ label: "+92",
18703
+ value: "92",
18704
+ country: "巴基斯坦",
18705
+ englishName: "Pakistan",
18706
+ countryCode: "PK"
18707
+ }, {
18708
+ label: "+680",
18709
+ value: "680",
18710
+ country: "帕劳",
18711
+ englishName: "Palau",
18712
+ countryCode: "PW"
18713
+ }, {
18714
+ label: "+970",
18715
+ value: "970",
18716
+ country: "巴勒斯坦",
18717
+ englishName: "Palestine",
18718
+ countryCode: "BL"
18719
+ }, {
18720
+ label: "+507",
18721
+ value: "507",
18722
+ country: "巴拿马",
18723
+ englishName: "Panama",
18724
+ countryCode: "PA"
18725
+ }, {
18726
+ label: "+675",
18727
+ value: "675",
18728
+ country: "巴布亚新几内亚",
18729
+ englishName: "Papua New Guinea",
18730
+ countryCode: "PG"
18731
+ }, {
18732
+ label: "+595",
18733
+ value: "595",
18734
+ country: "巴拉圭",
18735
+ englishName: "Paraguay",
18736
+ countryCode: "PY"
18737
+ }, {
18738
+ label: "+51",
18739
+ value: "51",
18740
+ country: "秘鲁",
18741
+ englishName: "Peru",
18742
+ countryCode: "PE"
18743
+ }, {
18744
+ label: "+63",
18745
+ value: "63",
18746
+ country: "菲律宾",
18747
+ englishName: "Philippines",
18748
+ countryCode: "PH"
18749
+ }, {
18750
+ label: "+48",
18751
+ value: "48",
18752
+ country: "波兰",
18753
+ englishName: "Poland",
18754
+ countryCode: "PL"
18755
+ }, {
18756
+ label: "+351",
18757
+ value: "351",
18758
+ country: "葡萄牙",
18759
+ englishName: "Portugal",
18760
+ countryCode: "PT"
18761
+ }, {
18762
+ label: "+1787",
18763
+ value: "1787",
18764
+ country: "波多黎各",
18765
+ englishName: "Puerto Rico",
18766
+ countryCode: "PR"
18767
+ }, {
18768
+ label: "+974",
18769
+ value: "974",
18770
+ country: "卡塔尔",
18771
+ englishName: "Qatar",
18772
+ countryCode: "QA"
18773
+ }, {
18774
+ label: "+242",
18775
+ value: "242",
18776
+ country: "刚果共和国",
18777
+ englishName: "Republic Of The Congo",
18778
+ countryCode: "CG"
18779
+ }, {
18780
+ label: "+262",
18781
+ value: "262",
18782
+ country: "留尼汪",
18783
+ englishName: "Réunion Island",
18784
+ countryCode: "RE"
18785
+ }, {
18786
+ label: "+40",
18787
+ value: "40",
18788
+ country: "罗马尼亚",
18789
+ englishName: "Romania",
18790
+ countryCode: "RO"
18791
+ }, {
18792
+ label: "+7",
18793
+ value: "7",
18794
+ country: "俄罗斯",
18795
+ englishName: "Russia",
18796
+ countryCode: "RU"
18797
+ }, {
18798
+ label: "+250",
18799
+ value: "250",
18800
+ country: "卢旺达",
18801
+ englishName: "Rwanda",
18802
+ countryCode: "RW"
18803
+ }, {
18804
+ label: "+1869",
18805
+ value: "1869",
18806
+ country: "圣基茨和尼维斯",
18807
+ englishName: "Saint Kitts and Nevis",
18808
+ countryCode: "KN"
18809
+ }, {
18810
+ label: "+1758",
18811
+ value: "1758",
18812
+ country: "圣露西亚",
18813
+ englishName: "Saint Lucia",
18814
+ countryCode: "LC"
18815
+ }, {
18816
+ label: "+508",
18817
+ value: "508",
18818
+ country: "圣彼埃尔和密克隆岛",
18819
+ englishName: "Saint Pierre and Miquelon",
18820
+ countryCode: "PM"
18821
+ }, {
18822
+ label: "+1784",
18823
+ value: "1784",
18824
+ country: "圣文森特和格林纳丁斯",
18825
+ englishName: "Saint Vincent and The Grenadines",
18826
+ countryCode: "VC"
18827
+ }, {
18828
+ label: "+685",
18829
+ value: "685",
18830
+ country: "萨摩亚",
18831
+ englishName: "Samoa",
18832
+ countryCode: "WS"
18833
+ }, {
18834
+ label: "+378",
18835
+ value: "378",
18836
+ country: "圣马力诺",
18837
+ englishName: "San Marino",
18838
+ countryCode: "SM"
18839
+ }, {
18840
+ label: "+239",
18841
+ value: "239",
18842
+ country: "圣多美和普林西比",
18843
+ englishName: "Sao Tome and Principe",
18844
+ countryCode: "ST"
18845
+ }, {
18846
+ label: "+966",
18847
+ value: "966",
18848
+ country: "沙特阿拉伯",
18849
+ englishName: "Saudi Arabia",
18850
+ countryCode: "SA"
18851
+ }, {
18852
+ label: "+221",
18853
+ value: "221",
18854
+ country: "塞内加尔",
18855
+ englishName: "Senegal",
18856
+ countryCode: "SN"
18857
+ }, {
18858
+ label: "+381",
18859
+ value: "381",
18860
+ country: "塞尔维亚",
18861
+ englishName: "Serbia",
18862
+ countryCode: "RS"
18863
+ }, {
18864
+ label: "+248",
18865
+ value: "248",
18866
+ country: "塞舌尔",
18867
+ englishName: "Seychelles",
18868
+ countryCode: "SC"
18869
+ }, {
18870
+ label: "+232",
18871
+ value: "232",
18872
+ country: "塞拉利昂",
18873
+ englishName: "Sierra Leone",
18874
+ countryCode: "SL"
18875
+ }, {
18876
+ label: "+65",
18877
+ value: "65",
18878
+ country: "新加坡",
18879
+ englishName: "Singapore",
18880
+ countryCode: "SG"
18881
+ }, {
18882
+ label: "+1721",
18883
+ value: "1721",
18884
+ country: "圣马丁岛(荷兰部分)",
18885
+ englishName: "Saint Maarten (Dutch Part)",
18886
+ countryCode: "SX"
18887
+ }, {
18888
+ label: "+421",
18889
+ value: "421",
18890
+ country: "斯洛伐克",
18891
+ englishName: "Slovakia",
18892
+ countryCode: "SK"
18893
+ }, {
18894
+ label: "+386",
18895
+ value: "386",
18896
+ country: "斯洛文尼亚",
18897
+ englishName: "Slovenia",
18898
+ countryCode: "SI"
18899
+ }, {
18900
+ label: "+677",
18901
+ value: "677",
18902
+ country: "所罗门群岛",
18903
+ englishName: "Solomon Islands",
18904
+ countryCode: "SB"
18905
+ }, {
18906
+ label: "+252",
18907
+ value: "252",
18908
+ country: "索马里",
18909
+ englishName: "Somalia",
18910
+ countryCode: "SO"
18911
+ }, {
18912
+ label: "+27",
18913
+ value: "27",
18914
+ country: "南非",
18915
+ englishName: "South Africa",
18916
+ countryCode: "ZA"
18917
+ }, {
18918
+ label: "+82",
18919
+ value: "82",
18920
+ country: "韩国",
18921
+ englishName: "South Korea",
18922
+ countryCode: "KR"
18923
+ }, {
18924
+ label: "+34",
18925
+ value: "34",
18926
+ country: "西班牙",
18927
+ englishName: "Spain",
18928
+ countryCode: "ES"
18929
+ }, {
18930
+ label: "+94",
18931
+ value: "94",
18932
+ country: "斯里兰卡",
18933
+ englishName: "Sri Lanka",
18934
+ countryCode: "LK"
18935
+ }, {
18936
+ label: "+249",
18937
+ value: "249",
18938
+ country: "苏丹",
18939
+ englishName: "Sudan",
18940
+ countryCode: "SD"
18941
+ }, {
18942
+ label: "+597",
18943
+ value: "597",
18944
+ country: "苏里南",
18945
+ englishName: "Suriname",
18946
+ countryCode: "SR"
18947
+ }, {
18948
+ label: "+268",
18949
+ value: "268",
18950
+ country: "斯威士兰",
18951
+ englishName: "Swaziland",
18952
+ countryCode: "SZ"
18953
+ }, {
18954
+ label: "+46",
18955
+ value: "46",
18956
+ country: "瑞典",
18957
+ englishName: "Sweden",
18958
+ countryCode: "SE"
18959
+ }, {
18960
+ label: "+41",
18961
+ value: "41",
18962
+ country: "瑞士",
18963
+ englishName: "Switzerland",
18964
+ countryCode: "CH"
18965
+ }, {
18966
+ label: "+963",
18967
+ value: "963",
18968
+ country: "叙利亚",
18969
+ englishName: "Syria",
18970
+ countryCode: "SY"
18971
+ }, {
18972
+ label: "+992",
18973
+ value: "992",
18974
+ country: "塔吉克斯坦",
18975
+ englishName: "Tajikistan",
18976
+ countryCode: "TJ"
18977
+ }, {
18978
+ label: "+255",
18979
+ value: "255",
18980
+ country: "坦桑尼亚",
18981
+ englishName: "Tanzania",
18982
+ countryCode: "TZ"
18983
+ }, {
18984
+ label: "+66",
18985
+ value: "66",
18986
+ country: "泰国",
18987
+ englishName: "Thailand",
18988
+ countryCode: "TH"
18989
+ }, {
18990
+ label: "+670",
18991
+ value: "670",
18992
+ country: "东帝汶",
18993
+ englishName: "Timor-Leste",
18994
+ countryCode: "TL"
18995
+ }, {
18996
+ label: "+228",
18997
+ value: "228",
18998
+ country: "多哥",
18999
+ englishName: "Togo",
19000
+ countryCode: "TG"
19001
+ }, {
19002
+ label: "+676",
19003
+ value: "676",
19004
+ country: "汤加",
19005
+ englishName: "Tonga",
19006
+ countryCode: "TO"
19007
+ }, {
19008
+ label: "+1868",
19009
+ value: "1868",
19010
+ country: "特立尼达和多巴哥",
19011
+ englishName: "Trinidad and Tobago",
19012
+ countryCode: "TT"
19013
+ }, {
19014
+ label: "+216",
19015
+ value: "216",
19016
+ country: "突尼斯",
19017
+ englishName: "Tunisia",
19018
+ countryCode: "TN"
19019
+ }, {
19020
+ label: "+90",
19021
+ value: "90",
19022
+ country: "土耳其",
19023
+ englishName: "Turkey",
19024
+ countryCode: "TR"
19025
+ }, {
19026
+ label: "+993",
19027
+ value: "993",
19028
+ country: "土库曼斯坦",
19029
+ englishName: "Turkmenistan",
19030
+ countryCode: "TM"
19031
+ }, {
19032
+ label: "+1649",
19033
+ value: "1649",
19034
+ country: "特克斯和凯科斯群岛",
19035
+ englishName: "Turks and Caicos Islands",
19036
+ countryCode: "TC"
19037
+ }, {
19038
+ label: "+256",
19039
+ value: "256",
19040
+ country: "乌干达",
19041
+ englishName: "Uganda",
19042
+ countryCode: "UG"
19043
+ }, {
19044
+ label: "+380",
19045
+ value: "380",
19046
+ country: "乌克兰",
19047
+ englishName: "Ukraine",
19048
+ countryCode: "UA"
19049
+ }, {
19050
+ label: "+971",
19051
+ value: "971",
19052
+ country: "阿拉伯联合酋长国",
19053
+ englishName: "United Arab Emirates",
19054
+ countryCode: "AE"
19055
+ }, {
19056
+ label: "+44",
19057
+ value: "44",
19058
+ country: "英国",
19059
+ englishName: "United Kingdom",
19060
+ countryCode: "GB"
19061
+ }, {
19062
+ label: "+1",
19063
+ value: "1",
19064
+ country: "美国",
19065
+ englishName: "United States",
19066
+ countryCode: "US"
19067
+ }, {
19068
+ label: "+598",
19069
+ value: "598",
19070
+ country: "乌拉圭",
19071
+ englishName: "Uruguay",
19072
+ countryCode: "UY"
19073
+ }, {
19074
+ label: "+998",
19075
+ value: "998",
19076
+ country: "乌兹别克斯坦",
19077
+ englishName: "Uzbekistan",
19078
+ countryCode: "UZ"
19079
+ }, {
19080
+ label: "+678",
19081
+ value: "678",
19082
+ country: "瓦努阿图",
19083
+ englishName: "Vanuatu",
19084
+ countryCode: "VU"
19085
+ }, {
19086
+ label: "+58",
19087
+ value: "58",
19088
+ country: "委内瑞拉",
19089
+ englishName: "Venezuela",
19090
+ countryCode: "VE"
19091
+ }, {
19092
+ label: "+84",
19093
+ value: "84",
19094
+ country: "越南",
19095
+ englishName: "Vietnam",
19096
+ countryCode: "VN"
19097
+ }, {
19098
+ label: "+1340",
19099
+ value: "1340",
19100
+ country: "英属处女群岛",
19101
+ englishName: "Virgin Islands, British",
19102
+ countryCode: "VG"
19103
+ }, {
19104
+ label: "+1284",
19105
+ value: "1284",
19106
+ country: "美属维尔京群岛",
19107
+ englishName: "Virgin Islands, US",
19108
+ countryCode: "VI"
19109
+ }, {
19110
+ label: "+967",
19111
+ value: "967",
19112
+ country: "也门",
19113
+ englishName: "Yemen",
19114
+ countryCode: "YE"
19115
+ }, {
19116
+ label: "+260",
19117
+ value: "260",
19118
+ country: "赞比亚",
19119
+ englishName: "Zambia",
19120
+ countryCode: "ZM"
19121
+ }, {
19122
+ label: "+263",
19123
+ value: "263",
19124
+ country: "津巴布韦",
19125
+ englishName: "Zimbabwe",
19126
+ countryCode: "ZW"
19127
+ }];
19128
+
17735
19129
  function ownKeys$l(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17736
19130
 
17737
19131
  function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$l(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17738
19132
  /**
17739
19133
  * 手机号/邮箱等输入框
17740
19134
  * cnPhone/tel/email
19135
+ *
19136
+ * 当 type 为 tel 或 cnPhone 时,渲染为区号选择器 + 手机号输入框的复合组件
19137
+ * 数据格式为 {areaCode: "86", phone: "13800138000"}
17741
19138
  */
17742
19139
 
17743
19140
  var ASpecInputBox = /*#__PURE__*/function (_BaseViewer) {
@@ -17749,9 +19146,115 @@ var ASpecInputBox = /*#__PURE__*/function (_BaseViewer) {
17749
19146
 
17750
19147
  var _proto = ASpecInputBox.prototype;
17751
19148
 
19149
+ /**
19150
+ * 判断当前 schema 类型是否为手机号类型
19151
+ */
19152
+ _proto.isPhoneType = function isPhoneType() {
19153
+ var type = this.props.schema.type;
19154
+ return type === "tel" || type === "cnPhone";
19155
+ }
19156
+ /**
19157
+ * 获取手机号对象值,兼容旧字符串格式
19158
+ */
19159
+ ;
19160
+
19161
+ _proto.getPhoneValue = function getPhoneValue() {
19162
+ var v = _BaseViewer.prototype.getValue.call(this);
19163
+
19164
+ if (_.isNil(v)) {
19165
+ return {
19166
+ areaCode: "86",
19167
+ phone: ""
19168
+ };
19169
+ }
19170
+
19171
+ if (_.isString(v)) {
19172
+ return {
19173
+ areaCode: "86",
19174
+ phone: v
19175
+ };
19176
+ }
19177
+
19178
+ return {
19179
+ areaCode: v.areaCode || "86",
19180
+ phone: v.phone || ""
19181
+ };
19182
+ }
19183
+ /**
19184
+ * 渲染手机号复合组件:[+86 ▼] [手机号输入框]
19185
+ */
19186
+ ;
19187
+
19188
+ _proto.renderPhoneInput = function renderPhoneInput() {
19189
+ var _this = this;
19190
+
19191
+ var phoneValue = this.getPhoneValue();
19192
+ var selectWidth = 120;
19193
+ return jsxs(Input.Group, {
19194
+ compact: true,
19195
+ children: [jsx(Select, {
19196
+ style: {
19197
+ width: selectWidth
19198
+ },
19199
+ value: phoneValue.areaCode,
19200
+ showSearch: true,
19201
+ optionLabelProp: "shortLabel",
19202
+ filterOption: function filterOption(input, option) {
19203
+ var searchText = input.toLowerCase(); // 支持按区号、国家中文名、英文名搜索
19204
+
19205
+ var country = ((option == null ? void 0 : option["data-country"]) || "").toLowerCase();
19206
+ var englishName = ((option == null ? void 0 : option["data-english"]) || "").toLowerCase();
19207
+ var value = (option == null ? void 0 : option.value) || "";
19208
+ return value.includes(searchText) || country.includes(searchText) || englishName.includes(searchText);
19209
+ },
19210
+ disabled: this.props.disable,
19211
+ onChange: function onChange(newAreaCode) {
19212
+ var updated = _objectSpread$l(_objectSpread$l({}, _this.getPhoneValue()), {}, {
19213
+ areaCode: newAreaCode
19214
+ });
19215
+
19216
+ _this.changeValueEx(updated, false, true);
19217
+ },
19218
+ children: AREA_CODE_LIST.map(function (item) {
19219
+ return jsxs(Select.Option, {
19220
+ value: item.value,
19221
+ shortLabel: "+" + item.value,
19222
+ "data-country": item.country,
19223
+ "data-english": item.englishName,
19224
+ children: [item.country, " +", item.value]
19225
+ }, item.countryCode);
19226
+ })
19227
+ }), jsx(Input, {
19228
+ style: {
19229
+ width: "calc(100% - " + selectWidth + "px)"
19230
+ },
19231
+ placeholder: _BaseViewer.prototype.getPlaceholder.call(this),
19232
+ bordered: !this.props.hideBorder,
19233
+ disabled: this.props.disable,
19234
+ defaultValue: phoneValue.phone,
19235
+ onChange: function onChange(e) {
19236
+ var updated = _objectSpread$l(_objectSpread$l({}, _this.getPhoneValue()), {}, {
19237
+ phone: e.target.value
19238
+ });
19239
+
19240
+ _this.changeValueEx(updated, false, false);
19241
+ },
19242
+ onBlur: function onBlur() {
19243
+ _this.changeValueEx(_this.getPhoneValue(), false, true);
19244
+ }
19245
+ }, this.props.path + "/phone/" + this.state.ctrlVersion)]
19246
+ }, this.props.path);
19247
+ };
19248
+
17752
19249
  _proto.element = function element() {
17753
19250
  var _this$props$schema$pr,
17754
- _this = this;
19251
+ _this2 = this;
19252
+
19253
+ // 手机号类型:渲染区号选择器 + 输入框
19254
+ if (this.isPhoneType()) {
19255
+ return this.renderPhoneInput();
19256
+ } // 其他类型(如 email):保持原有纯 Input 行为
19257
+
17755
19258
 
17756
19259
  var p = (_this$props$schema$pr = this.props.schema.props) != null ? _this$props$schema$pr : {};
17757
19260
 
@@ -17762,10 +19265,10 @@ var ASpecInputBox = /*#__PURE__*/function (_BaseViewer) {
17762
19265
  return jsx(Input, _objectSpread$l(_objectSpread$l({}, _BaseViewer.prototype.antProp.call(this)), {}, {
17763
19266
  defaultValue: _BaseViewer.prototype.getValue.call(this),
17764
19267
  onBlur: function onBlur() {
17765
- return _this.changeValueEx(_BaseViewer.prototype.getValue.call(_this), false, true);
19268
+ return _this2.changeValueEx(_BaseViewer.prototype.getValue.call(_this2), false, true);
17766
19269
  },
17767
19270
  onChange: function onChange(v) {
17768
- _this.changeValueEx(v.target.value, false, false);
19271
+ _this2.changeValueEx(v.target.value, false, false);
17769
19272
 
17770
19273
  selfOnChange && selfOnChange(v);
17771
19274
  }