@fmdevui/fm-dev 1.0.86 → 1.0.87

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.
@@ -57,9 +57,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
57
57
  if (newValue.length < 2) {
58
58
  return;
59
59
  }
60
- let cityobj = chkeCity(newValue.substr(0, 2));
60
+ let cityobj = chkeCity(province, newValue.substr(0, 2));
61
61
  if (cityobj.c == "" && newValue.length > 2) {
62
- cityobj = chkeCity(newValue.substr(0, 3));
62
+ cityobj = chkeCity(province, newValue.substr(0, 3));
63
63
  if (cityobj.c != "" && province == "") {
64
64
  province = cityobj.p;
65
65
  }
@@ -68,29 +68,29 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
68
68
  if (newValue.length < 2) {
69
69
  return;
70
70
  }
71
- let countyOjb = chkeCounty(newValue.substr(0, 2));
71
+ let countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 2));
72
72
  if (countyOjb.x == "" && newValue.length > 2) {
73
- countyOjb = chkeCounty(newValue.substr(0, 3));
73
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 3));
74
74
  if (countyOjb.x == "" && newValue.length > 3) {
75
- countyOjb = chkeCounty(newValue.substr(0, 4));
75
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 4));
76
76
  if (countyOjb.x == "" && newValue.length > 4) {
77
- countyOjb = chkeCounty(newValue.substr(0, 5));
77
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 5));
78
78
  if (countyOjb.x == "" && newValue.length > 5) {
79
- countyOjb = chkeCounty(newValue.substr(0, 6));
79
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 6));
80
80
  if (countyOjb.x == "" && newValue.length > 6) {
81
- countyOjb = chkeCounty(newValue.substr(0, 7));
81
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 7));
82
82
  if (countyOjb.x == "" && newValue.length > 7) {
83
- countyOjb = chkeCounty(newValue.substr(0, 8));
83
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 8));
84
84
  if (countyOjb.x == "" && newValue.length > 8) {
85
- countyOjb = chkeCounty(newValue.substr(0, 9));
85
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 9));
86
86
  if (countyOjb.x == "" && newValue.length > 9) {
87
- countyOjb = chkeCounty(newValue.substr(0, 10));
87
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 10));
88
88
  if (countyOjb.x == "" && newValue.length > 10) {
89
- countyOjb = chkeCounty(newValue.substr(0, 11));
89
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 11));
90
90
  if (countyOjb.x == "" && newValue.length > 11) {
91
- countyOjb = chkeCounty(newValue.substr(0, 12));
91
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 12));
92
92
  if (countyOjb.x == "" && newValue.length > 12) {
93
- countyOjb = chkeCounty(newValue.substr(0, 13));
93
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 13));
94
94
  }
95
95
  }
96
96
  }
@@ -180,7 +180,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
180
180
  }
181
181
  return province;
182
182
  };
183
- const chkeCity = (val) => {
183
+ const chkeCity = (province, val) => {
184
184
  if (val == null || val == void 0 || val == "") {
185
185
  return { p: "", c: "" };
186
186
  }
@@ -190,15 +190,24 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
190
190
  const arrTemp = cityData[i].split("|");
191
191
  const arr = arrTemp.filter((item) => item == val);
192
192
  if (arr && arr.length > 0) {
193
- cityobj.p = cityData[i].split("|")[0];
194
- cityobj.c = cityData[i].split("|")[1];
193
+ if (province != "") {
194
+ if (cityData[i].split("|")[0] == province) {
195
+ cityobj.p = cityData[i].split("|")[0];
196
+ cityobj.c = cityData[i].split("|")[1];
197
+ break;
198
+ }
199
+ } else {
200
+ cityobj.p = cityData[i].split("|")[0];
201
+ cityobj.c = cityData[i].split("|")[1];
202
+ break;
203
+ }
195
204
  break;
196
205
  }
197
206
  }
198
207
  }
199
208
  return cityobj;
200
209
  };
