jmash-region 0.0.2 → 0.0.3

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.
Files changed (31) hide show
  1. package/dist/{edit-BBgaXo7r.mjs → edit-BofAehfs.mjs} +1 -1
  2. package/dist/{edit.vue_vue_type_script_setup_true_lang-C4FJ1dMZ.mjs → edit.vue_vue_type_script_setup_true_lang-DIB1Rij-.mjs} +133 -134
  3. package/dist/{index-BuYbOeq6.mjs → index-BT93ZnZ1.mjs} +4 -5
  4. package/dist/index-C1Hml01a.mjs +1602 -0
  5. package/dist/{index-DWUZrsjg.mjs → index-Cm74yBxt.mjs} +2 -2
  6. package/dist/index.mjs +6 -1428
  7. package/dts/{index.d.ts → src/index.d.ts} +3 -2
  8. package/package.json +58 -58
  9. package/dist/index-C0q1Spk1.mjs +0 -4
  10. package/dist/index-CYXjL9hA.mjs +0 -4
  11. package/dist/index-S5ZXIciD.mjs +0 -12
  12. package/dist/index.vue_vue_type_script_setup_true_lang-BKzkVa9A.mjs +0 -63
  13. package/dist/index.vue_vue_type_script_setup_true_lang-DTmt2AA1.mjs +0 -58
  14. /package/dts/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
  15. /package/dts/{api → src/api}/region/dict.d.ts +0 -0
  16. /package/dts/{api → src/api}/region/index.d.ts +0 -0
  17. /package/dts/{api → src/api}/region/os-dict-region/index.d.ts +0 -0
  18. /package/dts/{api → src/api}/region/os-dict-region/types.d.ts +0 -0
  19. /package/dts/{components → src/components}/JmashRegionCascader/index.vue.d.ts +0 -0
  20. /package/dts/{components → src/components}/JmashRegionTree/index.vue.d.ts +0 -0
  21. /package/dts/{components → src/components}/JmashTable/index.vue.d.ts +0 -0
  22. /package/dts/{constant.d.ts → src/constant.d.ts} +0 -0
  23. /package/dts/{lang → src/lang}/index.d.ts +0 -0
  24. /package/dts/{lang → src/lang}/region/en.d.ts +0 -0
  25. /package/dts/{lang → src/lang}/region/zh-cn.d.ts +0 -0
  26. /package/dts/{main.d.ts → src/main.d.ts} +0 -0
  27. /package/dts/{permission.d.ts → src/permission.d.ts} +0 -0
  28. /package/dts/{utils → src/utils}/index.d.ts +0 -0
  29. /package/dts/{views → src/views}/region/os-dict-region/edit.vue.d.ts +0 -0
  30. /package/dts/{views → src/views}/region/os-dict-region/index.vue.d.ts +0 -0
  31. /package/dts/{views → src/views}/region/os-region-component/index.vue.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-C4FJ1dMZ.mjs";
1
+ import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-DIB1Rij-.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -4,9 +4,8 @@ var q = (n, i, g) => Dn(n, typeof i != "symbol" ? i + "" : i, g);
4
4
  import { ref as D, reactive as E, defineComponent as En, mergeModels as W, useModel as Nn, resolveComponent as k, openBlock as S, createBlock as A, withCtx as j, createElementVNode as Mn, createVNode as c, createTextVNode as Y, toDisplayString as H, unref as b, createElementBlock as Q, Fragment as J, renderList as X } from "vue";
5
5
  import { ElMessage as nn } from "element-plus";
6
6
  import { EnumDict as gn } from "jmash-core";
7
- import { dictRegionApi as I } from "./index.mjs";
8
- import { useI18n as Rn } from "vue-i18n";
9
- import { e as Zn } from "./index-S5ZXIciD.mjs";
7
+ import { d as I, e as Rn } from "./index-C1Hml01a.mjs";
8
+ import { useI18n as Zn } from "vue-i18n";
10
9
  class p {
11
10
  }
12
11
  // 模块
@@ -62,8 +61,8 @@ function M(n) {
62
61
  const i = [];
63
62
  let g = 0;
64
63
  for (; g < n.length; ) {
65
- const h = n[g];
66
- An.test(h) && Un.test(n[g + 1]) ? (i.push(n.substring(g, g + 2)), g += 2) : (i.push(h), g += 1);
64
+ const u = n[g];
65
+ An.test(u) && Un.test(n[g + 1]) ? (i.push(n.substring(g, g + 2)), g += 2) : (i.push(u), g += 1);
67
66
  }
68
67
  return i;
69
68
  }
