@aplus-frontend/ui 7.17.0 → 7.17.1

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 (121) hide show
  1. package/es/src/ap-field/cascader/index.vue.mjs +86 -131
  2. package/es/src/ap-field/cascader/read.vue2.mjs +36 -35
  3. package/es/src/ap-field/checkbox/index.vue.d.ts +18 -1
  4. package/es/src/ap-field/checkbox/index.vue.mjs +42 -43
  5. package/es/src/ap-field/checkbox/read.vue2.mjs +1 -1
  6. package/es/src/ap-field/date/index.vue.mjs +48 -48
  7. package/es/src/ap-field/date/read.vue2.mjs +1 -1
  8. package/es/src/ap-field/date-range/index.vue.mjs +31 -31
  9. package/es/src/ap-field/date-range/read.vue2.mjs +1 -1
  10. package/es/src/ap-field/interface.d.ts +7 -22
  11. package/es/src/ap-field/number/index.vue.mjs +36 -34
  12. package/es/src/ap-field/number/read.vue2.mjs +1 -1
  13. package/es/src/ap-field/radio/index.vue.mjs +34 -42
  14. package/es/src/ap-field/radio/read.vue2.mjs +1 -1
  15. package/es/src/ap-field/rate/index.vue.mjs +23 -23
  16. package/es/src/ap-field/second/index.vue.mjs +27 -29
  17. package/es/src/ap-field/second/read.vue2.mjs +2 -2
  18. package/es/src/ap-field/segmented/index.vue.mjs +37 -37
  19. package/es/src/ap-field/select/index.vue.mjs +90 -92
  20. package/es/src/ap-field/select/read.vue2.mjs +1 -1
  21. package/es/src/ap-field/slider/index.vue.mjs +35 -37
  22. package/es/src/ap-field/switch/index.vue.mjs +38 -38
  23. package/es/src/ap-field/switch/read.vue2.mjs +3 -3
  24. package/es/src/ap-field/text/index.vue.d.ts +478 -3
  25. package/es/src/ap-field/text/index.vue2.mjs +47 -46
  26. package/es/src/ap-field/text/password.vue.d.ts +549 -3
  27. package/es/src/ap-field/text/password.vue.mjs +61 -56
  28. package/es/src/ap-field/text/read-password.vue2.mjs +16 -16
  29. package/es/src/ap-field/text/read.vue2.mjs +1 -1
  30. package/es/src/ap-field/text-area/index.vue.mjs +29 -31
  31. package/es/src/ap-field/text-area/read.vue2.mjs +1 -1
  32. package/es/src/ap-field/tree-select/index.vue.mjs +47 -47
  33. package/es/src/ap-field/tree-select/read.vue2.mjs +3 -3
  34. package/es/src/ap-form/drawer-form/index.vue.mjs +99 -90
  35. package/es/src/ap-form/hooks/use-regist-form.d.ts +7 -0
  36. package/es/src/ap-form/hooks/use-regist-form.mjs +24 -0
  37. package/es/src/ap-form/item/index.vue.d.ts +6 -6
  38. package/es/src/ap-form/item/index.vue.mjs +85 -94
  39. package/es/src/ap-form/item-group/index.vue.mjs +14 -14
  40. package/es/src/ap-form/items/cascader/index.vue.d.ts +2 -2
  41. package/es/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
  42. package/es/src/ap-form/items/date/index.vue.d.ts +2 -2
  43. package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -2
  44. package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
  45. package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
  46. package/es/src/ap-form/items/switch/index.vue.d.ts +2 -2
  47. package/es/src/ap-form/items/text/index.vue.d.ts +476 -4
  48. package/es/src/ap-form/items/text/password.vue.d.ts +547 -4
  49. package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  50. package/es/src/ap-form/list/index.vue.mjs +29 -34
  51. package/es/src/ap-form/modal-form/index.vue.mjs +77 -68
  52. package/es/src/ap-form/set/index.vue.d.ts +2 -4
  53. package/es/src/ap-form/set/index.vue.mjs +23 -18
  54. package/es/src/ap-grid/index.vue.mjs +1 -1
  55. package/es/src/ap-table/constants.d.ts +593 -31
  56. package/es/src/ap-table/utils.d.ts +1 -1
  57. package/es/src/business/batch-input-group/index.vue.d.ts +240 -3
  58. package/es/src/business/batch-input-group/index.vue.mjs +1 -1
  59. package/es/src/version.d.ts +1 -1
  60. package/es/src/version.mjs +1 -1
  61. package/lib/src/ap-field/cascader/index.vue.js +1 -1
  62. package/lib/src/ap-field/cascader/read.vue2.js +1 -1
  63. package/lib/src/ap-field/checkbox/index.vue.d.ts +18 -1
  64. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  65. package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
  66. package/lib/src/ap-field/date/index.vue.js +1 -1
  67. package/lib/src/ap-field/date/read.vue2.js +1 -1
  68. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  69. package/lib/src/ap-field/date-range/read.vue2.js +1 -1
  70. package/lib/src/ap-field/interface.d.ts +7 -22
  71. package/lib/src/ap-field/number/index.vue.js +1 -1
  72. package/lib/src/ap-field/number/read.vue2.js +1 -1
  73. package/lib/src/ap-field/radio/index.vue.js +1 -1
  74. package/lib/src/ap-field/radio/read.vue2.js +1 -1
  75. package/lib/src/ap-field/rate/index.vue.js +1 -1
  76. package/lib/src/ap-field/second/index.vue.js +1 -1
  77. package/lib/src/ap-field/second/read.vue2.js +1 -1
  78. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  79. package/lib/src/ap-field/select/index.vue.js +1 -1
  80. package/lib/src/ap-field/select/read.vue2.js +1 -1
  81. package/lib/src/ap-field/slider/index.vue.js +1 -1
  82. package/lib/src/ap-field/switch/index.vue.js +1 -1
  83. package/lib/src/ap-field/switch/read.vue2.js +1 -1
  84. package/lib/src/ap-field/text/index.vue.d.ts +478 -3
  85. package/lib/src/ap-field/text/index.vue2.js +1 -1
  86. package/lib/src/ap-field/text/password.vue.d.ts +549 -3
  87. package/lib/src/ap-field/text/password.vue.js +1 -1
  88. package/lib/src/ap-field/text/read-password.vue2.js +1 -1
  89. package/lib/src/ap-field/text/read.vue2.js +1 -1
  90. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  91. package/lib/src/ap-field/text-area/read.vue2.js +1 -1
  92. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  93. package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
  94. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  95. package/lib/src/ap-form/hooks/use-regist-form.d.ts +7 -0
  96. package/lib/src/ap-form/hooks/use-regist-form.js +1 -0
  97. package/lib/src/ap-form/item/index.vue.d.ts +6 -6
  98. package/lib/src/ap-form/item/index.vue.js +1 -1
  99. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  100. package/lib/src/ap-form/items/cascader/index.vue.d.ts +2 -2
  101. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
  102. package/lib/src/ap-form/items/date/index.vue.d.ts +2 -2
  103. package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -2
  104. package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
  105. package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
  106. package/lib/src/ap-form/items/switch/index.vue.d.ts +2 -2
  107. package/lib/src/ap-form/items/text/index.vue.d.ts +476 -4
  108. package/lib/src/ap-form/items/text/password.vue.d.ts +547 -4
  109. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  110. package/lib/src/ap-form/list/index.vue.js +1 -1
  111. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  112. package/lib/src/ap-form/set/index.vue.d.ts +2 -4
  113. package/lib/src/ap-form/set/index.vue.js +1 -1
  114. package/lib/src/ap-grid/index.vue.js +1 -1
  115. package/lib/src/ap-table/constants.d.ts +593 -31
  116. package/lib/src/ap-table/utils.d.ts +1 -1
  117. package/lib/src/business/batch-input-group/index.vue.d.ts +240 -3
  118. package/lib/src/business/batch-input-group/index.vue.js +1 -1
  119. package/lib/src/version.d.ts +1 -1
  120. package/lib/src/version.js +1 -1
  121. package/package.json +1 -1
