@aplus-frontend/ui 0.2.8 → 0.2.10

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 (25) hide show
  1. package/es/src/ap-descriptions/interface.d.ts +1 -1
  2. package/es/src/ap-form/list/index.vue.mjs +15 -15
  3. package/es/src/ap-form/search-form/index.vue.mjs +2 -2
  4. package/es/src/ap-modal/utils/createModal.mjs +14 -13
  5. package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +3 -0
  6. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +53 -46
  7. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +30 -24
  8. package/es/src/business/ap-group-search/index.d.ts +12 -5
  9. package/es/src/business/ap-group-search/interface.d.ts +2 -2
  10. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +24 -23
  11. package/es/src/business/ap-table-modal/hooks/use-table-modal.mjs +17 -11
  12. package/es/src/work-order-modal/createWorkOrder.mjs +13 -12
  13. package/lib/src/ap-descriptions/interface.d.ts +1 -1
  14. package/lib/src/ap-form/list/index.vue.js +1 -1
  15. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  16. package/lib/src/ap-modal/utils/createModal.js +1 -1
  17. package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +3 -0
  18. package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
  19. package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
  20. package/lib/src/business/ap-group-search/index.d.ts +12 -5
  21. package/lib/src/business/ap-group-search/interface.d.ts +2 -2
  22. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
  23. package/lib/src/business/ap-table-modal/hooks/use-table-modal.js +1 -1
  24. package/lib/src/work-order-modal/createWorkOrder.js +1 -1
  25. package/package.json +5 -4
@@ -15,7 +15,7 @@ type Recordable = Record<string, any>;
15
15
  /** 基本描述类型 */