201
- const chkeCounty = (val) => {
210
+ const chkeCounty = (province, city, val) => {
202
211
  if (val == null || val == void 0 || val == "") {
203
212
  return { p: "", c: "", x: "" };
204
213
  }
@@ -208,10 +217,19 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
208
217
  const arrTemp = countyData[i].split("|");
209
218
  const arr = arrTemp.filter((item) => item == val);
210
219
  if (arr && arr.length > 0) {
211
- countyobj.p = countyData[i].split("|")[0];
212
- countyobj.c = countyData[i].split("|")[1];
213
- countyobj.x = countyData[i].split("|")[2];
214
- break;
220
+ if (province != "" && city != "") {
221
+ if (countyData[i].split("|")[0] == province && countyData[i].split("|")[1] == city) {
222
+ countyobj.p = countyData[i].split("|")[0];
223
+ countyobj.c = countyData[i].split("|")[1];
224
+ countyobj.x = countyData[i].split("|")[2];
225
+ break;
226
+ }
227
+ } else {
228
+ countyobj.p = countyData[i].split("|")[0];
229
+ countyobj.c = countyData[i].split("|")[1];
230
+ countyobj.x = countyData[i].split("|")[2];
231
+ break;
232
+ }
215
233
  }
216
234
  }
217
235
  }
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.86 */
1
+ /*! fm-dev v1.0.87 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
@@ -37788,9 +37788,9 @@
37788
37788
  if (newValue.length < 2) {
37789
37789
  return;
37790
37790
  }
37791
- let cityobj = chkeCity(newValue.substr(0, 2));
37791
+ let cityobj = chkeCity(province, newValue.substr(0, 2));
37792
37792
  if (cityobj.c == "" && newValue.length > 2) {
37793
- cityobj = chkeCity(newValue.substr(0, 3));
37793
+ cityobj = chkeCity(province, newValue.substr(0, 3));
37794
37794
  if (cityobj.c != "" && province == "") {
37795
37795
  province = cityobj.p;
37796
37796
  }
@@ -37799,29 +37799,29 @@
37799
37799
  if (newValue.length < 2) {
37800
37800
  return;
37801
37801
  }
37802
- let countyOjb = chkeCounty(newValue.substr(0, 2));
37802
+ let countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 2));
37803
37803
  if (countyOjb.x == "" && newValue.length > 2) {
37804
- countyOjb = chkeCounty(newValue.substr(0, 3));
37804
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 3));
37805
37805
  if (countyOjb.x == "" && newValue.length > 3) {
37806
- countyOjb = chkeCounty(newValue.substr(0, 4));
37806
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 4));
37807
37807
  if (countyOjb.x == "" && newValue.length > 4) {
37808
- countyOjb = chkeCounty(newValue.substr(0, 5));
37808
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 5));
37809
37809
  if (countyOjb.x == "" && newValue.length > 5) {
37810
- countyOjb = chkeCounty(newValue.substr(0, 6));
37810
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 6));
37811
37811
  if (countyOjb.x == "" && newValue.length > 6) {
37812
- countyOjb = chkeCounty(newValue.substr(0, 7));
37812
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 7));
37813
37813
  if (countyOjb.x == "" && newValue.length > 7) {
37814
- countyOjb = chkeCounty(newValue.substr(0, 8));
37814
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 8));
37815
37815
  if (countyOjb.x == "" && newValue.length > 8) {
37816
- countyOjb = chkeCounty(newValue.substr(0, 9));
37816
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 9));
37817
37817
  if (countyOjb.x == "" && newValue.length > 9) {
37818
- countyOjb = chkeCounty(newValue.substr(0, 10));
37818
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 10));
37819
37819
  if (countyOjb.x == "" && newValue.length > 10) {
37820
- countyOjb = chkeCounty(newValue.substr(0, 11));
37820
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 11));
37821
37821
  if (countyOjb.x == "" && newValue.length > 11) {
37822
- countyOjb = chkeCounty(newValue.substr(0, 12));
37822
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 12));
37823
37823
  if (countyOjb.x == "" && newValue.length > 12) {
37824
- countyOjb = chkeCounty(newValue.substr(0, 13));
37824
+ countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 13));
37825
37825
  }
37826
37826
  }
37827
37827
  }
@@ -37911,7 +37911,7 @@
37911
37911
  }
37912
37912
  return province;
37913
37913
  };
37914
- const chkeCity = (val) => {
37914
+ const chkeCity = (province, val) => {
37915
37915
  if (val == null || val == void 0 || val == "") {
37916
37916
  return { p: "", c: "" };
37917
37917
  }
@@ -37921,15 +37921,24 @@
37921
37921
  const arrTemp = cityData[i].split("|");
37922
37922
  const arr = arrTemp.filter((item) => item == val);
37923
37923
  if (arr && arr.length > 0) {
37924
- cityobj.p = cityData[i].split("|")[0];
37925
- cityobj.c = cityData[i].split("|")[1];
37924
+ if (province != "") {
37925
+ if (cityData[i].split("|")[0] == province) {
37926
+ cityobj.p = cityData[i].split("|")[0];
37927
+ cityobj.c = cityData[i].split("|")[1];
37928
+ break;
37929
+ }
37930
+ } else {
37931
+ cityobj.p = cityData[i].split("|")[0];
37932
+ cityobj.c = cityData[i].split("|")[1];
37933
+ break;
37934
+ }
37926
37935
  break;
37927
37936
  }
37928
37937
  }
37929
37938
  }
37930
37939
  return cityobj;
37931
37940
  };
37932
- const chkeCounty = (val) => {
37941
+ const chkeCounty = (province, city, val) => {
37933
37942
  if (val == null || val == void 0 || val == "") {
37934
37943
  return { p: "", c: "", x: "" };
37935
37944
  }
@@ -37939,10 +37948,19 @@
37939
37948
  const arrTemp = countyData[i].split("|");
37940
37949
  const arr = arrTemp.filter((item) => item == val);
37941
37950
  if (arr && arr.length > 0) {
37942
- countyobj.p = countyData[i].split("|")[0];
37943
- countyobj.c = countyData[i].split("|")[1];
37944
- countyobj.x = countyData[i].split("|")[2];
37945
- break;
37951
+ if (province != "" && city != "") {
37952
+ if (countyData[i].split("|")[0] == province && countyData[i].split("|")[1] == city) {
37953
+ countyobj.p = countyData[i].split("|")[0];
37954
+ countyobj.c = countyData[i].split("|")[1];
37955
+ countyobj.x = countyData[i].split("|")[2];
37956
+ break;
37957
+ }
37958
+ } else {
37959
+ countyobj.p = countyData[i].split("|")[0];
37960
+ countyobj.c = countyData[i].split("|")[1];
37961
+ countyobj.x = countyData[i].split("|")[2];
37962
+ break;
37963
+ }
37946
37964
  }
37947
37965
  }
37948
37966
  }