@aplus-frontend/ui 7.19.2 → 7.19.4

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,112 +1,107 @@
1
- import { defineComponent as j, ref as x, computed as n, unref as p, watch as I, nextTick as L, onMounted as A, onUnmounted as F, createBlock as g, openBlock as a, mergeProps as w, withCtx as v, createElementVNode as t, normalizeStyle as C, normalizeClass as k, createElementBlock as _, createCommentVNode as G, Fragment as M, renderList as U, toDisplayString as b, renderSlot as q, createTextVNode as H } from "vue";
2
- import J from "@ant-design/icons-vue";
3
- import { Tooltip as K } from "@aplus-frontend/antdv";
4
- import { omit as O } from "lodash-unified";
1
+ import { defineComponent as A, ref as T, computed as p, unref as a, watch as F, nextTick as M, onMounted as U, onUnmounted as q, createBlock as m, openBlock as n, mergeProps as h, createSlots as H, withCtx as u, createElementVNode as t, normalizeStyle as _, normalizeClass as x, createElementBlock as k, createCommentVNode as J, Fragment as z, renderList as K, toDisplayString as f, renderSlot as V, createTextVNode as B } from "vue";
2
+ import O from "@ant-design/icons-vue";
3
+ import { Tooltip as E } from "@aplus-frontend/antdv";
4
+ import { omit as Q } from "lodash-unified";
5
5
  import "../../config-provider/index.mjs";
6
- import { useToken as Q } from "../../config-provider/hooks/use-token.mjs";
6
+ import { useToken as X } from "../../config-provider/hooks/use-token.mjs";
7
7
  import "../../hooks/index.mjs";
8
- import { useDevWarning as X } from "../../utils/warning.mjs";
8
+ import { useDevWarning as Y } from "../../utils/warning.mjs";
9
9
  import "./ap-tag.vue2.mjs";