@@ -83,8 +82,8 @@ class fn {
83
82
  if (i.length > 1)
84
83
  this.StringDICT.set(i, g);
85
84
  else {
86
- const h = i.charCodeAt(0);
87
- this.NumberDICT[h] = g;
85
+ const u = i.charCodeAt(0);
86
+ this.NumberDICT[u] = g;
88
87
  }
89
88
  }
90
89
  clear() {
@@ -18885,8 +18884,8 @@ function Kn() {
18885
18884
  };
18886
18885
  for (let i in sn)
18887
18886
  for (let g in on) {
18888
- const h = `${i}${g}`, u = `${sn[i]} ${on[g]}`;
18889
- n[h] = u;
18887
+ const u = `${i}${g}`, h = `${sn[i]} ${on[g]}`;
18888
+ n[u] = h;
18890
18889
  }
18891
18890
  return n;
18892
18891
  }
@@ -18917,11 +18916,11 @@ function Qn(n, i, g) {
18917
18916
  if (i === g && i && v(i) !== i)
18918
18917
  return Z(v(n));
18919
18918
  if (g && !Yn[n].includes(g)) {
18920
- const h = v(g);
18921
- if (h !== g) {
18922
- const u = V(h), o = wn[n];
18919
+ const u = v(g);
18920
+ if (u !== g) {
18921
+ const h = V(u), o = wn[n];
18923
18922
  for (let s in o)
18924
- if (o[s].indexOf(Number(u)) !== -1)
18923
+ if (o[s].indexOf(Number(h)) !== -1)
18925
18924
  return s;
18926
18925
  }
18927
18926
  }
@@ -23572,17 +23571,17 @@ function si(n) {
23572
23571
  }
23573
23572
  function oi(n, i) {
23574
23573
  const g = [];
23575
- let h = n.length - 1, u = n[h];
23574
+ let u = n.length - 1, h = n[u];
23576
23575
  for (let o = i - 1; o >= 0; o--) {
23577
23576
  const s = o + 1 >= i ? { probability: 1, decimal: 0, patterns: [] } : g[o + 1];
23578
- for (; u && u.index + u.length - 1 === o; ) {
23579
- const y = u.index, z = {
23580
- probability: u.probability * s.probability,
23581
- decimal: s.decimal + si(u),
23577
+ for (; h && h.index + h.length - 1 === o; ) {
23578
+ const y = h.index, z = {
23579
+ probability: h.probability * s.probability,
23580
+ decimal: s.decimal + si(h),
23582
23581
  patterns: s.patterns,
23583
- concatPattern: u
23582
+ concatPattern: h
23584
23583
  };
23585
- jn(z), g[y] = en(g[y], z), u = n[--h];
23584
+ jn(z), g[y] = en(g[y], z), h = n[--u];
23586
23585
  }
23587
23586
  const l = {
23588
23587
  probability: 1e-13 * s.probability,
@@ -23601,16 +23600,16 @@ function li(n) {
23601
23600
  }
23602
23601
  function zi(n, i) {
23603
23602
  const g = [];
23604
- let h = n.length - 1, u = n[h];
23603
+ let u = n.length - 1, h = n[u];
23605
23604
  for (let o = i - 1; o >= 0; o--) {
23606
23605
  const s = o + 1 >= i ? { count: 0, patterns: [] } : g[o + 1];
23607
- for (; u && u.index + u.length - 1 === o; ) {
23608
- const y = u.index, z = {
23609
- count: li(u) + s.count,
23606
+ for (; h && h.index + h.length - 1 === o; ) {
23607
+ const y = h.index, z = {
23608
+ count: li(h) + s.count,
23610
23609
  patterns: s.patterns,
23611
- concatPattern: u
23610
+ concatPattern: h
23612
23611
  };
23613
- g[y] = rn(g[y], z), u = n[--h];
23612
+ g[y] = rn(g[y], z), h = n[--u];
23614
23613
  }
23615
23614
  const l = {
23616
23615
  count: 1 + s.count,
@@ -23626,11 +23625,11 @@ function yi(n, i) {
23626
23625
  function ti(n) {
23627
23626
  const i = [];
23628
23627
  for (let g = n.length - 1; g >= 0; ) {
23629
- const { index: h } = n[g];
23630
- let u = g - 1;
23631
- for (; u >= 0 && yi(n[g], n[u]); )
23632
- u--;
23633
- (u < 0 || n[u].index + n[u].length <= h) && i.push(n[g]), g = u;
23628
+ const { index: u } = n[g];
23629
+ let h = g - 1;
23630
+ for (; h >= 0 && yi(n[g], n[h]); )
23631
+ h--;
23632
+ (h < 0 || n[h].index + n[h].length <= u) && i.push(n[g]), g = h;
23634
23633
  }
23635
23634
  return i.reverse();
23636
23635
  }
@@ -23639,8 +23638,8 @@ var bn;
23639
23638
  n[n.ReverseMaxMatch = 1] = "ReverseMaxMatch", n[n.MaxProbability = 2] = "MaxProbability", n[n.MinTokenization = 3] = "MinTokenization";
23640
23639
  })(bn || (bn = {}));
23641
23640
  class xn {
23642
- constructor(i, g = "", h = "") {
23643
- this.children = /* @__PURE__ */ new Map(), this.fail = null, this.patterns = [], this.parent = i, this.prefix = g, this.key = h;
23641
+ constructor(i, g = "", u = "") {
23642
+ this.children = /* @__PURE__ */ new Map(), this.fail = null, this.patterns = [], this.parent = i, this.prefix = g, this.key = u;
23644
23643
  }
23645
23644
  }
23646
23645
  class ci {
@@ -23653,29 +23652,29 @@ class ci {
23653
23652
  // 构建 trie 树
23654
23653
  buildTrie(i) {
23655
23654
  for (let g of i) {
23656
- const h = M(g.zh);
23657
- let u = this.root;
23658
- for (let o = 0; o < h.length; o++) {
23659
- let s = h[o];
23660
- if (!u.children.has(s)) {
23661
- const l = new xn(u, h.slice(0, o).join(""), s);
23662
- u.children.set(s, l), this.addNodeToQueues(l);
23655
+ const u = M(g.zh);
23656
+ let h = this.root;
23657
+ for (let o = 0; o < u.length; o++) {
23658
+ let s = u[o];
23659
+ if (!h.children.has(s)) {
23660
+ const l = new xn(h, u.slice(0, o).join(""), s);
23661
+ h.children.set(s, l), this.addNodeToQueues(l);
23663
23662
  }
23664
- u = u.children.get(s);
23663
+ h = h.children.get(s);
23665
23664
  }
23666
- this.insertPattern(u.patterns, g), g.node = u, this.addPatternToDictMap(g);
23665
+ this.insertPattern(h.patterns, g), g.node = h, this.addPatternToDictMap(g);
23667
23666
  }
23668
23667
  }
23669
23668
  // 构建失败指针
23670
23669
  buildFailPointer() {
23671
23670
  let i = [], g = 0;
23672
- for (this.queues.forEach((h) => {
23673
- i = i.concat(h);
23671
+ for (this.queues.forEach((u) => {
23672
+ i = i.concat(u);
23674
23673
  }), this.queues = []; i.length > g; ) {
23675
- let h = i[g++], u = h.parent && h.parent.fail, o = h.key;
23676
- for (; u && !u.children.has(o); )
23677
- u = u.fail;
23678
- u ? h.fail = u.children.get(o) : h.fail = this.root;
23674
+ let u = i[g++], h = u.parent && u.parent.fail, o = u.key;
23675
+ for (; h && !h.children.has(o); )
23676
+ h = h.fail;
23677
+ h ? u.fail = h.children.get(o) : u.fail = this.root;
23679
23678
  }
23680
23679
  }
23681
23680
  // 将 pattern 添加到 dictMap 中
@@ -23687,50 +23686,50 @@ class ci {
23687
23686
  }
23688
23687
  // 按照优先级插入 pattern
23689
23688
  insertPattern(i, g) {
23690
- for (let h = i.length - 1; h >= 0; h--) {
23691
- const u = i[h];
23692
- if (g.priority === u.priority && g.probability >= u.probability)
23693
- i[h + 1] = u;
23694
- else if (g.priority > u.priority)
23695
- i[h + 1] = u;
23689
+ for (let u = i.length - 1; u >= 0; u--) {
23690
+ const h = i[u];
23691
+ if (g.priority === h.priority && g.probability >= h.probability)
23692
+ i[u + 1] = h;
23693
+ else if (g.priority > h.priority)
23694
+ i[u + 1] = h;
23696
23695
  else {
23697
- i[h + 1] = g;
23696
+ i[u + 1] = g;
23698
23697
  return;
23699
23698
  }
23700
23699
  }
23701
23700
  i[0] = g;
23702
23701
  }
23703
23702
  removeDict(i) {
23704
- this.dictMap.has(i) && (this.dictMap.get(i).forEach((h) => {
23705
- h.node.patterns = h.node.patterns.filter((u) => u !== h);
23703
+ this.dictMap.has(i) && (this.dictMap.get(i).forEach((u) => {
23704
+ u.node.patterns = u.node.patterns.filter((h) => h !== u);
23706
23705
  }), this.dictMap.delete(i));
23707
23706
  }
23708
23707
  // 搜索字符串返回匹配的模式串
23709
23708
  match(i, g) {
23710
- let h = this.root, u = [];
23709
+ let u = this.root, h = [];
23711
23710
  const o = M(i);
23712
23711
  for (let s = 0; s < o.length; s++) {
23713
23712
  let l = o[s];
23714
- for (; h !== null && !h.children.has(l); )
23715
- h = h.fail;
23716
- if (h === null)
23717
- h = this.root;
23713
+ for (; u !== null && !u.children.has(l); )
23714
+ u = u.fail;
23715
+ if (u === null)
23716
+ u = this.root;
23718
23717
  else {
23719
- h = h.children.get(l);
23720
- const y = h.patterns.find((r) => g === "off" ? r.priority !== f.Surname : g === "head" ? r.length - 1 - s === 0 : !0);
23721
- y && u.push(Object.assign(Object.assign({}, y), { index: s - y.length + 1 }));
23722
- let z = h.fail;
23718
+ u = u.children.get(l);
23719
+ const y = u.patterns.find((r) => g === "off" ? r.priority !== f.Surname : g === "head" ? r.length - 1 - s === 0 : !0);
23720
+ y && h.push(Object.assign(Object.assign({}, y), { index: s - y.length + 1 }));
23721
+ let z = u.fail;
23723
23722
  for (; z !== null; ) {
23724
23723
  const r = z.patterns.find((m) => g === "off" ? m.priority !== f.Surname : g === "head" ? m.length - 1 - s === 0 : !0);
23725
- r && u.push(Object.assign(Object.assign({}, r), { index: s - r.length + 1 })), z = z.fail;
23724
+ r && h.push(Object.assign(Object.assign({}, r), { index: s - r.length + 1 })), z = z.fail;
23726
23725
  }
23727
23726
  }
23728
23727
  }
23729
- return u;
23728
+ return h;
23730
23729
  }
23731
- search(i, g, h = 2) {
23732
- const u = this.match(i, g);
23733
- return h === 1 ? ti(u) : h === 3 ? zi(u, a(i)) : oi(u, a(i));
23730
+ search(i, g, u = 2) {
23731
+ const h = this.match(i, g);
23732
+ return u === 1 ? ti(h) : u === 3 ? zi(h, a(i)) : oi(h, a(i));
23734
23733
  }
23735
23734
  }
23736
23735
  const di = [
@@ -23745,12 +23744,12 @@ qn.build(di);
23745
23744
  const ei = new fn(), ji = () => ei, v = (n) => {
23746
23745
  const i = _.get(n);
23747
23746
  return i ? i.split(" ")[0] : n;
23748
- }, ri = (n, i, g, h) => {
23749
- const u = qn.search(n, g, h);
23747
+ }, ri = (n, i, g, u) => {
23748
+ const h = qn.search(n, g, u);
23750
23749
  let o = 0;
23751
23750
  const s = M(n);
23752
23751
  for (let l = 0; l < s.length; ) {
23753
- const y = u[o];
23752
+ const y = h[o];
23754
23753
  if (y && l === y.index) {
23755
23754
  if (y.length === 1 && y.priority <= f.Normal) {
23756
23755
  const m = s[l];
@@ -23786,24 +23785,24 @@ const ei = new fn(), ji = () => ei, v = (n) => {
23786
23785
  }, l++;
23787
23786
  }
23788
23787
  }
23789
- return { list: i, matches: u };
23788
+ return { list: i, matches: h };
23790
23789
  }, Z = (n) => n.replace(/(ā|á|ǎ|à)/g, "a").replace(/(ō|ó|ǒ|ò)/g, "o").replace(/(ē|é|ě|è)/g, "e").replace(/(ī|í|ǐ|ì)/g, "i").replace(/(ū|ú|ǔ|ù)/g, "u").replace(/(ǖ|ǘ|ǚ|ǜ)/g, "ü").replace(/(n̄|ń|ň|ǹ)/g, "n").replace(/(m̄|ḿ|m̌|m̀)/g, "m").replace(/(ê̄|ế|ê̌|ề)/g, "ê"), pn = (n, i = "off") => {
23791
23790
  const g = ji();
23792
- let h = _.get(n) ? _.get(n).split(" ") : [];
23791
+ let u = _.get(n) ? _.get(n).split(" ") : [];
23793
23792
  if (g.get(n))
23794
- h = g.get(n).split(" ");
23793
+ u = g.get(n).split(" ");
23795
23794
  else if (i !== "off") {
23796
- const u = $[n];
23797
- u && (h = [u].concat(h.filter((o) => o !== u)));
23795
+ const h = $[n];
23796
+ h && (u = [h].concat(u.filter((o) => o !== h)));
23798
23797
  }
23799
- return h;
23798
+ return u;
23800
23799
  }, bi = (n, i = "off") => {
23801
23800
  let g = pn(n, i);
23802
- return g.length > 0 ? g.map((h) => ({
23801
+ return g.length > 0 ? g.map((u) => ({
23803
23802
  origin: n,
23804
- result: h,
23803
+ result: u,
23805
23804
  isZh: !0,
23806
- originPinyin: h
23805
+ originPinyin: u
23807
23806
  })) : [
23808
23807
  {
23809
23808
  origin: n,
@@ -23813,38 +23812,38 @@ const ei = new fn(), ji = () => ei, v = (n) => {
23813
23812
  }
23814
23813
  ];
23815
23814
  }, R = (n) => {
23816
- const i = n.split(" "), g = [], h = [];
23817
- for (let u of i)
23815
+ const i = n.split(" "), g = [], u = [];
23816
+ for (let h of i)
23818
23817
  for (let o of On)
23819
- if (u.startsWith(o)) {
23820
- let s = u.slice(o.length);
23821
- Ln.indexOf(o) !== -1 && Bn.indexOf(s) !== -1 && (s = Fn[s]), g.push(o), h.push(s);
23818
+ if (h.startsWith(o)) {
23819
+ let s = h.slice(o.length);
23820
+ Ln.indexOf(o) !== -1 && Bn.indexOf(s) !== -1 && (s = Fn[s]), g.push(o), u.push(s);
23822
23821
  break;
23823
23822
  }
23824
23823
  return {
23825
- final: h.join(" "),
23824
+ final: u.join(" "),
23826
23825
  initial: g.join(" ")
23827
23826
  // 声母
23828
23827
  };
23829
23828
  }, N = (n) => {
23830
23829
  const { final: i } = R(n);
23831
- let g = "", h = "", u = "";
23832
- return Gn.indexOf(Z(i)) !== -1 ? (g = i[0], h = i[1], u = i.slice(2)) : (h = i[0] || "", u = i.slice(1) || ""), { head: g, body: h, tail: u };
23830
+ let g = "", u = "", h = "";
23831
+ return Gn.indexOf(Z(i)) !== -1 ? (g = i[0], u = i[1], h = i.slice(2)) : (u = i[0] || "", h = i.slice(1) || ""), { head: g, body: u, tail: h };
23833
23832
  }, V = (n) => {
23834
- const i = /(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/, g = /(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/, h = /(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/, u = /(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/, o = /(a|o|e|i|u|ü|ê)/, s = /(n|m)$/, l = [];
23833
+ const i = /(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/, g = /(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/, u = /(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/, h = /(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/, o = /(a|o|e|i|u|ü|ê)/, s = /(n|m)$/, l = [];
23835
23834
  return n.split(" ").forEach((z) => {
23836
- i.test(z) ? l.push("1") : g.test(z) ? l.push("2") : h.test(z) ? l.push("3") : u.test(z) ? l.push("4") : o.test(z) || s.test(z) ? l.push("0") : l.push("");
23835
+ i.test(z) ? l.push("1") : g.test(z) ? l.push("2") : u.test(z) ? l.push("3") : h.test(z) ? l.push("4") : o.test(z) || s.test(z) ? l.push("0") : l.push("");
23837
23836
  }), l.join(" ");
23838
23837
  }, xi = (n, i) => {
23839
- const g = Z(n).split(" "), h = V(i).split(" "), u = [];
23838
+ const g = Z(n).split(" "), u = V(i).split(" "), h = [];
23840
23839
  return g.forEach((o, s) => {
23841
- u.push(`${o}${h[s]}`);
23842
- }), u.join(" ");
23843
- }, an = (n) => {
23844
- const i = [];
23840
+ h.push(`${o}${u[s]}`);
23841
+ }), h.join(" ");
23842
+ }, an = (n, i) => {
23843
+ const g = [];
23845
23844
  return n.split(" ").forEach((h) => {
23846
- i.push(h[0]);
23847
- }), i.join(" ");
23845
+ g.push(i ? h[0] : h);
23846
+ }), g.join(" ");
23848
23847
  }, mi = (n) => typeof n != "string" ? (console.error("The first param of pinyin is error: " + n + ' is not assignable to type "string".'), !1) : !0;
23849
23848
  function U(n, i) {
23850
23849
  return i instanceof RegExp ? i.test(n) : !0;
@@ -23852,13 +23851,13 @@ function U(n, i) {
23852
23851
  const fi = (n, i) => {
23853
23852
  let g = i.nonZh;
23854
23853
  if (g === "removed")
23855
- return n.filter((h) => h.isZh || !U(h.origin, i.nonZhScope));
23854
+ return n.filter((u) => u.isZh || !U(u.origin, i.nonZhScope));
23856
23855
  if (g === "consecutive") {
23857
- for (let h = n.length - 2; h >= 0; h--) {
23858
- const u = n[h], o = n[h + 1];
23859
- !u.isZh && !o.isZh && U(u.origin, i.nonZhScope) && U(o.origin, i.nonZhScope) && (u.origin += o.origin, u.result += o.result, o.delete = !0);
23856
+ for (let u = n.length - 2; u >= 0; u--) {
23857
+ const h = n[u], o = n[u + 1];
23858
+ !h.isZh && !o.isZh && U(h.origin, i.nonZhScope) && U(o.origin, i.nonZhScope) && (h.origin += o.origin, h.result += o.result, o.delete = !0);
23860
23859
  }
23861
- return n.filter((h) => !h.delete);
23860
+ return n.filter((u) => !u.delete);
23862
23861
  } else
23863
23862
  return n;
23864
23863
  }, mn = (n, i) => a(n) === 1 && i.multiple ? bi(n, i.surname) : !1, wi = (n, i) => {
@@ -23882,7 +23881,7 @@ const fi = (n, i) => {
23882
23881
  break;
23883
23882
  case "first":
23884
23883
  n.forEach((g) => {
23885
- g.result = an(g.result);
23884
+ g.result = an(g.result, g.isZh);
23886
23885
  });
23887
23886
  break;
23888
23887
  case "finalHead":
@@ -23923,31 +23922,31 @@ const fi = (n, i) => {
23923
23922
  });
23924
23923
  }, ai = (n, i, g) => {
23925
23924
  if (i.multiple && a(g) === 1) {
23926
- let h = "";
23927
- n = n.filter((u) => {
23928
- const o = u.result !== h;
23929
- return h = u.result, o;
23925
+ let u = "";
23926
+ n = n.filter((h) => {
23927
+ const o = h.result !== u;
23928
+ return u = h.result, o;
23930
23929
  });
23931
23930
  }
23932
- return i.type === "array" ? n.map((h) => h.result) : i.type === "all" ? n.map((h) => {
23933
- const u = h.isZh ? h.result : "", { initial: o, final: s } = R(u), { head: l, body: y, tail: z } = N(u);
23931
+ return i.type === "array" ? n.map((u) => u.result) : i.type === "all" ? n.map((u) => {
23932
+ const h = u.isZh ? u.result : "", { initial: o, final: s } = R(h), { head: l, body: y, tail: z } = N(h);
23934
23933
  let r = [];
23935
- return u !== "" && (r = [u].concat(pn(h.origin, i.surname).filter((m) => m !== u))), {
23936
- origin: h.origin,
23937
- pinyin: u,
23934
+ return h !== "" && (r = [h].concat(pn(u.origin, i.surname).filter((m) => m !== h))), {
23935
+ origin: u.origin,
23936
+ pinyin: h,
23938
23937
  initial: o,
23939
23938
  final: s,
23940
- first: h.isZh ? an(h.result) : "",
23939
+ first: an(u.result, u.isZh),
23941
23940
  finalHead: l,
23942
23941
  finalBody: y,
23943
23942
  finalTail: z,
23944
- num: Number(V(h.originPinyin)),
23945
- isZh: h.isZh,
23943
+ num: Number(V(u.originPinyin)),
23944
+ isZh: u.isZh,
23946
23945
  polyphonic: r,
23947
- inZhRange: !!_.get(h.origin),
23948
- result: h.result
23946
+ inZhRange: !!_.get(u.origin),
23947
+ result: u.result
23949
23948
  };
23950
- }) : n.map((h) => h.result).join(i.separator);
23949
+ }) : n.map((u) => u.result).join(i.separator);
23951
23950
  }, ki = (n, i) => (i === !1 && n.forEach((g) => {
23952
23951
  g.origin === "一" ? g.result = g.originPinyin = "yī" : g.origin === "不" && (g.result = g.originPinyin = "bù");
23953
23952
  }), n), Pi = {
@@ -23969,15 +23968,15 @@ function _i(n, i) {
23969
23968
  if (n === "")
23970
23969
  return i.type === "array" || i.type === "all" ? [] : "";
23971
23970
  i.surname === void 0 && (i.mode === "surname" ? i.surname = "all" : i.surname = "off"), i.type === "all" && (i.pattern = "pinyin"), i.pattern === "num" && (i.toneType = "none"), i.removeNonZh && (i.nonZh = "removed");
23972
- let h = Array(a(n)), { list: u } = ri(n, h, i.surname, i.segmentit);
23973
- return u = ki(u, i.toneSandhi), u = fi(u, i), mn(n, i) && (u = mn(n, i)), wi(u, i), qi(u, i), pi(u, i), ai(u, i, n);
23971
+ let u = Array(a(n)), { list: h } = ri(n, u, i.surname, i.segmentit);
23972
+ return h = ki(h, i.toneSandhi), h = fi(h, i), mn(n, i) && (h = mn(n, i)), wi(h, i), qi(h, i), pi(h, i), ai(h, i, n);
23974
23973
  }
23975
23974
  var O;
23976
23975
  (function(n) {
23977
23976
  n[n.AllSegment = 1] = "AllSegment", n[n.AllArray = 2] = "AllArray", n[n.AllString = 3] = "AllString", n[n.PinyinSegment = 4] = "PinyinSegment", n[n.PinyinArray = 5] = "PinyinArray", n[n.PinyinString = 6] = "PinyinString", n[n.ZhSegment = 7] = "ZhSegment", n[n.ZhArray = 8] = "ZhArray", n[n.ZhString = 9] = "ZhString";
23978
23977
  })(O || (O = {}));
23979
23978
  O.AllSegment;
23980
- const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
23979
+ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
23981
23980
  __name: "edit",
23982
23981
  props: /* @__PURE__ */ W({
23983
23982
  entityKey: {
@@ -23995,7 +23994,7 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
23995
23994
  }),
23996
23995
  emits: /* @__PURE__ */ W(["refresh", "reload"], ["update:modelValue"]),
23997
23996
  setup(n, { emit: i }) {
23998
- const { t: g } = Rn(), h = D(), u = Nn(n, "modelValue"), o = i;
23997
+ const { t: g } = Zn(), u = D(), h = Nn(n, "modelValue"), o = i;
23999
23998
  let s = E({
24000
23999
  requestId: Math.random() * 10 + "",
24001
24000
  updateMask: "parentId,regionCode,regionName,regionPinyin,regionType,regionCategory,description",
@@ -24043,7 +24042,7 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24043
24042
  });
24044
24043
  const z = D([]), r = (t) => {
24045
24044
  I.findByCode({ regionCode: t }).then(({ data: e }) => {
24046
- const x = Zn(e);
24045
+ const x = Rn(e);
24047
24046
  z.value = x.regionIds;
24048
24047
  });
24049
24048
  }, m = Object.keys(y.entityKey), P = D(m.length >= 1), L = E({});
@@ -24052,14 +24051,14 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24052
24051
  });
24053
24052
  const kn = () => {
24054
24053
  var t;
24055
- (t = h.value) == null || t.validate((e) => {
24054
+ (t = u.value) == null || t.validate((e) => {
24056
24055
  if (e) {
24057
24056
  if (P.value) {
24058
24057
  I.update(s).then((x) => {
24059
24058
  x.status === 200 && (nn({
24060
24059
  message: g("common.submitSuccess"),
24061
24060
  type: "success"
24062
- }), u.value && (u.value = !1), o("refresh", x.status === 200), o("reload", L, x.data));
24061
+ }), h.value && (h.value = !1), o("refresh", x.status === 200), o("reload", L, x.data));
24063
24062
  });
24064
24063
  return;
24065
24064
  }
@@ -24067,7 +24066,7 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24067
24066
  x.status === 200 && (nn({
24068
24067
  message: g("common.submitSuccess"),
24069
24068
  type: "success"
24070
- }), u.value && (u.value = !1), o("refresh", x.status === 200, s), o("reload", x.data));
24069
+ }), h.value && (h.value = !1), o("refresh", x.status === 200, s), o("reload", x.data));
24071
24070
  });
24072
24071
  }
24073
24072
  });
@@ -24081,7 +24080,7 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24081
24080
  separator: ""
24082
24081
  }).toUpperCase();
24083
24082
  }, B = () => {
24084
- u.value && (u.value = !1);
24083
+ h.value && (h.value = !1);
24085
24084
  }, _n = (t, e) => {
24086
24085
  I.findList({
24087
24086
  parentId: t.data.regionId,
@@ -24095,8 +24094,8 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24095
24094
  return (t, e) => {
24096
24095
  const x = k("el-input"), w = k("el-form-item"), C = k("el-col"), F = k("el-radio"), G = k("el-radio-group"), Cn = k("el-tree-select"), In = k("el-row"), Sn = k("el-form"), K = k("el-button"), vn = k("el-dialog");
24097
24096
  return S(), A(vn, {
24098
- modelValue: u.value,
24099
- "onUpdate:modelValue": e[7] || (e[7] = (d) => u.value = d),
24097
+ modelValue: h.value,
24098
+ "onUpdate:modelValue": e[7] || (e[7] = (d) => h.value = d),
24100
24099
  onClose: B
24101
24100
  }, {
24102
24101
  footer: j(() => [
@@ -24121,7 +24120,7 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24121
24120
  default: j(() => [
24122
24121
  c(Sn, {
24123
24122
  ref_key: "dictRegionFormRef",
24124
- ref: h,
24123
+ ref: u,
24125
24124
  model: b(s),
24126
24125
  "label-width": "120px",
24127
24126
  rules: l
@@ -24312,5 +24311,5 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24312
24311
  export {
24313
24312
  p as C,
24314
24313
  T as D,
24315
- Mi as _
24314
+ Ni as _
24316
24315
  };
@@ -1,11 +1,10 @@
1
1
  import { defineComponent as i, ref as s, resolveComponent as n, openBlock as _, createElementBlock as c, createVNode as o, withCtx as l, createTextVNode as d, toDisplayString as m } from "vue";
2
- import { _ as f } from "./index.vue_vue_type_script_setup_true_lang-BKzkVa9A.mjs";
3
- import { _ as p } from "./index.vue_vue_type_script_setup_true_lang-DTmt2AA1.mjs";
4
- const C = { class: "app-container" }, T = /* @__PURE__ */ i({
2
+ import { _ as f, a as p } from "./index-C1Hml01a.mjs";
3
+ const C = { class: "app-container" }, x = /* @__PURE__ */ i({
5
4
  __name: "index",
6
5
  setup(g) {
7
6
  const e = s({
8
- regionCodeTree: "",
7
+ regionCodeTree: "141024100",
9
8
  regionCodeCascader: ["14", "1410", "141024", "141024100", "141024100231"]
10
9
  });
11
10
  return (v, a) => {
@@ -59,5 +58,5 @@ const C = { class: "app-container" }, T = /* @__PURE__ */ i({
59
58
  }
60
59
  });
61
60
  export {
62
- T as default
61
+ x as default
63
62
  };