@@ -1,16 +1,13 @@
1
- import { isVNode as x, defineComponent as h, useSlots as g, shallowRef as w, unref as a, createVNode as e, mergeProps as C, Fragment as P, createBlock as U, openBlock as V } from "vue";
2
- import { EyeOutlined as _, EyeInvisibleOutlined as S } from "@ant-design/icons-vue";
3
- import { Input as T, Space as I } from "@aplus-frontend/antdv";
4
- import { omit as O } from "lodash-unified";
5
- import "../../render/index.mjs";
1
+ import { defineComponent as U, useSlots as _, shallowRef as E, computed as R, createBlock as a, createElementBlock as f, openBlock as o, unref as e, mergeProps as T, createSlots as V, renderList as F, withCtx as c, renderSlot as I, normalizeProps as S, guardReactiveProps as z, Fragment as M, toDisplayString as m, createElementVNode as y } from "vue";
2
+ import { EyeOutlined as O, EyeInvisibleOutlined as A } from "@ant-design/icons-vue";
3
+ import { Input as D, Flex as K } from "@aplus-frontend/antdv";
4
+ import { omit as N } from "lodash-unified";
6
5
  import "../../hooks/index.mjs";
7
- import { useDefaultPlaceholder as R } from "../hooks/use-default-placeholder.mjs";
8
- import { useControllableValue as p } from "../../hooks/useControllableValue.mjs";
9
- import j from "../../render/render.mjs";
10
- function k(t) {
11
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !x(t);
12
- }
13
- const J = /* @__PURE__ */ h({
6
+ import { useDefaultPlaceholder as $ } from "../hooks/use-default-placeholder.mjs";
7
+ import { useControllableValue as v } from "../../hooks/useControllableValue.mjs";
8
+ const j = {
9
+ key: 0
10
+ }, Z = /* @__PURE__ */ U({
14
11
  name: "ApFieldTextPassword",
15
12
  __name: "password",
16
13
  props: {
@@ -19,6 +16,9 @@ const J = /* @__PURE__ */ h({
19
16
  },
20
17
  class: {},
21
18
  style: {},
19
+ emptyText: {
20
+ default: "--"
21
+ },
22
22
  variant: {},
23
23
  size: {},
24
24
  value: {},
@@ -102,60 +102,65 @@ const J = /* @__PURE__ */ h({
102
102
  type: Boolean,
103
103
  default: void 0
104
104
  },
105
- "onUpdate:visible": {},
106
- emptyText: {
107
- default: "--"
108
- }
105
+ "onUpdate:visible": {}
109
106
  },
110
107
  emits: ["update:value", "update:visible"],
111
- setup(t, {
112
- expose: c,
113
- emit: f
108
+ setup(b, {
109
+ expose: B,
110
+ emit: g
114
111
  }) {
115
- const s = f, o = t, u = g(), i = w(), {
116
- value: m,
117
- updateValue: v
118
- } = p(o, s), y = R("TextPassword", o), {
119
- value: b,
112
+ const h = _(), i = g, t = b, n = E(), {
113
+ value: s,
114
+ updateValue: x
115
+ } = v(t, i), k = $("TextPassword", t), {
116
+ value: l,
120
117
  updateValue: r
121
- } = p(o, s, {
118
+ } = v(t, i, {
122
119
  valuePropName: "visible"
123
- });
124
- function B() {
125
- const n = a(m), l = a(b);
126
- if (o.mode === "edit")
127
- return e(T.Password, C(O(o, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]), {
128
- placeholder: a(y),
129
- value: n,
130
- "onUpdate:value": v,
131
- visible: l,
132
- "onUpdate:visible": r,
133
- ref: i
134
- }), k(u) ? u : {
135
- default: () => [u]
136
- });
137
- let d = e(P, null, [o.emptyText]);
138
- return n && (d = e(I, null, {
139
- default: () => [e("span", null, [l ? n : "********"]), e("span", {
140
- style: {
141
- cursor: "pointer"
142
- },
143
- onClick: () => r(!l)
144
- }, [l ? e(_, null, null) : e(S, null, null)])]
145
- })), d;
146
- }
147
- return c({
120
+ }), w = R(() => N(t, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]));
121
+ return B({
148
122
  focus: () => {
149
- i.value?.focus();
123
+ n.value?.focus();
150
124
  },
151
125
  blur: () => {
152
- i.value?.blur();
126
+ n.value?.blur();
153
127
  }
154
- }), (n, l) => (V(), U(a(j), {
155
- node: B()
156
- }, null, 8, ["node"]));
128
+ }), (u, p) => u.mode === "edit" ? (o(), a(e(D).Password, T({
129
+ key: 0
130
+ }, w.value, {
131
+ ref_key: "inputRef",
132
+ ref: n,
133
+ placeholder: e(k),
134
+ value: e(s),
135
+ visible: e(l),
136
+ "onUpdate:value": e(x),
137
+ "onUpdate:visible": e(r)
138
+ }), V({
139
+ _: 2
140
+ }, [F(h, (C, d) => ({
141
+ name: d,
142
+ fn: c((P) => [I(u.$slots, d, S(z(P || {})))])
143
+ }))]), 1040, ["placeholder", "value", "visible", "onUpdate:value", "onUpdate:visible"])) : (o(), f(M, {
144
+ key: 1
145
+ }, [e(s) ? (o(), a(e(K), {
146
+ key: 1,
147
+ gap: 8,
148
+ align: "center"
149
+ }, {
150
+ default: c(() => [y("span", null, m(e(l) ? e(s) : "********"), 1), y("span", {
151
+ style: {
152
+ cursor: "pointer"
153
+ },
154
+ onClick: p[0] || (p[0] = (C) => e(r)(!e(l)))
155
+ }, [e(l) ? (o(), a(e(O), {
156
+ key: 0
157
+ })) : (o(), a(e(A), {
158
+ key: 1
159
+ }))])]),
160
+ _: 1
161
+ })) : (o(), f("span", j, m(u.emptyText), 1))], 64));
157
162
  }
158
163
  });
159
164
  export {
160
- J as default
165
+ Z as default
161
166
  };
@@ -1,13 +1,14 @@
1
- import { defineComponent as d, unref as e, createElementBlock as p, createBlock as a, openBlock as t, Fragment as s, createTextVNode as f, toDisplayString as i, withCtx as y, createElementVNode as r } from "vue";
2
- import { EyeOutlined as c, EyeInvisibleOutlined as m } from "@ant-design/icons-vue";
1
+ import { defineComponent as d, ref as p, createElementBlock as s, createBlock as a, openBlock as o, Fragment as f, createTextVNode as y, toDisplayString as u, unref as l, withCtx as c, createElementVNode as i } from "vue";
2
+ import { EyeOutlined as m, EyeInvisibleOutlined as v } from "@ant-design/icons-vue";
3
3
  import { Space as B } from "@aplus-frontend/antdv";
4
- const g = /* @__PURE__ */ d({
4
+ const k = /* @__PURE__ */ d({
5
5
  name: "ApFieldTextPasswordRead",
6
6
  __name: "read-password",
7
7
  props: {
8
8
  mode: { default: "edit" },
9
9
  class: {},
10
10
  style: {},
11
+ emptyText: { default: "--" },
11
12
  variant: {},
12
13
  size: {},
13
14
  value: {},
@@ -57,27 +58,26 @@ const g = /* @__PURE__ */ d({
57
58
  action: { default: "click" },
58
59
  visibilityToggle: { type: Boolean, default: !0 },
59
60
  visible: { type: Boolean, default: void 0 },
60
- "onUpdate:visible": {},
61
- emptyText: { default: "--" }
61
+ "onUpdate:visible": {}
62
62
  },
63
- setup(u) {
64
- const o = e(u.visible);
65
- return (n, l) => n.value ? (t(), a(e(B), { key: 1 }, {
66
- default: y(() => [
67
- r("span", null, i(e(o) ? n.value : "********"), 1),
68
- r("span", {
63
+ setup(r) {
64
+ const e = p(r.visible);
65
+ return (t, n) => t.value ? (o(), a(l(B), { key: 1 }, {
66
+ default: c(() => [
67
+ i("span", null, u(e.value ? t.value : "********"), 1),
68
+ i("span", {
69
69
  style: { cursor: "pointer" },
70
- onClick: l[0] || (l[0] = () => o.value = !e(o))
70
+ onClick: n[0] || (n[0] = () => e.value = !e.value)
71
71
  }, [
72
- e(o) ? (t(), a(e(c), { key: 0 })) : (t(), a(e(m), { key: 1 }))
72
+ e.value ? (o(), a(l(m), { key: 0 })) : (o(), a(l(v), { key: 1 }))
73
73
  ])
74
74
  ]),
75
75
  _: 1
76
- })) : (t(), p(s, { key: 0 }, [
77
- f(i(n.emptyText), 1)
76
+ })) : (o(), s(f, { key: 0 }, [
77
+ y(u(t.emptyText), 1)
78
78
  ], 64));
79
79
  }
80
80
  });
81
81
  export {
82
- g as default
82
+ k as default
83
83
  };
@@ -6,6 +6,7 @@ const r = /* @__PURE__ */ a({
6
6
  mode: { default: "edit" },
7
7
  class: {},
8
8
  style: {},
9
+ emptyText: { default: "--" },
9
10
  variant: {},
10
11
  size: {},
11
12
  value: {},
@@ -51,7 +52,6 @@ const r = /* @__PURE__ */ a({
51
52
  suffix: {},
52
53
  clearIcon: {},
53
54
  allowClear: { type: Boolean, default: !0 },
54
- emptyText: { default: "--" },
55
55
  beforeInput: {}
56
56
  },
57
57
  setup(t) {
@@ -1,20 +1,21 @@
1
- import { defineComponent as A, shallowRef as k, computed as c, createElementBlock as s, createBlock as z, openBlock as n, Fragment as T, normalizeClass as m, unref as e, toDisplayString as f, createElementVNode as w, mergeProps as R } from "vue";
2
- import { Input as F } from "@aplus-frontend/antdv";
3
- import { isNil as S, omit as V } from "lodash-unified";
1
+ import { defineComponent as k, shallowRef as z, computed as s, createElementBlock as p, createBlock as T, openBlock as n, Fragment as w, normalizeClass as m, unref as e, toDisplayString as f, createElementVNode as R, mergeProps as F } from "vue";
2
+ import { Input as S } from "@aplus-frontend/antdv";
3
+ import { omit as V, isNil as E } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import { useDefaultPlaceholder as E } from "../hooks/use-default-placeholder.mjs";
6
+ import { useDefaultPlaceholder as P } from "../hooks/use-default-placeholder.mjs";
7
7
  import U from "../style/index.mjs";
8
8
  import { languageFormat as _ } from "./utils.mjs";
9
9
  import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
10
10
  import { useNamespace as M } from "../../config-provider/hooks/use-namespace.mjs";
11
- const L = /* @__PURE__ */ A({
11
+ const Q = /* @__PURE__ */ k({
12
12
  name: "ApFieldTextArea",
13
13
  __name: "index",
14
14
  props: {
15
15
  mode: { default: "edit" },
16
16
  class: {},
17
17
  style: {},
18
+ emptyText: { default: "--" },
18
19
  rows: {},
19
20
  autoSize: { type: [Boolean, Object] },
20
21
  onResize: {},
@@ -59,13 +60,14 @@ const L = /* @__PURE__ */ A({
59
60
  handleReset: {},
60
61
  clearIcon: {},
61
62
  allowClear: { type: Boolean, default: !0 },
62
- emptyText: { default: "--" },
63
63
  beforeInput: {},
64
64
  code: { type: [Boolean, Object], default: !1 }
65
65
  },
66
66
  emits: ["update:value"],
67
67
  setup(y, { expose: g, emit: v }) {
68
- const a = k(), o = y, x = v, { value: l, updateValue: h } = j(o, x), { b: B, m: p } = M("field-textarea"), r = U("field"), b = E("TextArea", o), I = c(() => {
68
+ const a = z(), o = y, x = s(
69
+ () => V(o, ["onUpdate:value", "value", "beforeInput", "emptyText"])
70
+ ), h = v, { value: l, updateValue: B } = j(o, h), { b, m: d } = M("field-textarea"), r = U("field"), I = P("TextArea", o), C = s(() => {
69
71
  if (o.code)
70
72
  return o.code === !0 ? {
71
73
  language: "text"
@@ -73,9 +75,9 @@ const L = /* @__PURE__ */ A({
73
75
  language: o.code?.language ?? "text"
74
76
  };
75
77
  });
76
- function C(t) {
77
- const u = t.target.value || "", d = o.beforeInput ? o.beforeInput?.(u) : u, i = a.value?.$el?.querySelector("textarea");
78
- i && (i.value = d), h(d);
78
+ function A(t) {
79
+ const u = t.target.value || "", i = o.beforeInput ? o.beforeInput?.(u) : u, c = a.value?.$el?.querySelector("textarea");
80
+ c && (c.value = i), B(i);
79
81
  }
80
82
  return g({
81
83
  focus: (t) => {
@@ -84,31 +86,27 @@ const L = /* @__PURE__ */ A({
84
86
  blur: () => {
85
87
  a.value?.blur();
86
88
  },
87
- resizableTextArea: c(() => a.value?.resizableTextArea)
88
- }), (t, u) => t.mode === "read" ? (n(), s(T, { key: 0 }, [
89
- t.code ? (n(), s("pre", {
89
+ resizableTextArea: s(() => a.value?.resizableTextArea)
90
+ }), (t, u) => t.mode === "read" ? (n(), p(w, { key: 0 }, [
91
+ t.code ? (n(), p("pre", {
90
92
  key: 1,
91
- class: m([e(p)("code"), e(r)])
93
+ class: m([e(d)("code"), e(r)])
92
94
  }, [
93
- w("code", null, f(e(_)(e(l), I.value.language)), 1)
94
- ], 2)) : (n(), s("span", {
95
+ R("code", null, f(e(_)(e(l), C.value.language)), 1)
96
+ ], 2)) : (n(), p("span", {
95
97
  key: 0,
96
- class: m([e(p)("read"), e(r)])
97
- }, f(e(S)(e(l)) || e(l) === "" ? t.emptyText : e(l)), 3))
98
- ], 64)) : (n(), z(e(F).TextArea, R(
99
- { key: 1 },
100
- e(V)(o, ["onUpdate:value", "value", "beforeInput", "emptyText"]),
101
- {
102
- ref_key: "textAreaRef",
103
- ref: a,
104
- placeholder: e(b),
105
- value: e(l),
106
- class: [e(B)(), e(r)],
107
- onInput: C
108
- }
109
- ), null, 16, ["placeholder", "value", "class"]));
98
+ class: m([e(d)("read"), e(r)])
99
+ }, f(e(E)(e(l)) || e(l) === "" ? t.emptyText : e(l)), 3))
100
+ ], 64)) : (n(), T(e(S).TextArea, F({ key: 1 }, x.value, {
101
+ ref_key: "textAreaRef",
102
+ ref: a,
103
+ placeholder: e(I),
104
+ value: e(l),
105
+ class: [e(b)(), e(r)],
106
+ onInput: A
107
+ }), null, 16, ["placeholder", "value", "class"]));
110
108
  }
111
109
  });
112
110
  export {
113
- L as default
111
+ Q as default
114
112
  };
@@ -18,6 +18,7 @@ const h = {
18
18
  mode: { default: "edit" },
19
19
  class: {},
20
20
  style: {},
21
+ emptyText: { default: "--" },
21
22
  rows: {},
22
23
  autoSize: { type: [Boolean, Object] },
23
24
  onResize: {},
@@ -62,7 +63,6 @@ const h = {
62
63
  handleReset: {},
63
64
  clearIcon: {},
64
65
  allowClear: { type: Boolean, default: !0 },
65
- emptyText: { default: "--" },
66
66
  beforeInput: {},
67
67
  code: { type: [Boolean, Object], default: !1 }
68
68
  },
@@ -1,14 +1,14 @@
1
- import { isVNode as A, defineComponent as F, useSlots as _, shallowRef as E, computed as K, unref as e, createVNode as r, Fragment as g, createBlock as S, openBlock as v, resolveDynamicComponent as U, mergeProps as z, createSlots as M, renderList as j, withCtx as w, renderSlot as q, normalizeProps as O, guardReactiveProps as $ } from "vue";
2
- import { Space as H, Tag as W, TreeSelect as G, Spin as J } from "@aplus-frontend/antdv";
3
- import { isArray as Q, omit as X } from "lodash-unified";
1
+ import { isVNode as _, defineComponent as E, computed as g, useSlots as K, shallowRef as U, unref as e, createVNode as r, Fragment as v, createBlock as S, openBlock as w, resolveDynamicComponent as z, mergeProps as M, createSlots as j, renderList as q, withCtx as B, renderSlot as O, normalizeProps as $, guardReactiveProps as H } from "vue";
2
+ import { Space as W, Tag as G, TreeSelect as J, Spin as Q } from "@aplus-frontend/antdv";
3
+ import { omit as X, isArray as Y } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
5
- import { useDefaultPlaceholder as Y } from "../hooks/use-default-placeholder.mjs";
6
- import { useRequest as Z } from "./use-request.mjs";
7
- import { useControllableValue as ee } from "../../hooks/useControllableValue.mjs";
8
- function B(d) {
9
- return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !A(d);
5
+ import { useDefaultPlaceholder as Z } from "../hooks/use-default-placeholder.mjs";
6
+ import { useRequest as ee } from "./use-request.mjs";
7
+ import { useControllableValue as te } from "../../hooks/useControllableValue.mjs";
8
+ function C(d) {
9
+ return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !_(d);
10
10
  }
11
- const ie = /* @__PURE__ */ F({
11
+ const pe = /* @__PURE__ */ E({
12
12
  name: "ApFieldTreeSelect",
13
13
  __name: "index",
14
14
  props: {
@@ -17,6 +17,9 @@ const ie = /* @__PURE__ */ F({
17
17
  },
18
18
  class: {},
19
19
  style: {},
20
+ emptyText: {
21
+ default: "--"
22
+ },
20
23
  suffixIcon: {},
21
24
  size: {},
22
25
  bordered: {
@@ -161,9 +164,6 @@ const ie = /* @__PURE__ */ F({
161
164
  switcherIcon: {},
162
165
  treeExpandAction: {},
163
166
  dropdownPopupAlign: {},
164
- emptyText: {
165
- default: "--"
166
- },
167
167
  request: {},
168
168
  lazy: {
169
169
  type: Boolean
@@ -175,76 +175,76 @@ const ie = /* @__PURE__ */ F({
175
175
  },
176
176
  emits: ["update:value"],
177
177
  setup(d, {
178
- expose: C,
179
- emit: x
178
+ expose: x,
179
+ emit: N
180
180
  }) {
181
- const n = d, N = _(), T = x, p = E(), {
182
- value: f,
183
- updateValue: b
184
- } = ee(n, T), D = Y("TreeSelect", n), {
185
- treeData: c,
181
+ const n = d, T = g(() => X(n, ["onUpdate:value", "value", "treeData", "loadData"])), b = K(), D = N, p = U(), {
182
+ value: c,
183
+ updateValue: V
184
+ } = te(n, D), k = Z("TreeSelect", n), {
185
+ treeData: f,
186
186
  loading: m,
187
187
  request: y
188
- } = Z(n), V = K(() => {
188
+ } = ee(n), P = g(() => {
189
189
  let t;
190
- const u = e(f), i = Q(u) ? u : [u].filter(Boolean);
190
+ const u = e(c), i = Y(u) ? u : [u].filter(Boolean);
191
191
  if (!i.length)
192
- return r(g, null, [n.emptyText]);
193
- const o = [], s = n.fieldNames?.label || "label", R = n.fieldNames?.value || "value";
192
+ return r(v, null, [n.emptyText]);
193
+ const o = [], s = n.fieldNames?.label || "label", A = n.fieldNames?.value || "value";
194
194
  function h(a) {
195
195
  for (const l of a) {
196
- if (i.find((L) => L === l[R]) && o.push(l[s]), o.length === i.length)
196
+ if (i.find((F) => F === l[A]) && o.push(l[s]), o.length === i.length)
197
197
  return;
198
198
  l.children?.length && h(l.children);
199
199
  }
200
200
  }
201
- return h(e(c)), o.length ? o.length === 1 ? r("span", null, [o[0]]) : r(H, {
201
+ return h(e(f)), o.length ? o.length === 1 ? r("span", null, [o[0]]) : r(W, {
202
202
  size: 4
203
- }, B(t = o.map((a, l) => r(W, {
203
+ }, C(t = o.map((a, l) => r(G, {
204
204
  style: {
205
205
  marginRight: 0
206
206
  },
207
207
  key: `${a}-${l}`
208
- }, B(a) ? a : {
208
+ }, C(a) ? a : {
209
209
  default: () => [a]
210
210
  }))) ? t : {
211
211
  default: () => [t]
212
- }) : r(g, null, [n.emptyText]);
212
+ }) : r(v, null, [n.emptyText]);
213
213
  });
214
- function k() {
214
+ function I() {
215
215
  p.value?.focus?.();
216
216
  }
217
- function I() {
217
+ function R() {
218
218
  p.value?.blur?.();
219
219
  }
220
- function P(t) {
220
+ function L(t) {
221
221
  return y(t);
222
222
  }
223
- return C({
223
+ return x({
224
224
  request: y,
225
- focus: k,
226
- blur: I
227
- }), (t, u) => t.mode === "read" ? (v(), S(U(V.value), {
225
+ focus: I,
226
+ blur: R
227
+ }), (t, u) => t.mode === "read" ? (w(), S(z(P.value), {
228
228
  key: 0
229
- })) : (v(), S(e(G), z({
229
+ })) : (w(), S(e(J), M({
230
230
  key: 1
231
- }, e(X)(n, ["onUpdate:value", "value", "treeData", "loadData"]), {
231
+ }, T.value, {
232
232
  ref_key: "treeSelectRef",
233
233
  ref: p,
234
- value: e(f),
235
- "tree-data": e(c),
234
+ value: e(c),
235
+ "tree-data": e(f),
236
236
  loading: e(m),
237
- placeholder: e(D),
238
- "load-data": t.loadData ? P : void 0,
239
- "onUpdate:value": e(b)
240
- }), M({
237
+ placeholder: e(k),
238
+ "load-data": t.loadData ? L : void 0,
239
+ "onUpdate:value": e(V)
240
+ }), j({
241
241
  _: 2
242
- }, [j(N, (i, o) => ({
242
+ }, [q(b, (i, o) => ({
243
243
  name: o,
244
- fn: w((s) => [q(t.$slots, o, O($(s || {})))])
244
+ fn: B((s) => [O(t.$slots, o, $(H(s || {})))])
245
245
  })), e(m) ? {
246
246
  name: "notFoundContent",
247
- fn: w(() => [r(e(J), {
247
+ fn: B(() => [r(e(Q), {
248
248
  size: "small"
249
249
  })]),
250
250
  key: "0"
@@ -252,5 +252,5 @@ const ie = /* @__PURE__ */ F({
252
252
  }
253
253
  });
254
254
  export {
255
- ie as default
255
+ pe as default
256
256
  };
@@ -13,6 +13,9 @@ const I = /* @__PURE__ */ g({
13
13
  },
14
14
  class: {},
15
15
  style: {},
16
+ emptyText: {
17
+ default: "--"
18
+ },
16
19
  suffixIcon: {},
17
20
  size: {},
18
21
  bordered: {
@@ -139,9 +142,6 @@ const I = /* @__PURE__ */ g({
139
142
  switcherIcon: {},
140
143
  treeExpandAction: {},
141
144
  dropdownPopupAlign: {},
142
- emptyText: {
143
- default: "--"
144
- },
145
145
  request: {},
146
146
  lazy: {
147
147
  type: Boolean