10
- import Y from "./style/group.mjs";
11
- import { getTextWidth as W } from "./utils.mjs";
12
- import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
13
- import { useNamespace as ee } from "../../config-provider/hooks/use-namespace.mjs";
14
- import { useResize as te } from "../../hooks/useResize.mjs";
15
- import oe from "./ap-tag.vue.mjs";
16
- const xe = /* @__PURE__ */ j({
10
+ import Z from "./style/group.mjs";
11
+ import { getTextWidth as S } from "./utils.mjs";
12
+ import { useLocale as ee } from "../../config-provider/hooks/use-locale.mjs";
13
+ import { useNamespace as te } from "../../config-provider/hooks/use-namespace.mjs";
14
+ import { useResize as oe } from "../../hooks/useResize.mjs";
15
+ import le from "./ap-tag.vue.mjs";
16
+ const ke = /* @__PURE__ */ A({
17
17
  __name: "ap-tag-group",
18
18
  props: {
19
19
  list: { default: () => [] },
20
20
  space: { default: 4 },
21
21
  ellipsisColor: {},
22
- ellipsis: { default: () => ({}) }
22
+ ellipsis: { default: () => ({ isWrapGroup: !0 }) }
23
23
  },
24
- setup(T) {
25
- const { t: z } = Z(), l = T, { token: V } = Q(), B = X("ApTagGroup"), { b: d } = ee("tag-group"), E = Y("tag-group"), i = x(), { observe: D, unobserve: P } = te(), r = n(() => ({
24
+ setup(D) {
25
+ const { t: G } = ee(), l = D, { token: P } = X(), $ = Y("ApTagGroup"), { b: g } = te("tag-group"), N = Z("tag-group"), i = T(), { observe: R, unobserve: j } = oe(), r = p(() => ({
26
26
  ...{
27
- iconColor: V.value?.textColor1,
27
+ iconColor: P.value?.textColor1,
28
28
  symbol: "icon",
29
- text: z("ap.common.more")
29
+ text: G("ap.common.more")
30
30
  },
31
31
  ...l.ellipsis
32
- })), S = n(() => r.value.tooltip && typeof r.value.tooltip == "object" ? O(r.value.tooltip, ["trigger", "title"]) : {}), c = n(() => p(m) < l.list.length), m = x(0), N = n(() => l.list.map((e) => e.text).join("、")), R = n(() => [d(), E.value].filter(Boolean)), h = () => {
32
+ })), w = p(() => r.value.tooltip && typeof r.value.tooltip == "object" ? Q(r.value.tooltip, ["trigger", "title"]) : {}), v = p(() => a(d) < l.list.length), d = T(0), C = p(() => l.list.map((e) => e.text).join("、")), I = p(() => [g(), N.value].filter(Boolean)), W = () => {
33
33
  let e = 0, o = 0;
34
34
  if (!i.value) return;
35
- const u = i.value.offsetWidth;
35
+ const c = i.value.offsetWidth;
36
36
  for (let s of l.list) {
37
- const f = s.size === "small" ? 8 : 12, y = W(
37
+ const y = s.size === "small" ? 8 : 12, b = S(
38
38
  s.size === "large" ? 14 : 12,
39
39
  s.text
40
- ) + f + l.space;
41
- if (e += y, e > u) {
42
- e -= y;
40
+ ) + y + l.space;
41
+ if (e += b, e > c) {
42
+ e -= b;
43
43
  break;
44
44
  }
45
45
  o++;
46
46
  }
47
47
  if (o < l.list.length) {
48
- const f = W(12, r.value.text);
49
- l.ellipsis.symbol === "icon" ? e += 16 : e += f, e > u && o--;
48
+ const y = S(12, r.value.text);
49
+ l.ellipsis.symbol === "icon" ? e += 16 : e += y, e > c && o--;
50
50
  }
51
- m.value = o;
51
+ d.value = o;
52
52
  };
53
- I(
53
+ F(
54
54
  () => l.list,
55
55
  (e, o) => {
56
- e !== o && L(() => {
57
- h();
56
+ e !== o && M(() => {
57
+ W();
58
58
  });
59
59
  },
60
60
  {
61
61
  immediate: !0
62
62
  }
63
63
  );
64
- const $ = () => {
65
- h();
64
+ const L = () => {
65
+ W();
66
66
  };
67
- return A(() => {
67
+ return U(() => {
68
68
  [["ellipsisColor", "ellipse.color"]].forEach(
69
69
  ([e, o]) => {
70
- B.deprecated(
70
+ $.deprecated(
71
71
  !l[e],
72
72
  e,
73
73
  o
74
74
  );
75
75
  }
76
- ), i.value && D(i.value, $);
77
- }), F(() => {
78
- i.value && P(i.value);
79
- }), (e, o) => (a(), g(p(K), w({ trigger: "hover" }, S.value), {
80
- title: v(() => [
81
- q(e.$slots, "tooltip", { tags: e.list }, () => [
82
- H(b(N.value), 1)
83
- ])
84
- ]),
85
- default: v(() => [
76
+ ), i.value && R(i.value, L);
77
+ }), q(() => {
78
+ i.value && j(i.value);
79
+ }), (e, o) => (n(), m(a(E), h({ trigger: "hover" }, w.value), H({
80
+ default: u(() => [
86
81
  t("div", {
87
82
  ref_key: "container",
88
83
  ref: i,
89
- class: k(R.value),
90
- style: C({
91
- pointerEvents: c.value ? "auto" : "none"
84
+ class: x(I.value),
85
+ style: _({
86
+ pointerEvents: v.value ? "auto" : "none"
92
87
  // opacity: isUpdating ? '0' : '1'
93
88
  })
94
89
  }, [
95
- (a(!0), _(M, null, U(e.list, (u, s) => (a(), g(oe, w({ ref_for: !0 }, u, {
90
+ (n(!0), k(z, null, K(e.list, (c, s) => (n(), m(le, h({ ref_for: !0 }, c, {
96
91
  key: s,
97
92
  style: {
98
- display: s >= m.value ? "none" : "inline-flex",
93
+ display: s >= d.value ? "none" : "inline-flex",
99
94
  marginRight: `${e.space}px`
100
95
  }
101
96
  }), null, 16, ["style"]))), 128)),
102
- c.value && r.value.symbol === "icon" ? (a(), g(p(J), {
97
+ v.value && r.value.symbol === "icon" ? (n(), m(a(O), {
103
98
  key: 0,
104
- style: C({
99
+ style: _({
105
100
  color: e.ellipsisColor || r.value.iconColor,
106
101
  cursor: "pointer"
107
102
  })
108
103
  }, {
109
- component: v(() => [...o[0] || (o[0] = [
104
+ component: u(() => [...o[0] || (o[0] = [
110
105
  t("svg", {
111
106
  xmlns: "http://www.w3.org/2000/svg",
112
107
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
@@ -162,17 +157,45 @@ const xe = /* @__PURE__ */ j({
162
157
  ], -1)
163
158
  ])]),
164
159
  _: 1
165
- }, 8, ["style"])) : c.value && r.value.symbol === "text" ? (a(), _("span", {
166
- key: 1,
167
- class: k(p(d)("ellipsis-text")),
168
- style: { cursor: "pointer" }
169
- }, b(r.value.text), 3)) : G("", !0)
160
+ }, 8, ["style"])) : v.value && r.value.symbol === "text" ? (n(), k(z, { key: 1 }, [
161
+ e.ellipsis.isWrapGroup ? (n(), k("span", {
162
+ key: 0,
163
+ class: x(a(g)("ellipsis-text")),
164
+ style: { cursor: "pointer" }
165
+ }, f(r.value.text), 3)) : (n(), m(a(E), h({
166
+ key: 1,
167
+ trigger: "hover"
168
+ }, w.value), {
169
+ title: u(() => [
170
+ V(e.$slots, "tooltip", { tags: e.list }, () => [
171
+ B(f(C.value), 1)
172
+ ])
173
+ ]),
174
+ default: u(() => [
175
+ t("span", {
176
+ class: x(a(g)("ellipsis-text")),
177
+ style: { cursor: "pointer" }
178
+ }, f(r.value.text), 3)
179
+ ]),
180
+ _: 3
181
+ }, 16))
182
+ ], 64)) : J("", !0)
170
183
  ], 6)
171
184
  ]),
172
- _: 3
173
- }, 16));
185
+ _: 2
186
+ }, [
187
+ e.ellipsis.isWrapGroup ? {
188
+ name: "title",
189
+ fn: u(() => [
190
+ V(e.$slots, "tooltip", { tags: e.list }, () => [
191
+ B(f(C.value), 1)
192
+ ])
193
+ ]),
194
+ key: "0"
195
+ } : void 0
196
+ ]), 1040));
174
197
  }
175
198
  });
176
199
  export {
177
- xe as default
200
+ ke as default
178
201
  };
@@ -48,6 +48,10 @@ export type EllipsisProps = {
48
48
  * 省略号气泡内容
49
49
  */
50
50
  tooltip?: Omit<TooltipProps, 'trigger' | 'title'>;
51
+ /**
52
+ * tooltip是否包围整个group
53
+ */
54
+ isWrapGroup?: boolean;
51
55
  };
52
56
  export interface ApTagGroupProps {
53
57
  /**
@@ -1,22 +1,22 @@
1
- import { defineComponent as R, computed as n, ref as d, createVNode as g, watch as q, createBlock as H, openBlock as J, unref as f, mergeProps as Q, withCtx as X, createElementVNode as Z, normalizeClass as ee } from "vue";
2
- import { isValid as te } from "@aplus-frontend/utils";
3
- import { useInjectForm as ae } from "../../ap-form/context.mjs";
4
- import { useInjectApTable as ie } from "../../ap-table/context.mjs";
1
+ import { defineComponent as q, computed as n, ref as V, createVNode as F, watch as H, createBlock as J, openBlock as Q, unref as f, mergeProps as X, withCtx as Z, createElementVNode as ee, normalizeClass as te } from "vue";
2
+ import { isValid as ae } from "@aplus-frontend/utils";
3
+ import { useInjectForm as ie } from "../../ap-form/context.mjs";
4
+ import { useInjectApTable as oe } from "../../ap-table/context.mjs";
5
5
  import "../../config-provider/index.mjs";
6
- import { ApBatchActionGroup as oe } from "../ap-batch-action-group/index.mjs";
6
+ import { ApBatchActionGroup as re } from "../ap-batch-action-group/index.mjs";
7
7
  import "./components/main-button-content.vue.mjs";
8
8
  import "./components/menu-list-content.vue.mjs";
9
- import { useSendToUrl as re } from "./hooks/use-send-to-url.mjs";
10
- import { useViewProvide as se } from "./hooks/use-view-provide.mjs";
11
- import le from "./icons/line-down.vue.mjs";
12
- import ne from "./style/index.mjs";
9
+ import { useSendToUrl as se } from "./hooks/use-send-to-url.mjs";
10
+ import { useViewProvide as le } from "./hooks/use-view-provide.mjs";
11
+ import ne from "./icons/line-down.vue.mjs";
12
+ import me from "./style/index.mjs";
13
13
  import { SYSTEM_VIEW_KEY as v } from "./utils/enum.mjs";
14
- import { useGlobalConfig as me } from "../../config-provider/hooks/use-global-config.mjs";
15
- import { useNamespace as ue } from "../../config-provider/hooks/use-namespace.mjs";
16
- import { useLocale as ce } from "../../config-provider/hooks/use-locale.mjs";
17
- import fe from "./components/main-button-content.vue2.mjs";
18
- import ve from "./components/menu-list-content.vue2.mjs";
19
- const _e = /* @__PURE__ */ R({
14
+ import { useGlobalConfig as ue } from "../../config-provider/hooks/use-global-config.mjs";
15
+ import { useNamespace as ce } from "../../config-provider/hooks/use-namespace.mjs";
16
+ import { useLocale as fe } from "../../config-provider/hooks/use-locale.mjs";
17
+ import ve from "./components/main-button-content.vue2.mjs";
18
+ import pe from "./components/menu-list-content.vue2.mjs";
19
+ const Oe = /* @__PURE__ */ q({
20
20
  name: "ApView",
21
21
  __name: "ap-view",
22
22
  props: {
@@ -50,66 +50,67 @@ const _e = /* @__PURE__ */ R({
50
50
  },
51
51
  extraUrlParams: {}
52
52
  },
53
- setup(x, {
54
- expose: N
53
+ setup(N, {
54
+ expose: _
55
55
  }) {
56
- const a = x, _ = me("viewCacheOption"), {
57
- b: V
58
- } = ue("ap-view"), {
59
- t: O
60
- } = ce(), F = ne("ap-view"), S = n(() => ({
56
+ const a = N, O = ue("viewCacheOption"), {
57
+ b: S
58
+ } = ce("ap-view"), {
59
+ t: P
60
+ } = fe(), C = me("ap-view"), h = n(() => ({
61
61
  viewKey: v,
62
- viewName: O("ap.apView.systemView")
62
+ viewName: P("ap.apView.systemView")
63
63
  })), {
64
- getSearchFormValues: P,
65
- setSearchFormValues: B,
66
- submit: L,
67
- reset: E,
68
- submitWith: M,
69
- getSearchFormSorterItems: j,
70
- setSearchFormSorterItems: k,
71
- resetSearchFormSorterItems: A
72
- } = ie(), {
73
- model: W
74
- } = ae(), G = d(!1), h = d(!1), w = d("");
75
- let m = !1, C = !1, K = !0;
76
- const $ = {
64
+ getSearchFormValues: B,
65
+ setSearchFormValues: L,
66
+ submit: E,
67
+ reset: M,
68
+ submitWith: j,
69
+ getSearchFormSorterItems: k,
70
+ setSearchFormSorterItems: A,
71
+ resetSearchFormSorterItems: W
72
+ } = oe(), {
73
+ model: G
74
+ } = ie(), $ = V(!1), K = V(!1), w = V("");
75
+ let m = !1, U = !1, b = !0;
76
+ const Y = {
77
77
  dropdownType: "dropdown",
78
- content: g(fe, {
78
+ content: F(ve, {
79
79
  maxViewNum: a.maxViewNum
80
80
  }, null)
81
- }, o = d([S.value]), Y = n(() => o.value.map((t) => ({
81
+ }, o = V([h.value]), z = n(() => o.value.map((t) => ({
82
82
  id: t.viewKey,
83
- content: g(ve, {
83
+ content: F(pe, {
84
84
  view: t
85
85
  }, null)
86
86
  }))), r = {
87
- getSearchFormValues: P,
88
- setSearchFormValues: B,
89
- submit: L,
90
- reset: E,
91
- submitWith: M,
92
- getSearchFormSorterItems: j,
93
- setSearchFormSorterItems: k,
94
- resetSearchFormSorterItems: A,
87
+ getSearchFormValues: B,
88
+ setSearchFormValues: L,
89
+ submit: E,
90
+ reset: M,
91
+ submitWith: j,
92
+ getSearchFormSorterItems: k,
93
+ setSearchFormSorterItems: A,
94
+ resetSearchFormSorterItems: W,
95
95
  ...a.saveDataSource
96
- }, y = {
97
- ..._.value,
96
+ }, d = {
97
+ ...O.value,
98
98
  ...a.viewCacheOption
99
99
  }, {
100
- mountedData: b,
101
- isValidMountedData: U
102
- } = re({
100
+ mountedData: D,
101
+ isValidMountedData: T,
102
+ isFirstSendToUrl: y
103
+ } = se({
103
104
  saveDataSource: r,
104
105
  sendToUrl: n(() => a.sendToUrl),
105
106
  tableKey: n(() => a.tableKey),
106
- searchFormModel: n(() => a?.saveDataSource?.searchFormModel || W?.value),
107
+ searchFormModel: n(() => a?.saveDataSource?.searchFormModel || G?.value),
107
108
  extraUrlParams: n(() => a.extraUrlParams)
108
- }), T = () => a.isDefaultSystemView ? v : (a.isFirstDefaultSystemView || C) && m ? v : o.value.find((i) => i.isDefault)?.viewKey ?? v, u = (t) => {
109
+ }), I = () => a.isDefaultSystemView ? v : (a.isFirstDefaultSystemView || U) && m ? v : o.value.find((i) => i.isDefault)?.viewKey ?? v, u = (t) => {
109
110
  w.value = t;
110
111
  const i = o.value.find((e) => e.viewKey === w.value);
111
112
  i && setTimeout(() => {
112
- i.viewKey === v ? m ? a.manual || (a.sendToUrl && K && a.initToUrl && U.value && r?.setSearchFormValues?.(b.value), r?.submitWith?.()) : a.manual || (r?.resetSearchFormSorterItems?.(), r?.reset?.()) : (a.sendToUrl && K && a.initToUrl && U.value && m ? r?.setSearchFormValues?.(b.value) : r?.setSearchFormValues?.({
113
+ i.viewKey === v ? m ? a.manual || (a.sendToUrl && b && a.initToUrl && T.value && y.value && (r?.setSearchFormValues?.(D.value), y.value = !1), r?.submitWith?.()) : a.manual || (r?.resetSearchFormSorterItems?.(), r?.reset?.()) : (a.sendToUrl && b && a.initToUrl && T.value && m && y.value ? (r?.setSearchFormValues?.(D.value), y.value = !1) : r?.setSearchFormValues?.({
113
114
  ...Object.fromEntries(Object.keys(r?.getSearchFormValues?.() ?? {}).map((e) => [e, void 0])) ?? {},
114
115
  ...a?.emptyData ?? {},
115
116
  ...[...r?.getSearchFormSorterItems?.() ?? [], ...a?.extraParams?.map((e) => ({
@@ -117,17 +118,17 @@ const _e = /* @__PURE__ */ R({
117
118
  })) ?? []].reduce((e, s) => (i.viewConfig?.searchForm?.[s.name] && (e[s.name] = i.viewConfig?.searchForm?.[s.name]), e), {}) ?? {}
118
119
  }), r?.setSearchFormSorterItems?.(i.viewConfig?.sorterItems ?? []), m ? a.manual || r?.submitWith?.() : r?.submit?.()), m = !1;
119
120
  });
120
- }, I = {
121
+ }, x = {
121
122
  getViewList: async (t) => {
122
123
  try {
123
124
  const {
124
125
  tableKey: i
125
- } = t, e = await y?.getViewList?.({
126
+ } = t, e = await d?.getViewList?.({
126
127
  tableKey: i
127
128
  });
128
- return o.value = [S.value, ...e ?? []], u(T()), o.value;
129
+ return o.value = [h.value, ...e ?? []], u(I()), o.value;
129
130
  } catch {
130
- return o.value = [S.value], u(v), o.value;
131
+ return o.value = [h.value], u(v), o.value;
131
132
  }
132
133
  },
133
134
  addView: async (t) => {
@@ -138,7 +139,7 @@ const _e = /* @__PURE__ */ R({
138
139
  isDefault: l,
139
140
  viewConfig: p
140
141
  } = t;
141
- await y?.addView?.({
142
+ await d?.addView?.({
142
143
  tableKey: i,
143
144
  viewKey: e,
144
145
  viewName: s,
@@ -162,17 +163,17 @@ const _e = /* @__PURE__ */ R({
162
163
  isDefault: l,
163
164
  viewConfig: p
164
165
  } = t;
165
- await y?.changeView?.({
166
+ await d?.changeView?.({
166
167
  tableKey: i,
167
168
  viewKey: e,
168
169
  viewName: s,
169
170
  isDefault: l,
170
171
  viewConfig: p
171
- }), l && (o.value = o.value.map((D) => ({
172
- ...D,
172
+ }), l && (o.value = o.value.map((g) => ({
173
+ ...g,
173
174
  isDefault: !1
174
175
  })));
175
- const c = o.value.find((D) => D.viewKey === e);
176
+ const c = o.value.find((g) => g.viewKey === e);
176
177
  c && (c.viewName = s, c.isDefault = l, c.viewConfig = p), u(e);
177
178
  },
178
179
  removeView: async (t) => {
@@ -180,54 +181,54 @@ const _e = /* @__PURE__ */ R({
180
181
  tableKey: i,
181
182
  viewKey: e
182
183
  } = t;
183
- await y?.removeView?.({
184
+ await d?.removeView?.({
184
185
  tableKey: i,
185
186
  viewKey: e
186
- }), o.value = o.value.filter((s) => s.viewKey !== e), e === w.value && u(T());
187
+ }), o.value = o.value.filter((s) => s.viewKey !== e), e === w.value && u(I());
187
188
  }
188
- }, z = {
189
+ }, R = {
189
190
  tableKey: n(() => a.tableKey),
190
191
  currentViewKey: w,
191
192
  changeCurrentViewKey: u,
192
- popoverOpen: G,
193
- menuOpen: h,
193
+ popoverOpen: $,
194
+ menuOpen: K,
194
195
  viewList: o,
195
- viewListCRUD: I,
196
+ viewListCRUD: x,
196
197
  saveDataSource: r
197
198
  };
198
- return se(z), q(() => a.tableKey, (t) => {
199
- te(t) && (m = !0, I?.getViewList?.({
199
+ return le(R), H(() => a.tableKey, (t) => {
200
+ ae(t) && (m = !0, x?.getViewList?.({
200
201
  tableKey: t
201
202
  }));
202
203
  }, {
203
204
  immediate: !0
204
- }), N({
205
+ }), _({
205
206
  setFirstDefaultSystemView: (t) => {
206
- C = t;
207
+ U = t;
207
208
  },
208
209
  setInitToUrl: (t) => {
209
- K = t;
210
+ b = t;
210
211
  },
211
- getMountedData: () => b.value
212
- }), (t, i) => (J(), H(f(oe), Q({
212
+ getMountedData: () => D.value
213
+ }), (t, i) => (Q(), J(f(re), X({
213
214
  ...t.$attrs
214
215
  }, {
215
- open: h.value,
216
- "onUpdate:open": i[0] || (i[0] = (e) => h.value = e),
217
- class: [f(V)(), f(F)],
218
- "button-props": $,
219
- "menu-list": Y.value,
220
- "overlay-class-name": [f(V)("overlay"), f(F)],
216
+ open: K.value,
217
+ "onUpdate:open": i[0] || (i[0] = (e) => K.value = e),
218
+ class: [f(S)(), f(C)],
219
+ "button-props": Y,
220
+ "menu-list": z.value,
221
+ "overlay-class-name": [f(S)("overlay"), f(C)],
221
222
  trigger: "click",
222
223
  placement: "bottom"
223
224
  }), {
224
- icon: X(() => [Z("div", {
225
- class: ee([f(V)("icon")])
226
- }, [g(le)], 2)]),
225
+ icon: Z(() => [ee("div", {
226
+ class: te([f(S)("icon")])
227
+ }, [F(ne)], 2)]),
227
228
  _: 1
228
229
  }, 16, ["open", "class", "menu-list", "overlay-class-name"]));
229
230
  }
230
231
  });
231
232
  export {
232
- _e as default
233
+ Oe as default
233
234
  };
@@ -1,4 +1,4 @@
1
- import { ComputedRef } from 'vue';
1
+ import { ComputedRef, Ref } from 'vue';
2
2
  import { Recordable } from '../../../type';
3
3
  import { SaveDataSource } from '../interface';
4
4
  export declare const useSendToUrl: (option: {
@@ -10,4 +10,5 @@ export declare const useSendToUrl: (option: {
10
10
  }) => {
11
11
  mountedData: ComputedRef<Recordable>;
12
12
  isValidMountedData: ComputedRef<boolean>;
13
+ isFirstSendToUrl: Ref<boolean, boolean>;
13
14
  };
@@ -1,51 +1,52 @@
1
- import { isObjectWithContent as h } from "@aplus-frontend/utils";
2
- import { debounce as f } from "lodash-unified";
3
- import { ref as p, watch as v, onMounted as g, computed as l } from "vue";
4
- import { setUrlQuery as C, getUrlQuery as U } from "../utils/query.mjs";
5
- const I = (d) => {
1
+ import { isObjectWithContent as v } from "@aplus-frontend/utils";
2
+ import { debounce as p } from "lodash-unified";
3
+ import { ref as d, watch as U, onMounted as g, computed as u } from "vue";
4
+ import { setUrlQuery as C, getUrlQuery as y } from "../utils/query.mjs";
5
+ const I = (s) => {
6
6
  const {
7
- saveDataSource: u,
8
- sendToUrl: n,
9
- tableKey: r,
10
- extraUrlParams: c,
11
- searchFormModel: s
12
- } = d;
7
+ saveDataSource: c,
8
+ sendToUrl: r,
9
+ tableKey: n,
10
+ extraUrlParams: i,
11
+ searchFormModel: m
12
+ } = s;
13
13
  let t, o = !1;
14
- const a = p({}), m = f(() => {
14
+ const a = d({}), l = d(!1), f = p(() => {
15
15
  try {
16
16
  const e = encodeURIComponent(
17
17
  JSON.stringify({
18
- ...u?.getSearchFormValues?.(),
19
- ...c?.value?.() ?? {}
18
+ ...c?.getSearchFormValues?.(),
19
+ ...i?.value?.() ?? {}
20
20
  })
21
21
  );
22
22
  e !== t && (t = e, o = !0);
23
23
  } catch {
24
24
  t = "";
25
25
  }
26
- o && (C({ [r.value]: t }), o = !1);
27
- }, 500), i = () => {
26
+ o && (C({ [n.value]: t }), o = !1);
27
+ }, 500), h = () => {
28
28
  try {
29
- const e = U()[r.value] ?? "";
30
- a.value = e ? JSON.parse(decodeURIComponent(e)) : {};
29
+ const e = y()[n.value] ?? "";
30
+ a.value = e ? JSON.parse(decodeURIComponent(e)) : {}, l.value = !0;
31
31
  } catch {
32
32
  a.value = {};
33
33
  }
34
34
  };
35
- return v(
36
- s,
35
+ return U(
36
+ m,
37
37
  () => {
38
- n?.value && m();
38
+ r?.value && f();
39
39
  },
40
40
  {
41
41
  deep: !0,
42
42
  immediate: !0
43
43
  }
44
44
  ), g(() => {
45
- n?.value && i();
45
+ r?.value && h();
46
46
  }), {
47
- mountedData: l(() => a.value),
48
- isValidMountedData: l(() => h(a.value))
47
+ mountedData: u(() => a.value),
48
+ isValidMountedData: u(() => v(a.value)),
49
+ isFirstSendToUrl: l
49
50
  };
50
51
  };
51
52
  export {
@@ -1,2 +1,2 @@
1
- declare const _default: "7.19.2";
1
+ declare const _default: "7.19.4";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "7.19.2";
1
+ const e = "7.19.4";
2
2
  export {
3
3
  e as default
4
4
  };