16
16
  export interface ItemSchema<T extends Recordable = Recordable> {
17
17
  label: VNodeChild | VNode;
18
- field: keyof T;
18
+ field: keyof T | (string & {}) | string[];
19
19
  span?: number;
20
20
  prefix?: VNodeChild | VNode;
21
21
  suffix?: VNodeChild | VNode;
@@ -1,7 +1,7 @@
1
- import { defineComponent as v, onMounted as V, computed as f, unref as m, renderSlot as k } from "vue";
1
+ import { defineComponent as V, onMounted as k, computed as f, unref as s, renderSlot as v } from "vue";
2
2
  import { useInjectForm as h } from "../context.mjs";
3
3
  import { isArray as j } from "lodash-unified";
4
- const g = /* @__PURE__ */ v({
4
+ const g = /* @__PURE__ */ V({
5
5
  name: "ApFormList",
6
6
  __name: "index",
7
7
  props: {
@@ -11,36 +11,36 @@ const g = /* @__PURE__ */ v({
11
11
  },
12
12
  setup(p) {
13
13
  let o = 1;
14
- const s = [], t = p, { model: a, updateModel: r, internalInstance: c } = h();
15
- V(() => {
14
+ const a = [], t = p, { model: i, updateModel: r, internalInstance: c } = h();
15
+ k(() => {
16
16
  c == null || c.registerField({
17
17
  name: t.name,
18
18
  initialValue: t.initialValue,
19
19
  transform: t.transform
20
20
  });
21
21
  });
22
- const i = f(() => j(t.name) ? t.name.reduce((e, n) => e == null ? void 0 : e.value[n], a) : a == null ? void 0 : a.value[t.name]);
22
+ const u = f(() => t.name ? j(t.name) ? t.name.reduce((e, n) => e == null ? void 0 : e[n], s(i)) : i == null ? void 0 : i.value[t.name] : null);
23
23
  function y(e = void 0) {
24
- const n = m(i) ? [...m(i), e] : [e];
25
- s.push(o), o += 1, r == null || r(t.name, n);
24
+ const n = s(u) ? [...s(u), e] : [e];
25
+ a.push(o), o += 1, r == null || r(t.name, n);
26
26
  }
27
27
  function d(e) {
28
- let n = m(i) || [];
29
- n = [...n.slice(0, e), ...n.slice(e + 1)], s.splice(e, 1), r == null || r(t.name, n);
28
+ let n = s(u) || [];
29
+ n = [...n.slice(0, e), ...n.slice(e + 1)], a.splice(e, 1), r == null || r(t.name, n);
30
30
  }
31
31
  const _ = {
32
32
  add: y,
33
33
  remove: d
34
- }, F = f(() => (m(i) || []).map((n, u) => {
35
- let l = s[u];
36
- return typeof l > "u" && (s[u] = o, l = o, o += 1), {
34
+ }, F = f(() => (s(u) || []).map((n, m) => {
35
+ let l = a[m];
36
+ return typeof l > "u" && (a[m] = o, l = o, o += 1), {
37
37
  key: l,
38
- fieldName: u,
39
- name: [t.name, u],
38
+ fieldName: m,
39
+ name: [t.name, m].flat(),
40
40
  value: n
41
41
  };
42
42
  }));
43
- return (e, n) => k(e.$slots, "default", {
43
+ return (e, n) => v(e.$slots, "default", {
44
44
  fields: F.value,
45
45
  actions: _
46
46
  });
@@ -127,7 +127,7 @@ const i = 24, qe = /* @__PURE__ */ le({
127
127
  let v = [];
128
128
  const S = V(D(s.default())), p = V((N = s.extra) == null ? void 0 : N.call(s)), w = g(() => Math.floor(i / a.countPerRow));
129
129
  j(() => s.default(), (e) => {
130
- v = S.value, S.value = D(e);
130
+ v = S.value, S.value = Ce(v, D(e));
131
131
  }), j(() => {
132
132
  var e;
133
133
  return (e = s.extra) == null ? void 0 : e.call(s);
@@ -135,7 +135,7 @@ const i = 24, qe = /* @__PURE__ */ le({
135
135
  p.value = e;
136
136
  });
137
137
  const X = (e) => $(e) ? (he(e) ? e : [e]).join("") : Date.now(), F = g(() => {
138
- const e = Ce(v, S.value), t = [], l = [], r = o(w);
138
+ const e = S.value, t = [], l = [], r = o(w);
139
139
  let d = 0;
140
140
  e.forEach((c) => {
141
141
  const f = c.props;
@@ -1,17 +1,18 @@
1
- import { render as l, defineComponent as C, createVNode as h, mergeProps as g, h as O } from "vue";
1
+ import { render as c, defineComponent as C, createVNode as l, mergeProps as g, h as O } from "vue";
2
2
  import { Modal as k } from "@aplus-frontend/antdv";
3
3
  import { ConfigProvider as y, globalConfigCached as v } from "../../config-provider/config-provider.mjs";
4
4
  const b = (i) => {
5
5
  let p, n;
6
6
  function d() {
7
7
  p && p(!1), setTimeout(() => {
8
- l(null, r), c.removeChild(r);
8
+ var e;
9
+ c(null, t), (e = t.parentElement) == null || e.removeChild(t);
9
10
  }, 500);
10
11
  }
11
- function m(e) {
12
+ function h(e) {
12
13
  n && n(e);
13
14
  }
14
- const f = /* @__PURE__ */ C({
15
+ const m = /* @__PURE__ */ C({
15
16
  data() {
16
17
  return {
17
18
  open: !0,
@@ -20,20 +21,20 @@ const b = (i) => {
20
21
  },
21
22
  methods: {
22
23
  async handleCancel() {
23
- var e, o, t, s, a;
24
+ var e, o, r, s, a;
24
25
  if ((e = this.props) != null && e.onCancel) {
25
- const u = ((s = (t = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : t.component) == null ? void 0 : s.exposed) ?? void 0;
26
+ const u = ((s = (r = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : r.component) == null ? void 0 : s.exposed) ?? void 0;
26
27
  await ((a = this.props) == null ? void 0 : a.onCancel(u));
27
28
  }
28
29
  d();
29
30
  },
30
31
  async handleOk() {
31
- var e, o, t, s;
32
+ var e, o, r, s;
32
33
  try {
33
34
  if (n({
34
35
  confirmLoading: !0
35
36
  }), (e = this.props) != null && e.onOk) {
36
- const a = ((s = (t = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : t.component) == null ? void 0 : s.exposed) ?? void 0;
37
+ const a = ((s = (r = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : r.component) == null ? void 0 : s.exposed) ?? void 0;
37
38
  await this.props.onOk(a);
38
39
  }
39
40
  n({
@@ -60,8 +61,8 @@ const b = (i) => {
60
61
  const {
61
62
  ...e
62
63
  } = this.props;
63
- return delete e.onCancel, delete e.onOk, h(y, v.value, {
64
- default: () => [h(k, g({
64
+ return delete e.onCancel, delete e.onOk, l(y, v.value, {
65
+ default: () => [l(k, g({
65
66
  open: this.open,
66
67
  destroyOnClose: !0,
67
68
  onCancel: this.handleCancel,
@@ -74,10 +75,10 @@ const b = (i) => {
74
75
  })]
75
76
  });
76
77
  }
77
- }), c = i.getContainer || document.body, r = document.createElement("div");
78
- return c.appendChild(r), l(O(f), r), {
78
+ }), f = i.getContainer || document.body, t = document.createElement("div");
79
+ return f.appendChild(t), c(O(m), t), {
79
80
  destroy: d,
80
- update: m
81
+ update: h
81
82
  };
82
83
  };
83
84
  export {
@@ -15,13 +15,16 @@ declare function __VLS_template(): {
15
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
16
  declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<GroupSearchProps>, {
17
17
  hasAll: boolean;
18
+ dropdownMatchSelectWidth: boolean;
18
19
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
19
20
  "update:value": (...args: any[]) => void;
20
21
  }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GroupSearchProps>, {
21
22
  hasAll: boolean;
23
+ dropdownMatchSelectWidth: boolean;
22
24
  }>>> & {
23
25
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
24
26
  }, {
27
+ dropdownMatchSelectWidth: number | boolean;
25
28
  hasAll: boolean;
26
29
  }, {}>;
27
30
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,14 +1,14 @@
1
- import { defineComponent as I, computed as c, onMounted as V, watch as L, unref as t, openBlock as P, createElementBlock as O, normalizeClass as f, createVNode as i, withCtx as y, normalizeStyle as M, renderSlot as N } from "vue";
2
- import { Flex as K, Select as T } from "@aplus-frontend/antdv";
3
- import j from "./images/icon-down.vue.mjs";
1
+ import { defineComponent as M, computed as i, onMounted as V, watch as L, unref as t, openBlock as P, createElementBlock as N, normalizeClass as f, createVNode as p, withCtx as y, normalizeStyle as K, renderSlot as O } from "vue";
2
+ import { Flex as T, Select as F } from "@aplus-frontend/antdv";
3
+ import R from "./images/icon-down.vue.mjs";
4
4
  import "./extension-select/index.vue.mjs";
5
- import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
5
+ import { useControllableValue as $ } from "../../hooks/useControllableValue.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { useLocale as R } from "../../config-provider/hooks/use-locale.mjs";
8
- import { useGlobalConfig as $ } from "../../config-provider/hooks/use-global-config.mjs";
9
- import { useNamespace as D } from "../../config-provider/hooks/use-namespace.mjs";
10
- import E from "./extension-select/index.vue2.mjs";
11
- const d = "GROUP_SEARCH_ALL", Z = /* @__PURE__ */ I({
7
+ import { useLocale as j } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useGlobalConfig as D } from "../../config-provider/hooks/use-global-config.mjs";
9
+ import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import G from "./extension-select/index.vue2.mjs";
11
+ const d = "GROUP_SEARCH_ALL", ee = /* @__PURE__ */ M({
12
12
  __name: "ap-group-search",
13
13
  props: {
14
14
  value: {},
@@ -48,7 +48,7 @@ const d = "GROUP_SEARCH_ALL", Z = /* @__PURE__ */ I({
48
48
  autofocus: { type: Boolean },
49
49
  getPopupContainer: {},
50
50
  virtual: { type: Boolean },
51
- dropdownMatchSelectWidth: {},
51
+ dropdownMatchSelectWidth: { default: !1 },
52
52
  options: {},
53
53
  showAction: {},
54
54
  onDeselect: {},
@@ -87,36 +87,42 @@ const d = "GROUP_SEARCH_ALL", Z = /* @__PURE__ */ I({
87
87
  defaultActiveFirstOption: { type: Boolean },
88
88
  labelInValue: { type: Boolean },
89
89
  hasAll: { type: Boolean, default: !0 },
90
- style: { type: [Boolean, null, String, Object, Array] }
90
+ style: {}
91
91
  },
92
92
  emits: ["update:value"],
93
93
  setup(v, { emit: g }) {
94
- const { t: m } = R(), C = $("uiMode", "aplus"), n = v, S = g, { value: a, updateValue: p } = F(n, S), w = (e) => {
94
+ const { t: m } = j(), S = D("uiMode", "aplus"), l = v, C = i(() => ({
95
+ width: "auto",
96
+ ...l.style
97
+ })), w = g, { value: a, updateValue: u } = $(l, w), B = (e) => {
95
98
  let o = e;
96
- e === d && (o = n.options.map((l) => l.value)), p({
99
+ e === d ? o = l.options.map((n) => n.value) : o = toString.call(o) === "[object Array]" ? e : [e], u({
97
100
  ...a.value,
98
101
  key: o
99
102
  });
100
- }, B = c(() => {
103
+ }, b = i(() => {
101
104
  let e = [];
102
- return n.hasAll && (e = [
105
+ return l.hasAll && (e = [
103
106
  { value: d, label: m("ap.apGroupSearch.all") }
104
- ]), [...e, ...n.options];
105
- }), b = c(() => {
107
+ ]), [...e, ...l.options];
108
+ }), A = i(() => {
106
109
  var r, s;
107
110
  const e = (r = a == null ? void 0 : a.value) == null ? void 0 : r.key, o = m("ap.apGroupSearch.defaultPlaceholder");
108
111
  if (!e) return o;
109
- const l = toString.call(e) === "[object Array]" ? e : [e];
110
- return ((s = n.options) == null ? void 0 : s.filter((u) => l.includes(u.value)).map((u) => u.label).join("/")) || o;
112
+ const n = toString.call(e) === "[object Array]" ? e : [e];
113
+ return ((s = l.options) == null ? void 0 : s.filter((c) => n.includes(c.value)).map((c) => c.label).join("/")) || o;
111
114
  });
112
115
  V(() => {
113
116
  L(
114
- () => n.hasAll,
117
+ () => {
118
+ var e;
119
+ return [l.hasAll, (e = t(a)) == null ? void 0 : e.key];
120
+ },
115
121
  () => {
116
122
  var e, o;
117
- n.hasAll && !((e = t(a)) != null && e.key) && p({
123
+ l.hasAll && !((e = t(a)) != null && e.key) && u({
118
124
  ...t(a),
119
- key: (o = n.options) == null ? void 0 : o.map((l) => l.value)
125
+ key: (o = l.options) == null ? void 0 : o.map((n) => n.value)
120
126
  });
121
127
  },
122
128
  {
@@ -124,51 +130,52 @@ const d = "GROUP_SEARCH_ALL", Z = /* @__PURE__ */ I({
124
130
  }
125
131
  );
126
132
  });
127
- const A = c(() => {
128
- var l, r;
129
- const e = Object.prototype.toString, o = (l = t(a)) == null ? void 0 : l.key;
130
- if (o)
131
- return e.call(o) === "[object Array]" && (o == null ? void 0 : o.length) === ((r = n.options) == null ? void 0 : r.length) ? d : o;
133
+ const _ = i(() => {
134
+ var o, n;
135
+ const e = (o = t(a)) == null ? void 0 : o.key;
136
+ if (e)
137
+ return toString.call(e) === "[object Array]" ? (e == null ? void 0 : e.length) === ((n = l.options) == null ? void 0 : n.length) ? d : e == null ? void 0 : e[0] : e;
132
138
  }), h = (e) => {
133
139
  var o;
134
- e !== ((o = t(a)) == null ? void 0 : o.value) && p({
140
+ e !== ((o = t(a)) == null ? void 0 : o.value) && u({
135
141
  ...a.value,
136
142
  value: e
137
143
  });
138
- }, { b: _, e: k, em: x } = D("ap-group-search");
139
- return (e, o) => (P(), O("div", {
140
- class: f(t(_)())
144
+ }, { b: x, e: k, em: I } = E("ap-group-search");
145
+ return (e, o) => (P(), N("div", {
146
+ class: f(t(x)())
141
147
  }, [
142
- i(t(K), null, {
148
+ p(t(T), null, {
143
149
  default: y(() => {
144
- var l, r;
150
+ var n, r;
145
151
  return [
146
- i(t(T), {
147
- value: A.value,
148
- style: M(n.style),
149
- class: f(`${e.$attrs.class} ${t(C) === "admin" ? t(x)("search", "admin") : t(k)("search")}`),
150
- options: B.value,
152
+ p(t(F), {
153
+ value: _.value,
154
+ style: K(C.value),
155
+ class: f(`${e.$attrs.class} ${t(S) === "admin" ? t(I)("search", "admin") : t(k)("search")}`),
156
+ options: b.value,
151
157
  bordered: !1,
152
- onChange: w
158
+ dropdownMatchSelectWidth: l.dropdownMatchSelectWidth,
159
+ onChange: B
153
160
  }, {
154
161
  suffixIcon: y(() => [
155
- i(j)
162
+ p(R)
156
163
  ]),
157
164
  _: 1
158
- }, 8, ["value", "style", "class", "options"]),
159
- N(e.$slots, "search", {
160
- value: (l = t(a)) == null ? void 0 : l.value,
165
+ }, 8, ["value", "style", "class", "options", "dropdownMatchSelectWidth"]),
166
+ O(e.$slots, "search", {
167
+ value: (n = t(a)) == null ? void 0 : n.value,
161
168
  change: h,
162
169
  key: (r = t(a)) == null ? void 0 : r.key
163
170
  }, () => {
164
171
  var s;
165
172
  return [
166
- i(E, {
173
+ p(G, {
167
174
  style: { width: "100%" },
168
175
  maxTagCount: "responsive",
169
176
  value: (s = t(a)) == null ? void 0 : s.value,
170
177
  onChange: h,
171
- placeholder: b.value
178
+ placeholder: A.value
172
179
  }, null, 8, ["value", "placeholder"])
173
180
  ];
174
181
  })
@@ -180,5 +187,5 @@ const d = "GROUP_SEARCH_ALL", Z = /* @__PURE__ */ I({
180
187
  }
181
188
  });
182
189
  export {
183
- Z as default
190
+ ee as default
184
191
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as h, ref as r, watchEffect as f, openBlock as g, createBlock as C, unref as p, normalizeStyle as v, withCtx as y, createVNode as w } from "vue";
1
+ import { defineComponent as h, ref as r, watch as f, openBlock as g, createBlock as C, unref as i, normalizeStyle as y, withCtx as v, createVNode as w } from "vue";
2
2
  import { Select as B } from "@aplus-frontend/antdv";
3
3
  import "../popover-select/index.vue.mjs";
4
4
  import "../../../config-provider/index.mjs";
5
- import { useGlobalConfig as S } from "../../../config-provider/hooks/use-global-config.mjs";
6
- import b from "../popover-select/index.vue2.mjs";
5
+ import { useGlobalConfig as x } from "../../../config-provider/hooks/use-global-config.mjs";
6
+ import S from "../popover-select/index.vue2.mjs";
7
7
  const P = /* @__PURE__ */ h({
8
8
  __name: "index",
9
9
  props: {
@@ -82,31 +82,37 @@ const P = /* @__PURE__ */ h({
82
82
  labelInValue: { type: Boolean }
83
83
  },
84
84
  emits: ["change"],
85
- setup(i, { emit: u }) {
86
- const s = S("uiMode", "aplus"), a = i, e = r(a.value), t = r(!1), d = u, c = (o) => {
87
- e.value = o;
88
- }, m = (o) => {
89
- o && (t.value = !1);
85
+ setup(p, { emit: u }) {
86
+ const s = x("uiMode", "aplus"), o = p, n = r(), a = r(!1), d = u, c = (e) => {
87
+ e && (a.value = !1);
90
88
  };
91
- return f(() => {
92
- d("change", e.value);
93
- }), (o, n) => (g(), C(p(B), {
94
- value: e.value,
95
- style: v(o.$attrs.style),
96
- bordered: p(s) === "admin",
89
+ f(
90
+ () => o.value,
91
+ () => {
92
+ n.value = o.value;
93
+ },
94
+ { immediate: !0 }
95
+ );
96
+ const t = (e) => {
97
+ n.value = e, d("change", e);
98
+ };
99
+ return (e, l) => (g(), C(i(B), {
100
+ value: n.value,
101
+ style: y(e.$attrs.style),
102
+ bordered: i(s) === "admin",
97
103
  mode: "tags",
98
104
  showArrow: !0,
99
- open: t.value,
100
- onDropdownVisibleChange: n[0] || (n[0] = (l) => t.value = l),
101
- onChange: n[1] || (n[1] = (l) => e.value = l),
102
- maxTagCount: a.maxTagCount,
103
- placeholder: a.placeholder
105
+ open: a.value,
106
+ onDropdownVisibleChange: l[0] || (l[0] = (m) => a.value = m),
107
+ onChange: t,
108
+ maxTagCount: o.maxTagCount,
109
+ placeholder: o.placeholder
104
110
  }, {
105
- suffixIcon: y(() => [
106
- w(b, {
107
- value: e.value,
108
- onSubmit: c,
109
- onOpenChange: m
111
+ suffixIcon: v(() => [
112
+ w(S, {
113
+ value: n.value,
114
+ onSubmit: t,
115
+ onOpenChange: c
110
116
  }, null, 8, ["value"])
111
117
  ]),
112
118
  _: 1
@@ -1,4 +1,4 @@
1
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, StyleValue, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
1
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
2
2
  import { SelectValue, DefaultOptionType, LabeledValue } from '@aplus-frontend/antdv/es/select';
3
3
  import { SelectHandler, FieldNames, FilterFunc } from '@aplus-frontend/antdv/es/vc-select/Select';
4
4
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
@@ -11,7 +11,7 @@ declare const ApGroupSearch: {
11
11
  type: PropType<"small" | "large" | "middle">;
12
12
  };
13
13
  style: {
14
- type: PropType<string | false | CSSProperties | StyleValue[] | null>;
14
+ type: PropType<CSSProperties>;
15
15
  };
16
16
  onBlur: {
17
17
  type: PropType<(e: FocusEvent) => void>;
@@ -84,6 +84,7 @@ declare const ApGroupSearch: {
84
84
  };
85
85
  dropdownMatchSelectWidth: {
86
86
  type: PropType<number | boolean>;
87
+ default: boolean;
87
88
  };
88
89
  showSearch: {
89
90
  type: PropType<boolean>;
@@ -252,7 +253,7 @@ declare const ApGroupSearch: {
252
253
  type: PropType<"small" | "large" | "middle">;
253
254
  };
254
255
  style: {
255
- type: PropType<string | false | CSSProperties | StyleValue[] | null>;
256
+ type: PropType<CSSProperties>;
256
257
  };
257
258
  onBlur: {
258
259
  type: PropType<(e: FocusEvent) => void>;
@@ -325,6 +326,7 @@ declare const ApGroupSearch: {
325
326
  };
326
327
  dropdownMatchSelectWidth: {
327
328
  type: PropType<number | boolean>;
329
+ default: boolean;
328
330
  };
329
331
  showSearch: {
330
332
  type: PropType<boolean>;
@@ -487,6 +489,7 @@ declare const ApGroupSearch: {
487
489
  }>> & {
488
490
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
489
491
  }, {
492
+ dropdownMatchSelectWidth: number | boolean;
490
493
  hasAll: boolean;
491
494
  }, true, {}, {}, {
492
495
  P: {};
@@ -500,7 +503,7 @@ declare const ApGroupSearch: {
500
503
  type: PropType<"small" | "large" | "middle">;
501
504
  };
502
505
  style: {
503
- type: PropType<string | false | CSSProperties | StyleValue[] | null>;
506
+ type: PropType<CSSProperties>;
504
507
  };
505
508
  onBlur: {
506
509
  type: PropType<(e: FocusEvent) => void>;
@@ -573,6 +576,7 @@ declare const ApGroupSearch: {
573
576
  };
574
577
  dropdownMatchSelectWidth: {
575
578
  type: PropType<number | boolean>;
579
+ default: boolean;
576
580
  };
577
581
  showSearch: {
578
582
  type: PropType<boolean>;
@@ -735,6 +739,7 @@ declare const ApGroupSearch: {
735
739
  }>> & {
736
740
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
737
741
  }, {}, {}, {}, {}, {
742
+ dropdownMatchSelectWidth: number | boolean;
738
743
  hasAll: boolean;
739
744
  }>;
740
745
  __isFragment?: never;
@@ -745,7 +750,7 @@ declare const ApGroupSearch: {
745
750
  type: PropType<"small" | "large" | "middle">;
746
751
  };
747
752
  style: {
748
- type: PropType<string | false | CSSProperties | StyleValue[] | null>;
753
+ type: PropType<CSSProperties>;
749
754
  };
750
755
  onBlur: {
751
756
  type: PropType<(e: FocusEvent) => void>;
@@ -818,6 +823,7 @@ declare const ApGroupSearch: {
818
823
  };
819
824
  dropdownMatchSelectWidth: {
820
825
  type: PropType<number | boolean>;
826
+ default: boolean;
821
827
  };
822
828
  showSearch: {
823
829
  type: PropType<boolean>;
@@ -982,6 +988,7 @@ declare const ApGroupSearch: {
982
988
  }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
983
989
  "update:value": (...args: any[]) => void;
984
990
  }, string, {
991
+ dropdownMatchSelectWidth: number | boolean;
985
992
  hasAll: boolean;
986
993
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
987
994
  $slots: {
@@ -1,5 +1,5 @@
1
1
  import { DefaultOptionType, SelectProps, SelectValue } from '@aplus-frontend/antdv/es/select';
2
- import { StyleValue } from 'vue';
2
+ import { CSSProperties } from 'vue';
3
3
  export type GroupSearchProps = Omit<SelectProps, 'value | options | mode | suffixIcon | open'> & {
4
4
  options: DefaultOptionType[];
5
5
  value?: {
@@ -7,5 +7,5 @@ export type GroupSearchProps = Omit<SelectProps, 'value | options | mode | suffi
7
7
  value: any;
8
8
  };
9
9
  hasAll?: boolean;
10
- style?: StyleValue;
10
+ style?: CSSProperties;
11
11
  };
@@ -1,12 +1,12 @@
1
- import { ref as T, defineComponent as g, h as r, render as u, onUnmounted as C } from "vue";
1
+ import { ref as T, defineComponent as g, h as r, render as d, onUnmounted as C } from "vue";
2
2
  import "../table-modal.vue.mjs";
3
3
  import "../../../index.mjs";
4
4
  import { omit as y } from "lodash-unified";
5
5
  import { ConfigProvider as A, globalConfigCached as h } from "../../../config-provider/config-provider.mjs";
6
6
  import I from "../table-modal.vue2.mjs";
7
- function E(l) {
7
+ function x(l) {
8
8
  let n = !0;
9
- const s = document.body, t = T(), { destroyOnUnmounted: i = !0 } = l, a = document.createElement("div"), m = () => {
9
+ const u = document.body, o = T(), { destroyOnUnmounted: i = !0 } = l, a = document.createElement("div"), m = () => {
10
10
  const e = g({
11
11
  setup() {
12
12
  return () => r(
@@ -14,45 +14,46 @@ function E(l) {
14
14
  { ...h.value },
15
15
  r(I, {
16
16
  ...y(l, "destroyOnUnmounted"),
17
- ref: t
17
+ ref: o
18
18
  })
19
19
  );
20
20
  }
21
21
  });
22
- s.appendChild(a), u(r(e), a), n = !1;
23
- }, c = () => {
22
+ u.appendChild(a), d(r(e), a), n = !1;
23
+ }, s = () => {
24
24
  var e;
25
- (e = t.value) == null || e.close(), n || setTimeout(() => {
26
- u(null, a), s.removeChild(a), n = !0;
25
+ (e = o.value) == null || e.close(), n || setTimeout(() => {
26
+ var t;
27
+ d(null, a), (t = a.parentElement) == null || t.removeChild(a), n = !0;
27
28
  }, 400);
28
- }, f = async (e = [], o = {}) => {
29
- var d;
30
- return t.value || m(), (d = t.value) == null ? void 0 : d.open(e, o);
31
- }, p = () => {
29
+ }, p = async (e = [], t = {}) => {
30
+ var c;
31
+ return o.value || m(), (c = o.value) == null ? void 0 : c.open(e, t);
32
+ }, f = () => {
32
33
  var e;
33
- n || (e = t.value) == null || e.close();
34
+ n || (e = o.value) == null || e.close();
34
35
  }, v = () => {
35
- var e, o;
36
- (o = (e = t.value) == null ? void 0 : e.getApTableInstance()) == null || o.submit();
36
+ var e, t;
37
+ (t = (e = o.value) == null ? void 0 : e.getApTableInstance()) == null || t.submit();
37
38
  }, b = () => {
38
- var e, o;
39
- (o = (e = t.value) == null ? void 0 : e.getApTableInstance()) == null || o.reset();
39
+ var e, t;
40
+ (t = (e = o.value) == null ? void 0 : e.getApTableInstance()) == null || t.reset();
40
41
  };
41
42
  return C(() => {
42
- i && c();
43
+ i && s();
43
44
  }), {
44
- openModal: f,
45
- closeModal: p,
46
- destroy: c,
45
+ openModal: p,
46
+ closeModal: f,
47
+ destroy: s,
47
48
  reloadApTableData: v,
48
49
  resetApTableData: b,
49
50
  getApTableInstance: () => {
50
51
  var e;
51
- return (e = t.value) == null ? void 0 : e.getApTableInstance();
52
+ return (e = o.value) == null ? void 0 : e.getApTableInstance();
52
53
  },
53
54
  isDestroyed: n
54
55
  };
55
56
  }
56
57
  export {
57
- E as useCreateTableModal
58
+ x as useCreateTableModal
58
59
  };
@@ -1,8 +1,9 @@
1
- import { onUnmounted as p } from "vue";
2
- import { merge as f } from "lodash-unified";
1
+ import { onUnmounted as c } from "vue";
2
+ import { AsyncOpenResultError as f } from "../interface.mjs";
3
+ import { merge as i } from "lodash-unified";
3
4
  import { useCreateTableModal as u } from "./use-create-table-modal.mjs";
4
- function T(t) {
5
- const l = f(t, {
5
+ function A(r) {
6
+ const t = i(r, {
6
7
  ...{
7
8
  footer: null
8
9
  },
@@ -11,20 +12,25 @@ function T(t) {
11
12
  },
12
13
  destroyOnUnmounted: !1,
13
14
  isRenderModalTitleSuffix: !1
14
- }), { destroy: o, openModal: r, closeModal: s, ...a } = u(l), n = async (d) => {
15
- r([], d);
15
+ }), { destroy: o, openModal: l, closeModal: a, ...n } = u(t), s = async (d) => {
16
+ try {
17
+ await l([], d);
18
+ } catch (p) {
19
+ if (p !== f.ModalCancel)
20
+ throw Error;
21
+ }
16
22
  }, e = () => {
17
- s();
23
+ a();
18
24
  };
19
- return p(() => {
25
+ return c(() => {
20
26
  e(), o();
21
27
  }), {
22
- open: n,
28
+ open: s,
23
29
  destroy: o,
24
30
  close: e,
25
- ...a
31
+ ...n
26
32
  };
27
33
  }
28
34
  export {
29
- T as useTableModal
35
+ A as useTableModal
30
36
  };
@@ -1,28 +1,29 @@
1
- import { defineComponent as l, createVNode as r, render as n, h as m } from "vue";
1
+ import { defineComponent as m, createVNode as n, render as r, h as i } from "vue";
2
2
  import "./work-order-modal.vue2.mjs";
3
3
  import "../config-provider/index.mjs";
4
- import { ConfigProvider as i, globalConfigCached as c } from "../config-provider/config-provider.mjs";
5
- import p from "./work-order-modal.vue.mjs";
6
- function v(t, d) {
7
- const o = document.getElementsByTagName("body")[0], e = document.createElement("div");
8
- o.appendChild(e), n(m(/* @__PURE__ */ l({
4
+ import { ConfigProvider as c, globalConfigCached as p } from "../config-provider/config-provider.mjs";
5
+ import s from "./work-order-modal.vue.mjs";
6
+ function b(t, d) {
7
+ const a = document.getElementsByTagName("body")[0], e = document.createElement("div");
8
+ a.appendChild(e), r(i(/* @__PURE__ */ m({
9
9
  render() {
10
- return r(i, c.value, {
11
- default: () => [r(p, {
10
+ return n(c, p.value, {
11
+ default: () => [n(s, {
12
12
  api: t,
13
13
  getOssAccess: d,
14
- onModalClose: a,
14
+ onModalClose: l,
15
15
  open: !0
16
16
  }, null)]
17
17
  });
18
18
  }
19
19
  })), e);
20
- function a() {
20
+ function l() {
21
21
  setTimeout(() => {
22
- n(null, e), o.removeChild(e);
22
+ var o;
23
+ r(null, e), (o = e.parentElement) == null || o.removeChild(e);
23
24
  }, 500);
24
25
  }
25
26
  }
26
27
  export {
27
- v as createWorkOrderModal
28
+ b as createWorkOrderModal
28
29
  };
@@ -15,7 +15,7 @@ type Recordable = Record<string, any>;
15
15
  /** 基本描述类型 */
16
16
  export interface ItemSchema<T extends Recordable = Recordable> {
17
17
  label: VNodeChild | VNode;
18
- field: keyof T;
18
+ field: keyof T | (string & {}) | string[];
19
19
  span?: number;
20
20
  prefix?: VNodeChild | VNode;
21
21
  suffix?: VNodeChild | VNode;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),v=require("../context.js"),F=require("lodash-unified"),V=r.defineComponent({name:"ApFormList",__name:"index",props:{name:{},initialValue:{},transform:{type:[Function,Object]}},setup(f){let s=1;const o=[],t=f,{model:i,updateModel:u,internalInstance:l}=v.useInjectForm();r.onMounted(()=>{l==null||l.registerField({name:t.name,initialValue:t.initialValue,transform:t.transform})});const a=r.computed(()=>F.isArray(t.name)?t.name.reduce((e,n)=>e==null?void 0:e.value[n],i):i==null?void 0:i.value[t.name]);function d(e=void 0){const n=r.unref(a)?[...r.unref(a),e]:[e];o.push(s),s+=1,u==null||u(t.name,n)}function p(e){let n=r.unref(a)||[];n=[...n.slice(0,e),...n.slice(e+1)],o.splice(e,1),u==null||u(t.name,n)}const y={add:d,remove:p},_=r.computed(()=>(r.unref(a)||[]).map((n,c)=>{let m=o[c];return typeof m>"u"&&(o[c]=s,m=s,s+=1),{key:m,fieldName:c,name:[t.name,c],value:n}}));return(e,n)=>r.renderSlot(e.$slots,"default",{fields:_.value,actions:y})}});exports.default=V;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),v=require("../context.js"),F=require("lodash-unified"),V=r.defineComponent({name:"ApFormList",__name:"index",props:{name:{},initialValue:{},transform:{type:[Function,Object]}},setup(m){let s=1;const i=[],t=m,{model:o,updateModel:u,internalInstance:l}=v.useInjectForm();r.onMounted(()=>{l==null||l.registerField({name:t.name,initialValue:t.initialValue,transform:t.transform})});const a=r.computed(()=>t.name?F.isArray(t.name)?t.name.reduce((e,n)=>e==null?void 0:e[n],r.unref(o)):o==null?void 0:o.value[t.name]:null);function d(e=void 0){const n=r.unref(a)?[...r.unref(a),e]:[e];i.push(s),s+=1,u==null||u(t.name,n)}function p(e){let n=r.unref(a)||[];n=[...n.slice(0,e),...n.slice(e+1)],i.splice(e,1),u==null||u(t.name,n)}const y={add:d,remove:p},_=r.computed(()=>(r.unref(a)||[]).map((n,c)=>{let f=i[c];return typeof f>"u"&&(i[c]=s,f=s,s+=1),{key:f,fieldName:c,name:[t.name,c].flat(),value:n}}));return(e,n)=>r.renderSlot(e.$slots,"default",{fields:_.value,actions:y})}});exports.default=V;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("@aplus-frontend/antdv");require("../ap-form.vue.js");require("../item/index.vue2.js");require("../../hooks/index.js");const b=require("../item-group/helper.js"),J=require("@ant-design/icons-vue");require("../../config-provider/index.js");const y=require("lodash-unified"),w=require("../../utils/index.js"),K=require("./utils.js"),Q=require("../../hooks/useControllableValue.js"),X=require("../../config-provider/hooks/use-namespace.js"),Y=require("../../config-provider/hooks/use-global-config.js"),Z=require("../../config-provider/hooks/use-locale.js"),A=require("../item/index.vue.js"),ee=require("../ap-form.vue2.js");function te(m){return typeof m=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!e.isVNode(m)}const s=24,ne=e.defineComponent({name:"ApFormSearchForm",__name:"index",props:{layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onValuesChange:{},onFieldsChange:{},onFinish:{},onFinishFailed:{},onValidate:{},initialValues:{},collapse:{type:Boolean,default:void 0},defaultCollapse:{type:Boolean,default:!1},"onUpdate:collapse":{},searchText:{},resetText:{},onReset:{},customReset:{type:Boolean,default:!1},extraInAction:{type:Boolean,default:!1},forceExpand:{type:Boolean,default:!1},countPerRow:{default:4},submitLoading:{type:Boolean}},emits:["update:collapse"],setup(m,{expose:q,emit:E}){var v;const u=e.useSlots(),a=m,I=E,{value:c,updateValue:P}=Q.useControllableValue(a,I,{valuePropName:"collapse",defaultValuePropName:"defaultCollapse"}),{b:T}=X.useNamespace("ap-form-search-form"),O=Y.useGlobalConfig("uiMode"),{t:g}=Z.useLocale(),x=e.ref();function D(){P(!e.unref(c))}function M(){var t,n;(n=(t=x.value)==null?void 0:t.validateFields())==null||n.then(a.onSubmit)}function j(){var t,n,o;a.customReset||(n=(t=x.value)==null?void 0:t.resetFields)==null||n.call(t),(o=a.onReset)==null||o.call(a)}let N=[];const C=e.shallowRef(b.genRealChildren(u.default())),i=e.shallowRef((v=u.extra)==null?void 0:v.call(u)),B=e.computed(()=>Math.floor(s/a.countPerRow));e.watch(()=>u.default(),t=>{N=C.value,C.value=b.genRealChildren(t)}),e.watch(()=>{var t;return(t=u.extra)==null?void 0:t.call(u)},t=>{i.value=t});const L=t=>w.isDef(t)?(y.isArray(t)?t:[t]).join(""):Date.now(),_=e.computed(()=>{const t=K.diffFormItem(N,C.value),n=[],o=[],l=e.unref(B);let p=0;t.forEach(d=>{const f=d.props;(y.isBoolean(f.hidden)?!!f.hidden:w.isDef(f.hidden))?n.push(d):(p+=f.span||l,o.push(d))});const F=s-(p+l)%s,U=p%s<l,$=F<l?s:F,R=s-l*(e.unref(i)&&!a.extraInAction?2:1),z=!a.forceExpand&&p>R;let S=0,V=0;const G=o.map((d,f)=>{const h=d.props,k=h.span||l;if(S+=k,!a.forceExpand&&e.unref(c)&&S>R){n.push(e.cloneVNode(d,{class:"ant-form-item-hidden",hidden:!0}));return}return V+=k,{node:d,span:h.span||l,key:`ApFormSearchFormItem-${f}-${L(h.name)}-${h._signal}`}}).filter(Boolean),H=s-V-l;return{hideNode:e.createVNode(e.Fragment,null,[n]),nodes:G,defaultExtraSpan:$,actualExtraSpan:H,showCollapse:z,lastRowOnlyIncludeActionAndExtra:U}}),W=e.computed(()=>{let t;const n=e.unref(_),o=e.createVNode(r.Col,{span:e.unref(B),key:"actionWrapper"},{default:()=>[e.createVNode(A.default,null,{default:()=>[e.createVNode(r.Flex,{justify:!e.unref(c)&&n.lastRowOnlyIncludeActionAndExtra&&!(e.unref(i)&&a.extraInAction)?"flex-end":"space-between"},{default:()=>[e.createVNode(r.Space,null,{default:()=>[e.createVNode(r.Button,{type:"primary",onClick:M,loading:a.submitLoading,htmlType:"submit"},{default:()=>[a.searchText||g("ap.apForm.search.search")]}),e.createVNode(r.Button,{onClick:j},{default:()=>[a.resetText||g("ap.apForm.search.reset")]}),n.showCollapse?e.createVNode(r.Button,{onClick:D,icon:e.createVNode(J.DoubleRightOutlined,{style:O.value==="aplus"?"color:#B8C3D1":"color:#BFBFBF",rotate:e.unref(c)?90:-90},null)},null):null]}),a.extraInAction?e.unref(i):null]})]})]}),l=!a.extraInAction&&e.unref(i)?e.createVNode(r.Col,{span:e.unref(c)?n.actualExtraSpan:n.defaultExtraSpan,key:"extraNode"},{default:()=>[e.createVNode(A.default,null,{default:()=>[e.createVNode(r.Flex,{justify:!e.unref(c)&&(n.defaultExtraSpan===s||n.lastRowOnlyIncludeActionAndExtra)?"start":"flex-end"},te(t=e.unref(i))?t:{default:()=>[t]})]})]}):null,p=e.createVNode(r.Col,{span:n.defaultExtraSpan},null);return!e.unref(c)&&n.lastRowOnlyIncludeActionAndExtra?e.createVNode(e.Fragment,null,[l||p,o]):e.createVNode(e.Fragment,null,[o,l])});return q({apForm:e.computed(()=>e.unref(x))}),(t,n)=>(e.openBlock(),e.createBlock(ee.default,e.mergeProps({class:e.unref(T)(),ref_key:"apForm",ref:x},e.unref(y.omit)(a,["collapse","defaultCollapse","onUpdate:collapse","searchText","resetText","onSubmit","onReset","extraInAction","forceExpand","countPerRow"])),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.value.hideNode))),e.createVNode(e.unref(r.Row),{gutter:16},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value.nodes,o=>(e.openBlock(),e.createBlock(e.unref(r.Col),{key:o.key,span:o.span},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.node)))]),_:2},1032,["span"]))),128)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(W.value)))]),_:1})]),_:1},16,["class"]))}});exports.default=ne;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("@aplus-frontend/antdv");require("../ap-form.vue.js");require("../item/index.vue2.js");require("../../hooks/index.js");const b=require("../item-group/helper.js"),J=require("@ant-design/icons-vue");require("../../config-provider/index.js");const y=require("lodash-unified"),w=require("../../utils/index.js"),K=require("./utils.js"),Q=require("../../hooks/useControllableValue.js"),X=require("../../config-provider/hooks/use-namespace.js"),Y=require("../../config-provider/hooks/use-global-config.js"),Z=require("../../config-provider/hooks/use-locale.js"),A=require("../item/index.vue.js"),ee=require("../ap-form.vue2.js");function te(m){return typeof m=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!e.isVNode(m)}const s=24,ne=e.defineComponent({name:"ApFormSearchForm",__name:"index",props:{layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onValuesChange:{},onFieldsChange:{},onFinish:{},onFinishFailed:{},onValidate:{},initialValues:{},collapse:{type:Boolean,default:void 0},defaultCollapse:{type:Boolean,default:!1},"onUpdate:collapse":{},searchText:{},resetText:{},onReset:{},customReset:{type:Boolean,default:!1},extraInAction:{type:Boolean,default:!1},forceExpand:{type:Boolean,default:!1},countPerRow:{default:4},submitLoading:{type:Boolean}},emits:["update:collapse"],setup(m,{expose:q,emit:E}){var v;const u=e.useSlots(),a=m,I=E,{value:c,updateValue:P}=Q.useControllableValue(a,I,{valuePropName:"collapse",defaultValuePropName:"defaultCollapse"}),{b:T}=X.useNamespace("ap-form-search-form"),O=Y.useGlobalConfig("uiMode"),{t:g}=Z.useLocale(),x=e.ref();function D(){P(!e.unref(c))}function M(){var t,n;(n=(t=x.value)==null?void 0:t.validateFields())==null||n.then(a.onSubmit)}function j(){var t,n,o;a.customReset||(n=(t=x.value)==null?void 0:t.resetFields)==null||n.call(t),(o=a.onReset)==null||o.call(a)}let N=[];const C=e.shallowRef(b.genRealChildren(u.default())),i=e.shallowRef((v=u.extra)==null?void 0:v.call(u)),B=e.computed(()=>Math.floor(s/a.countPerRow));e.watch(()=>u.default(),t=>{N=C.value,C.value=K.diffFormItem(N,b.genRealChildren(t))}),e.watch(()=>{var t;return(t=u.extra)==null?void 0:t.call(u)},t=>{i.value=t});const L=t=>w.isDef(t)?(y.isArray(t)?t:[t]).join(""):Date.now(),_=e.computed(()=>{const t=C.value,n=[],o=[],l=e.unref(B);let p=0;t.forEach(d=>{const f=d.props;(y.isBoolean(f.hidden)?!!f.hidden:w.isDef(f.hidden))?n.push(d):(p+=f.span||l,o.push(d))});const F=s-(p+l)%s,U=p%s<l,$=F<l?s:F,R=s-l*(e.unref(i)&&!a.extraInAction?2:1),z=!a.forceExpand&&p>R;let S=0,V=0;const G=o.map((d,f)=>{const h=d.props,k=h.span||l;if(S+=k,!a.forceExpand&&e.unref(c)&&S>R){n.push(e.cloneVNode(d,{class:"ant-form-item-hidden",hidden:!0}));return}return V+=k,{node:d,span:h.span||l,key:`ApFormSearchFormItem-${f}-${L(h.name)}-${h._signal}`}}).filter(Boolean),H=s-V-l;return{hideNode:e.createVNode(e.Fragment,null,[n]),nodes:G,defaultExtraSpan:$,actualExtraSpan:H,showCollapse:z,lastRowOnlyIncludeActionAndExtra:U}}),W=e.computed(()=>{let t;const n=e.unref(_),o=e.createVNode(r.Col,{span:e.unref(B),key:"actionWrapper"},{default:()=>[e.createVNode(A.default,null,{default:()=>[e.createVNode(r.Flex,{justify:!e.unref(c)&&n.lastRowOnlyIncludeActionAndExtra&&!(e.unref(i)&&a.extraInAction)?"flex-end":"space-between"},{default:()=>[e.createVNode(r.Space,null,{default:()=>[e.createVNode(r.Button,{type:"primary",onClick:M,loading:a.submitLoading,htmlType:"submit"},{default:()=>[a.searchText||g("ap.apForm.search.search")]}),e.createVNode(r.Button,{onClick:j},{default:()=>[a.resetText||g("ap.apForm.search.reset")]}),n.showCollapse?e.createVNode(r.Button,{onClick:D,icon:e.createVNode(J.DoubleRightOutlined,{style:O.value==="aplus"?"color:#B8C3D1":"color:#BFBFBF",rotate:e.unref(c)?90:-90},null)},null):null]}),a.extraInAction?e.unref(i):null]})]})]}),l=!a.extraInAction&&e.unref(i)?e.createVNode(r.Col,{span:e.unref(c)?n.actualExtraSpan:n.defaultExtraSpan,key:"extraNode"},{default:()=>[e.createVNode(A.default,null,{default:()=>[e.createVNode(r.Flex,{justify:!e.unref(c)&&(n.defaultExtraSpan===s||n.lastRowOnlyIncludeActionAndExtra)?"start":"flex-end"},te(t=e.unref(i))?t:{default:()=>[t]})]})]}):null,p=e.createVNode(r.Col,{span:n.defaultExtraSpan},null);return!e.unref(c)&&n.lastRowOnlyIncludeActionAndExtra?e.createVNode(e.Fragment,null,[l||p,o]):e.createVNode(e.Fragment,null,[o,l])});return q({apForm:e.computed(()=>e.unref(x))}),(t,n)=>(e.openBlock(),e.createBlock(ee.default,e.mergeProps({class:e.unref(T)(),ref_key:"apForm",ref:x},e.unref(y.omit)(a,["collapse","defaultCollapse","onUpdate:collapse","searchText","resetText","onSubmit","onReset","extraInAction","forceExpand","countPerRow"])),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.value.hideNode))),e.createVNode(e.unref(r.Row),{gutter:16},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value.nodes,o=>(e.openBlock(),e.createBlock(e.unref(r.Col),{key:o.key,span:o.span},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.node)))]),_:2},1032,["span"]))),128)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(W.value)))]),_:1})]),_:1},16,["class"]))}});exports.default=ne;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),C=require("@aplus-frontend/antdv"),u=require("../../config-provider/config-provider.js"),g=p=>{let i,t;function c(){i&&i(!1),setTimeout(()=>{o.render(null,a),l.removeChild(a)},500)}function h(e){t&&t(e)}const f=o.defineComponent({data(){return{open:!0,props:p}},methods:{async handleCancel(){var e,n,r,s,d;if((e=this.props)!=null&&e.onCancel){const m=((s=(r=(n=this.props)==null?void 0:n.content)==null?void 0:r.component)==null?void 0:s.exposed)??void 0;await((d=this.props)==null?void 0:d.onCancel(m))}c()},async handleOk(){var e,n,r,s;try{if(t({confirmLoading:!0}),(e=this.props)!=null&&e.onOk){const d=((s=(r=(n=this.props)==null?void 0:n.content)==null?void 0:r.component)==null?void 0:s.exposed)??void 0;await this.props.onOk(d)}t({confirmLoading:!1}),c()}catch{t({confirmLoading:!1})}}},created(){i=e=>{this.open=e},t=e=>{this.props={...this.props,...e}}},render(){const{...e}=this.props;return delete e.onCancel,delete e.onOk,o.createVNode(u.ConfigProvider,u.globalConfigCached.value,{default:()=>[o.createVNode(C.Modal,o.mergeProps({open:this.open,destroyOnClose:!0,onCancel:this.handleCancel,onOk:this.handleOk},e),{default:()=>{var n;return[(n=this.props)==null?void 0:n.content]}})]})}}),l=p.getContainer||document.body,a=document.createElement("div");return l.appendChild(a),o.render(o.h(f),a),{destroy:c,update:h}};exports.createModal=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),C=require("@aplus-frontend/antdv"),l=require("../../config-provider/config-provider.js"),g=p=>{let i,t;function c(){i&&i(!1),setTimeout(()=>{var e;o.render(null,r),(e=r.parentElement)==null||e.removeChild(r)},500)}function u(e){t&&t(e)}const h=o.defineComponent({data(){return{open:!0,props:p}},methods:{async handleCancel(){var e,n,s,a,d;if((e=this.props)!=null&&e.onCancel){const m=((a=(s=(n=this.props)==null?void 0:n.content)==null?void 0:s.component)==null?void 0:a.exposed)??void 0;await((d=this.props)==null?void 0:d.onCancel(m))}c()},async handleOk(){var e,n,s,a;try{if(t({confirmLoading:!0}),(e=this.props)!=null&&e.onOk){const d=((a=(s=(n=this.props)==null?void 0:n.content)==null?void 0:s.component)==null?void 0:a.exposed)??void 0;await this.props.onOk(d)}t({confirmLoading:!1}),c()}catch{t({confirmLoading:!1})}}},created(){i=e=>{this.open=e},t=e=>{this.props={...this.props,...e}}},render(){const{...e}=this.props;return delete e.onCancel,delete e.onOk,o.createVNode(l.ConfigProvider,l.globalConfigCached.value,{default:()=>[o.createVNode(C.Modal,o.mergeProps({open:this.open,destroyOnClose:!0,onCancel:this.handleCancel,onOk:this.handleOk},e),{default:()=>{var n;return[(n=this.props)==null?void 0:n.content]}})]})}}),f=p.getContainer||document.body,r=document.createElement("div");return f.appendChild(r),o.render(o.h(h),r),{destroy:c,update:u}};exports.createModal=g;
@@ -15,13 +15,16 @@ declare function __VLS_template(): {
15
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
16
  declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<GroupSearchProps>, {
17
17
  hasAll: boolean;
18
+ dropdownMatchSelectWidth: boolean;
18
19
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
19
20
  "update:value": (...args: any[]) => void;
20
21
  }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GroupSearchProps>, {
21
22
  hasAll: boolean;
23
+ dropdownMatchSelectWidth: boolean;
22
24
  }>>> & {
23
25
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
24
26
  }, {
27
+ dropdownMatchSelectWidth: number | boolean;
25
28
  hasAll: boolean;
26
29
  }, {}>;
27
30
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("@aplus-frontend/antdv"),A=require("./images/icon-down.vue.js");require("./extension-select/index.vue.js");const V=require("../../hooks/useControllableValue.js");require("../../config-provider/index.js");const x=require("../../config-provider/hooks/use-locale.js"),k=require("../../config-provider/hooks/use-global-config.js"),N=require("../../config-provider/hooks/use-namespace.js"),q=require("./extension-select/index.vue2.js"),c="GROUP_SEARCH_ALL",I=e.defineComponent({__name:"ap-group-search",props:{value:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},mode:{},bordered:{type:Boolean},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},"onUpdate:value":{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean},animation:{},direction:{},disabled:{type:Boolean},prefixCls:{},id:{},autofocus:{type:Boolean},getPopupContainer:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{},options:{},showAction:{},onDeselect:{},loading:{type:Boolean},placeholder:{},clearIcon:{},allowClear:{type:Boolean},onSearch:{},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean},onDropdownVisibleChange:{},showArrow:{type:Boolean},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean},labelInValue:{type:Boolean},hasAll:{type:Boolean,default:!0},style:{type:[Boolean,null,String,Object,Array]}},emits:["update:value"],setup(f,{emit:m}){const{t:p}=x.useLocale(),y=k.useGlobalConfig("uiMode","aplus"),l=f,v=m,{value:n,updateValue:s}=V.useControllableValue(l,v),g=o=>{let t=o;o===c&&(t=l.options.map(a=>a.value)),s({...n.value,key:t})},C=e.computed(()=>{let o=[];return l.hasAll&&(o=[{value:c,label:p("ap.apGroupSearch.all")}]),[...o,...l.options]}),S=e.computed(()=>{var r,u;const o=(r=n==null?void 0:n.value)==null?void 0:r.key,t=p("ap.apGroupSearch.defaultPlaceholder");if(!o)return t;const a=toString.call(o)==="[object Array]"?o:[o];return((u=l.options)==null?void 0:u.filter(i=>a.includes(i.value)).map(i=>i.label).join("/"))||t});e.onMounted(()=>{e.watch(()=>l.hasAll,()=>{var o,t;l.hasAll&&!((o=e.unref(n))!=null&&o.key)&&s({...e.unref(n),key:(t=l.options)==null?void 0:t.map(a=>a.value)})},{immediate:!0})});const b=e.computed(()=>{var a,r;const o=Object.prototype.toString,t=(a=e.unref(n))==null?void 0:a.key;if(t)return o.call(t)==="[object Array]"&&(t==null?void 0:t.length)===((r=l.options)==null?void 0:r.length)?c:t}),d=o=>{var t;o!==((t=e.unref(n))==null?void 0:t.value)&&s({...n.value,value:o})},{b:w,e:_,em:B}=N.useNamespace("ap-group-search");return(o,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(w)())},[e.createVNode(e.unref(h.Flex),null,{default:e.withCtx(()=>{var a,r;return[e.createVNode(e.unref(h.Select),{value:b.value,style:e.normalizeStyle(l.style),class:e.normalizeClass(`${o.$attrs.class} ${e.unref(y)==="admin"?e.unref(B)("search","admin"):e.unref(_)("search")}`),options:C.value,bordered:!1,onChange:g},{suffixIcon:e.withCtx(()=>[e.createVNode(A.default)]),_:1},8,["value","style","class","options"]),e.renderSlot(o.$slots,"search",{value:(a=e.unref(n))==null?void 0:a.value,change:d,key:(r=e.unref(n))==null?void 0:r.key},()=>{var u;return[e.createVNode(q.default,{style:{width:"100%"},maxTagCount:"responsive",value:(u=e.unref(n))==null?void 0:u.value,onChange:d,placeholder:S.value},null,8,["value","placeholder"])]})]}),_:3})],2))}});exports.default=I;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),h=require("@aplus-frontend/antdv"),V=require("./images/icon-down.vue.js");require("./extension-select/index.vue.js");const x=require("../../hooks/useControllableValue.js");require("../../config-provider/index.js");const M=require("../../config-provider/hooks/use-locale.js"),N=require("../../config-provider/hooks/use-global-config.js"),k=require("../../config-provider/hooks/use-namespace.js"),q=require("./extension-select/index.vue2.js"),c="GROUP_SEARCH_ALL",I=o.defineComponent({__name:"ap-group-search",props:{value:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},mode:{},bordered:{type:Boolean},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},"onUpdate:value":{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean},animation:{},direction:{},disabled:{type:Boolean},prefixCls:{},id:{},autofocus:{type:Boolean},getPopupContainer:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{default:!1},options:{},showAction:{},onDeselect:{},loading:{type:Boolean},placeholder:{},clearIcon:{},allowClear:{type:Boolean},onSearch:{},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean},onDropdownVisibleChange:{},showArrow:{type:Boolean},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean},labelInValue:{type:Boolean},hasAll:{type:Boolean,default:!0},style:{}},emits:["update:value"],setup(f,{emit:m}){const{t:p}=M.useLocale(),y=N.useGlobalConfig("uiMode","aplus"),n=f,v=o.computed(()=>({width:"auto",...n.style})),g=m,{value:a,updateValue:s}=x.useControllableValue(n,g),C=e=>{let t=e;e===c?t=n.options.map(l=>l.value):t=toString.call(t)==="[object Array]"?e:[e],s({...a.value,key:t})},S=o.computed(()=>{let e=[];return n.hasAll&&(e=[{value:c,label:p("ap.apGroupSearch.all")}]),[...e,...n.options]}),w=o.computed(()=>{var r,u;const e=(r=a==null?void 0:a.value)==null?void 0:r.key,t=p("ap.apGroupSearch.defaultPlaceholder");if(!e)return t;const l=toString.call(e)==="[object Array]"?e:[e];return((u=n.options)==null?void 0:u.filter(i=>l.includes(i.value)).map(i=>i.label).join("/"))||t});o.onMounted(()=>{o.watch(()=>{var e;return[n.hasAll,(e=o.unref(a))==null?void 0:e.key]},()=>{var e,t;n.hasAll&&!((e=o.unref(a))!=null&&e.key)&&s({...o.unref(a),key:(t=n.options)==null?void 0:t.map(l=>l.value)})},{immediate:!0})});const b=o.computed(()=>{var t,l;const e=(t=o.unref(a))==null?void 0:t.key;if(e)return toString.call(e)==="[object Array]"?(e==null?void 0:e.length)===((l=n.options)==null?void 0:l.length)?c:e==null?void 0:e[0]:e}),d=e=>{var t;e!==((t=o.unref(a))==null?void 0:t.value)&&s({...a.value,value:e})},{b:_,e:B,em:A}=k.useNamespace("ap-group-search");return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(_)())},[o.createVNode(o.unref(h.Flex),null,{default:o.withCtx(()=>{var l,r;return[o.createVNode(o.unref(h.Select),{value:b.value,style:o.normalizeStyle(v.value),class:o.normalizeClass(`${e.$attrs.class} ${o.unref(y)==="admin"?o.unref(A)("search","admin"):o.unref(B)("search")}`),options:S.value,bordered:!1,dropdownMatchSelectWidth:n.dropdownMatchSelectWidth,onChange:C},{suffixIcon:o.withCtx(()=>[o.createVNode(V.default)]),_:1},8,["value","style","class","options","dropdownMatchSelectWidth"]),o.renderSlot(e.$slots,"search",{value:(l=o.unref(a))==null?void 0:l.value,change:d,key:(r=o.unref(a))==null?void 0:r.key},()=>{var u;return[o.createVNode(q.default,{style:{width:"100%"},maxTagCount:"responsive",value:(u=o.unref(a))==null?void 0:u.value,onChange:d,placeholder:w.value},null,8,["value","placeholder"])]})]}),_:3})],2))}});exports.default=I;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("@aplus-frontend/antdv");require("../popover-select/index.vue.js");require("../../../config-provider/index.js");const h=require("../../../config-provider/hooks/use-global-config.js"),g=require("../popover-select/index.vue2.js"),v=e.defineComponent({__name:"index",props:{value:{},defaultValue:{},notFoundContent:{},itemIcon:{},size:{},bordered:{type:Boolean},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},"onUpdate:value":{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean},animation:{},direction:{},disabled:{type:Boolean},prefixCls:{},id:{},autofocus:{type:Boolean},getPopupContainer:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{},options:{},showAction:{},onDeselect:{},loading:{type:Boolean},placeholder:{},clearIcon:{},allowClear:{type:Boolean},onSearch:{},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean},onDropdownVisibleChange:{},showArrow:{type:Boolean},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean},labelInValue:{type:Boolean}},emits:["change"],setup(u,{emit:i}){const p=h.useGlobalConfig("uiMode","aplus"),a=u,o=e.ref(a.value),l=e.ref(!1),s=i,d=n=>{o.value=n},c=n=>{n&&(l.value=!1)};return e.watchEffect(()=>{s("change",o.value)}),(n,t)=>(e.openBlock(),e.createBlock(e.unref(m.Select),{value:o.value,style:e.normalizeStyle(n.$attrs.style),bordered:e.unref(p)==="admin",mode:"tags",showArrow:!0,open:l.value,onDropdownVisibleChange:t[0]||(t[0]=r=>l.value=r),onChange:t[1]||(t[1]=r=>o.value=r),maxTagCount:a.maxTagCount,placeholder:a.placeholder},{suffixIcon:e.withCtx(()=>[e.createVNode(g.default,{value:o.value,onSubmit:d,onOpenChange:c},null,8,["value"])]),_:1},8,["value","style","bordered","open","maxTagCount","placeholder"]))}});exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("@aplus-frontend/antdv");require("../popover-select/index.vue.js");require("../../../config-provider/index.js");const m=require("../../../config-provider/hooks/use-global-config.js"),g=require("../popover-select/index.vue2.js"),v=e.defineComponent({__name:"index",props:{value:{},defaultValue:{},notFoundContent:{},itemIcon:{},size:{},bordered:{type:Boolean},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},"onUpdate:value":{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean},animation:{},direction:{},disabled:{type:Boolean},prefixCls:{},id:{},autofocus:{type:Boolean},getPopupContainer:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{},options:{},showAction:{},onDeselect:{},loading:{type:Boolean},placeholder:{},clearIcon:{},allowClear:{type:Boolean},onSearch:{},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean},onDropdownVisibleChange:{},showArrow:{type:Boolean},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean},labelInValue:{type:Boolean}},emits:["change"],setup(u,{emit:i}){const p=m.useGlobalConfig("uiMode","aplus"),n=u,a=e.ref(),t=e.ref(!1),s=i,d=o=>{o&&(t.value=!1)};e.watch(()=>n.value,()=>{a.value=n.value},{immediate:!0});const l=o=>{a.value=o,s("change",o)};return(o,r)=>(e.openBlock(),e.createBlock(e.unref(h.Select),{value:a.value,style:e.normalizeStyle(o.$attrs.style),bordered:e.unref(p)==="admin",mode:"tags",showArrow:!0,open:t.value,onDropdownVisibleChange:r[0]||(r[0]=c=>t.value=c),onChange:l,maxTagCount:n.maxTagCount,placeholder:n.placeholder},{suffixIcon:e.withCtx(()=>[e.createVNode(g.default,{value:a.value,onSubmit:l,onOpenChange:d},null,8,["value"])]),_:1},8,["value","style","bordered","open","maxTagCount","placeholder"]))}});exports.default=v;
@@ -1,4 +1,4 @@
1
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, StyleValue, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
1
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
2
2
  import { SelectValue, DefaultOptionType, LabeledValue } from '@aplus-frontend/antdv/es/select';
3
3
  import { SelectHandler, FieldNames, FilterFunc } from '@aplus-frontend/antdv/es/vc-select/Select';
4
4
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
@@ -11,7 +11,7 @@ declare const ApGroupSearch: {
11
11
  type: PropType<"small" | "large" | "middle">;
12
12
  };
13
13
  style: {
14
- type: PropType<string | false | CSSProperties | StyleValue[] | null>;
14
+ type: PropType<CSSProperties>;
15
15
  };
16
16
  onBlur: {
17
17
  type: PropType<(e: FocusEvent) => void>;
@@ -84,6 +84,7 @@ declare const ApGroupSearch: {
84
84
  };
85
85
  dropdownMatchSelectWidth: {
86
86
  type: PropType<number | boolean>;
87
+ default: boolean;
87
88
  };
88
89
  showSearch: {
89
90
  type: PropType<boolean>;
@@ -252,7 +253,7 @@ declare const ApGroupSearch: {
252
253
  type: PropType<"small" | "large" | "middle">;
253
254
  };
254
255
  style: {
255
- type: PropType<string | false | CSSProperties | StyleValue[] | null>;
256
+ type: PropType<CSSProperties>;
256
257
  };
257
258
  onBlur: {
258
259
  type: PropType<(e: FocusEvent) => void>;
@@ -325,6 +326,7 @@ declare const ApGroupSearch: {
325
326
  };
326
327
  dropdownMatchSelectWidth: {
327
328
  type: PropType<number | boolean>;
329
+ default: boolean;
328
330
  };
329
331
  showSearch: {
330
332
  type: PropType<boolean>;
@@ -487,6 +489,7 @@ declare const ApGroupSearch: {
487
489
  }>> & {
488
490
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
489
491
  }, {
492
+ dropdownMatchSelectWidth: number | boolean;
490
493
  hasAll: boolean;
491
494
  }, true, {}, {}, {
492
495
  P: {};
@@ -500,7 +503,7 @@ declare const ApGroupSearch: {
500
503
  type: PropType<"small" | "large" | "middle">;
501
504
  };
502
505
  style: {
503
- type: PropType<string | false | CSSProperties | StyleValue[] | null>;
506
+ type: PropType<CSSProperties>;
504
507
  };
505
508
  onBlur: {
506
509
  type: PropType<(e: FocusEvent) => void>;
@@ -573,6 +576,7 @@ declare const ApGroupSearch: {
573
576
  };
574
577
  dropdownMatchSelectWidth: {
575
578
  type: PropType<number | boolean>;
579
+ default: boolean;
576
580
  };
577
581
  showSearch: {
578
582
  type: PropType<boolean>;
@@ -735,6 +739,7 @@ declare const ApGroupSearch: {
735
739
  }>> & {
736
740
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
737
741
  }, {}, {}, {}, {}, {
742
+ dropdownMatchSelectWidth: number | boolean;
738
743
  hasAll: boolean;
739
744
  }>;
740
745
  __isFragment?: never;
@@ -745,7 +750,7 @@ declare const ApGroupSearch: {
745
750
  type: PropType<"small" | "large" | "middle">;
746
751
  };
747
752
  style: {
748
- type: PropType<string | false | CSSProperties | StyleValue[] | null>;
753
+ type: PropType<CSSProperties>;
749
754
  };
750
755
  onBlur: {
751
756
  type: PropType<(e: FocusEvent) => void>;
@@ -818,6 +823,7 @@ declare const ApGroupSearch: {
818
823
  };
819
824
  dropdownMatchSelectWidth: {
820
825
  type: PropType<number | boolean>;
826
+ default: boolean;
821
827
  };
822
828
  showSearch: {
823
829
  type: PropType<boolean>;
@@ -982,6 +988,7 @@ declare const ApGroupSearch: {
982
988
  }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
983
989
  "update:value": (...args: any[]) => void;
984
990
  }, string, {
991
+ dropdownMatchSelectWidth: number | boolean;
985
992
  hasAll: boolean;
986
993
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
987
994
  $slots: {
@@ -1,5 +1,5 @@
1
1
  import { DefaultOptionType, SelectProps, SelectValue } from '@aplus-frontend/antdv/es/select';
2
- import { StyleValue } from 'vue';
2
+ import { CSSProperties } from 'vue';
3
3
  export type GroupSearchProps = Omit<SelectProps, 'value | options | mode | suffixIcon | open'> & {
4
4
  options: DefaultOptionType[];
5
5
  value?: {
@@ -7,5 +7,5 @@ export type GroupSearchProps = Omit<SelectProps, 'value | options | mode | suffi
7
7
  value: any;
8
8
  };
9
9
  hasAll?: boolean;
10
- style?: StyleValue;
10
+ style?: CSSProperties;
11
11
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue");require("../table-modal.vue.js");require("../../../index.js");const g=require("lodash-unified"),c=require("../../../config-provider/config-provider.js"),T=require("../table-modal.vue2.js");function y(l){let r=!0;const u=document.body,t=n.ref(),{destroyOnUnmounted:i=!0}=l,a=document.createElement("div"),v=()=>{const e=n.defineComponent({setup(){return()=>n.h(c.ConfigProvider,{...c.globalConfigCached.value},n.h(T.default,{...g.omit(l,"destroyOnUnmounted"),ref:t}))}});u.appendChild(a),n.render(n.h(e),a),r=!1},s=()=>{var e;(e=t.value)==null||e.close(),r||setTimeout(()=>{n.render(null,a),u.removeChild(a),r=!0},400)},f=async(e=[],o={})=>{var d;return t.value||v(),(d=t.value)==null?void 0:d.open(e,o)},b=()=>{var e;r||(e=t.value)==null||e.close()},m=()=>{var e,o;(o=(e=t.value)==null?void 0:e.getApTableInstance())==null||o.submit()},p=()=>{var e,o;(o=(e=t.value)==null?void 0:e.getApTableInstance())==null||o.reset()};return n.onUnmounted(()=>{i&&s()}),{openModal:f,closeModal:b,destroy:s,reloadApTableData:m,resetApTableData:p,getApTableInstance:()=>{var e;return(e=t.value)==null?void 0:e.getApTableInstance()},isDestroyed:r}}exports.useCreateTableModal=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue");require("../table-modal.vue.js");require("../../../index.js");const g=require("lodash-unified"),d=require("../../../config-provider/config-provider.js"),T=require("../table-modal.vue2.js");function y(l){let r=!0;const c=document.body,n=o.ref(),{destroyOnUnmounted:i=!0}=l,a=document.createElement("div"),v=()=>{const e=o.defineComponent({setup(){return()=>o.h(d.ConfigProvider,{...d.globalConfigCached.value},o.h(T.default,{...g.omit(l,"destroyOnUnmounted"),ref:n}))}});c.appendChild(a),o.render(o.h(e),a),r=!1},u=()=>{var e;(e=n.value)==null||e.close(),r||setTimeout(()=>{var t;o.render(null,a),(t=a.parentElement)==null||t.removeChild(a),r=!0},400)},f=async(e=[],t={})=>{var s;return n.value||v(),(s=n.value)==null?void 0:s.open(e,t)},m=()=>{var e;r||(e=n.value)==null||e.close()},p=()=>{var e,t;(t=(e=n.value)==null?void 0:e.getApTableInstance())==null||t.submit()},b=()=>{var e,t;(t=(e=n.value)==null?void 0:e.getApTableInstance())==null||t.reset()};return o.onUnmounted(()=>{i&&u()}),{openModal:f,closeModal:m,destroy:u,reloadApTableData:p,resetApTableData:b,getApTableInstance:()=>{var e;return(e=n.value)==null?void 0:e.getApTableInstance()},isDestroyed:r}}exports.useCreateTableModal=y;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),f=require("lodash-unified"),p=require("./use-create-table-modal.js");function M(t){const l={rowSelection:void 0},s={footer:null},n=f.merge(t,{...s,apTableProps:l,destroyOnUnmounted:!1,isRenderModalTitleSuffix:!1}),{destroy:e,openModal:r,closeModal:a,...d}=p.useCreateTableModal(n),u=async c=>{r([],c)},o=()=>{a()};return i.onUnmounted(()=>{o(),e()}),{open:u,destroy:e,close:o,...d}}exports.useTableModal=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("vue"),p=require("../interface.js"),M=require("lodash-unified"),b=require("./use-create-table-modal.js");function T(r){const t={rowSelection:void 0},n={footer:null},a=M.merge(r,{...n,apTableProps:t,destroyOnUnmounted:!1,isRenderModalTitleSuffix:!1}),{destroy:e,openModal:l,closeModal:s,...c}=b.useCreateTableModal(a),d=async u=>{try{await l([],u)}catch(i){if(i!==p.AsyncOpenResultError.ModalCancel)throw Error}},o=()=>{s()};return f.onUnmounted(()=>{o(),e()}),{open:d,destroy:e,close:o,...c}}exports.useTableModal=T;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("./work-order-modal.vue2.js");require("../config-provider/index.js");const t=require("../config-provider/config-provider.js"),u=require("./work-order-modal.vue.js");function i(n,d){const o=document.getElementsByTagName("body")[0],r=document.createElement("div");o.appendChild(r);const l=e.defineComponent({render(){return e.createVNode(t.ConfigProvider,t.globalConfigCached.value,{default:()=>[e.createVNode(u.default,{api:n,getOssAccess:d,onModalClose:a,open:!0},null)]})}});e.render(e.h(l),r);function a(){setTimeout(()=>{e.render(null,r),o.removeChild(r)},500)}}exports.createWorkOrderModal=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("./work-order-modal.vue2.js");require("../config-provider/index.js");const t=require("../config-provider/config-provider.js"),i=require("./work-order-modal.vue.js");function c(n,d){const l=document.getElementsByTagName("body")[0],r=document.createElement("div");l.appendChild(r);const a=e.defineComponent({render(){return e.createVNode(t.ConfigProvider,t.globalConfigCached.value,{default:()=>[e.createVNode(i.default,{api:n,getOssAccess:d,onModalClose:u,open:!0},null)]})}});e.render(e.h(a),r);function u(){setTimeout(()=>{var o;e.render(null,r),(o=r.parentElement)==null||o.removeChild(r)},500)}}exports.createWorkOrderModal=c;
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "main": "./lib/index.js",
5
+ "type": "module",
5
6
  "files": [
6
7
  "es",
7
8
  "lib"
@@ -62,15 +63,15 @@
62
63
  "sortablejs": "^1.15.2",
63
64
  "vuedraggable": "^4.1.0",
64
65
  "rxjs": "^7.8.1",
65
- "@aplus-frontend/hooks": "1.0.7",
66
- "@aplus-frontend/utils": "1.0.42"
66
+ "@aplus-frontend/utils": "1.0.42",
67
+ "@aplus-frontend/hooks": "1.0.7"
67
68
  },
68
69
  "peerDependencies": {
69
70
  "vue": "3.4.38",
70
71
  "@aplus-frontend/icon": "^1.0.21",
71
72
  "@aplus-frontend/oss": "^1.1.2",
72
73
  "@aplus-frontend/antdv": "^1.0.3",
73
- "@aplus-frontend/ui-theme": "1.0.10"
74
+ "@aplus-frontend/ui-theme": "1.0.11"
74
75
  },
75
76
  "devDependencies": {
76
77
  "vue": "3.4.38",