@aplus-frontend/ui 0.2.8 → 0.2.9

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.
@@ -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
  };
@@ -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.9",
4
4
  "main": "./lib/index.js",
5
+ "type": "module",
5
6
  "files": [
6
7
  "es",
7
8
  "lib"