@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.
- package/es/src/ap-field/select/index.vue.mjs +184 -154
- package/es/src/ap-table/hooks/use-table-template-storage.mjs +44 -44
- package/es/src/business/ap-tag/ap-tag-group.vue.mjs +83 -60
- package/es/src/business/ap-tag/interface.d.ts +4 -0
- package/es/src/business/ap-view/ap-view.vue2.mjs +88 -87
- package/es/src/business/ap-view/hooks/use-send-to-url.d.ts +2 -1
- package/es/src/business/ap-view/hooks/use-send-to-url.mjs +25 -24
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -1
- package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-tag/interface.d.ts +4 -0
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/hooks/use-send-to-url.d.ts +2 -1
- package/lib/src/business/ap-view/hooks/use-send-to-url.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,112 +1,107 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import { omit as
|
|
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
|
|
6
|
+
import { useToken as X } from "../../config-provider/hooks/use-token.mjs";
|
|
7
7
|
import "../../hooks/index.mjs";
|
|
8
|
-
import { useDevWarning as
|
|
8
|
+
import { useDevWarning as Y } from "../../utils/warning.mjs";
|
|
9
9
|
import "./ap-tag.vue2.mjs";
|
|
10
|
-
import
|
|
11
|
-
import { getTextWidth as
|
|
12
|
-
import { useLocale as
|
|
13
|
-
import { useNamespace as
|
|
14
|
-
import { useResize as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
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(
|
|
25
|
-
const { t:
|
|
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:
|
|
27
|
+
iconColor: P.value?.textColor1,
|
|
28
28
|
symbol: "icon",
|
|
29
|
-
text:
|
|
29
|
+
text: G("ap.common.more")
|
|
30
30
|
},
|
|
31
31
|
...l.ellipsis
|
|
32
|
-
})),
|
|
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
|
|
35
|
+
const c = i.value.offsetWidth;
|
|
36
36
|
for (let s of l.list) {
|
|
37
|
-
const
|
|
37
|
+
const y = s.size === "small" ? 8 : 12, b = S(
|
|
38
38
|
s.size === "large" ? 14 : 12,
|
|
39
39
|
s.text
|
|
40
|
-
) +
|
|
41
|
-
if (e +=
|
|
42
|
-
e -=
|
|
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
|
|
49
|
-
l.ellipsis.symbol === "icon" ? e += 16 : e +=
|
|
48
|
+
const y = S(12, r.value.text);
|
|
49
|
+
l.ellipsis.symbol === "icon" ? e += 16 : e += y, e > c && o--;
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
d.value = o;
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
F(
|
|
54
54
|
() => l.list,
|
|
55
55
|
(e, o) => {
|
|
56
|
-
e !== o &&
|
|
57
|
-
|
|
56
|
+
e !== o && M(() => {
|
|
57
|
+
W();
|
|
58
58
|
});
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
immediate: !0
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
const
|
|
65
|
-
|
|
64
|
+
const L = () => {
|
|
65
|
+
W();
|
|
66
66
|
};
|
|
67
|
-
return
|
|
67
|
+
return U(() => {
|
|
68
68
|
[["ellipsisColor", "ellipse.color"]].forEach(
|
|
69
69
|
([e, o]) => {
|
|
70
|
-
|
|
70
|
+
$.deprecated(
|
|
71
71
|
!l[e],
|
|
72
72
|
e,
|
|
73
73
|
o
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
|
-
), i.value &&
|
|
77
|
-
}),
|
|
78
|
-
i.value &&
|
|
79
|
-
}), (e, o) => (
|
|
80
|
-
|
|
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:
|
|
90
|
-
style:
|
|
91
|
-
pointerEvents:
|
|
84
|
+
class: x(I.value),
|
|
85
|
+
style: _({
|
|
86
|
+
pointerEvents: v.value ? "auto" : "none"
|
|
92
87
|
// opacity: isUpdating ? '0' : '1'
|
|
93
88
|
})
|
|
94
89
|
}, [
|
|
95
|
-
(
|
|
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 >=
|
|
93
|
+
display: s >= d.value ? "none" : "inline-flex",
|
|
99
94
|
marginRight: `${e.space}px`
|
|
100
95
|
}
|
|
101
96
|
}), null, 16, ["style"]))), 128)),
|
|
102
|
-
|
|
97
|
+
v.value && r.value.symbol === "icon" ? (n(), m(a(O), {
|
|
103
98
|
key: 0,
|
|
104
|
-
style:
|
|
99
|
+
style: _({
|
|
105
100
|
color: e.ellipsisColor || r.value.iconColor,
|
|
106
101
|
cursor: "pointer"
|
|
107
102
|
})
|
|
108
103
|
}, {
|
|
109
|
-
component:
|
|
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"])) :
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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
|
-
_:
|
|
173
|
-
},
|
|
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
|
-
|
|
200
|
+
ke as default
|
|
178
201
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isValid as
|
|
3
|
-
import { useInjectForm as
|
|
4
|
-
import { useInjectApTable as
|
|
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
|
|
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
|
|
10
|
-
import { useViewProvide as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
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
|
|
15
|
-
import { useNamespace as
|
|
16
|
-
import { useLocale as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
const
|
|
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(
|
|
54
|
-
expose:
|
|
53
|
+
setup(N, {
|
|
54
|
+
expose: _
|
|
55
55
|
}) {
|
|
56
|
-
const a =
|
|
57
|
-
b:
|
|
58
|
-
} =
|
|
59
|
-
t:
|
|
60
|
-
} =
|
|
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:
|
|
62
|
+
viewName: P("ap.apView.systemView")
|
|
63
63
|
})), {
|
|
64
|
-
getSearchFormValues:
|
|
65
|
-
setSearchFormValues:
|
|
66
|
-
submit:
|
|
67
|
-
reset:
|
|
68
|
-
submitWith:
|
|
69
|
-
getSearchFormSorterItems:
|
|
70
|
-
setSearchFormSorterItems:
|
|
71
|
-
resetSearchFormSorterItems:
|
|
72
|
-
} =
|
|
73
|
-
model:
|
|
74
|
-
} =
|
|
75
|
-
let m = !1,
|
|
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:
|
|
78
|
+
content: F(ve, {
|
|
79
79
|
maxViewNum: a.maxViewNum
|
|
80
80
|
}, null)
|
|
81
|
-
}, o =
|
|
81
|
+
}, o = V([h.value]), z = n(() => o.value.map((t) => ({
|
|
82
82
|
id: t.viewKey,
|
|
83
|
-
content:
|
|
83
|
+
content: F(pe, {
|
|
84
84
|
view: t
|
|
85
85
|
}, null)
|
|
86
86
|
}))), r = {
|
|
87
|
-
getSearchFormValues:
|
|
88
|
-
setSearchFormValues:
|
|
89
|
-
submit:
|
|
90
|
-
reset:
|
|
91
|
-
submitWith:
|
|
92
|
-
getSearchFormSorterItems:
|
|
93
|
-
setSearchFormSorterItems:
|
|
94
|
-
resetSearchFormSorterItems:
|
|
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
|
-
},
|
|
97
|
-
...
|
|
96
|
+
}, d = {
|
|
97
|
+
...O.value,
|
|
98
98
|
...a.viewCacheOption
|
|
99
99
|
}, {
|
|
100
|
-
mountedData:
|
|
101
|
-
isValidMountedData:
|
|
102
|
-
|
|
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 ||
|
|
107
|
+
searchFormModel: n(() => a?.saveDataSource?.searchFormModel || G?.value),
|
|
107
108
|
extraUrlParams: n(() => a.extraUrlParams)
|
|
108
|
-
}),
|
|
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 &&
|
|
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
|
-
},
|
|
121
|
+
}, x = {
|
|
121
122
|
getViewList: async (t) => {
|
|
122
123
|
try {
|
|
123
124
|
const {
|
|
124
125
|
tableKey: i
|
|
125
|
-
} = t, e = await
|
|
126
|
+
} = t, e = await d?.getViewList?.({
|
|
126
127
|
tableKey: i
|
|
127
128
|
});
|
|
128
|
-
return o.value = [
|
|
129
|
+
return o.value = [h.value, ...e ?? []], u(I()), o.value;
|
|
129
130
|
} catch {
|
|
130
|
-
return 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
|
|
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
|
|
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((
|
|
172
|
-
...
|
|
172
|
+
}), l && (o.value = o.value.map((g) => ({
|
|
173
|
+
...g,
|
|
173
174
|
isDefault: !1
|
|
174
175
|
})));
|
|
175
|
-
const c = o.value.find((
|
|
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
|
|
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(
|
|
187
|
+
}), o.value = o.value.filter((s) => s.viewKey !== e), e === w.value && u(I());
|
|
187
188
|
}
|
|
188
|
-
},
|
|
189
|
+
}, R = {
|
|
189
190
|
tableKey: n(() => a.tableKey),
|
|
190
191
|
currentViewKey: w,
|
|
191
192
|
changeCurrentViewKey: u,
|
|
192
|
-
popoverOpen:
|
|
193
|
-
menuOpen:
|
|
193
|
+
popoverOpen: $,
|
|
194
|
+
menuOpen: K,
|
|
194
195
|
viewList: o,
|
|
195
|
-
viewListCRUD:
|
|
196
|
+
viewListCRUD: x,
|
|
196
197
|
saveDataSource: r
|
|
197
198
|
};
|
|
198
|
-
return
|
|
199
|
-
|
|
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
|
-
}),
|
|
205
|
+
}), _({
|
|
205
206
|
setFirstDefaultSystemView: (t) => {
|
|
206
|
-
|
|
207
|
+
U = t;
|
|
207
208
|
},
|
|
208
209
|
setInitToUrl: (t) => {
|
|
209
|
-
|
|
210
|
+
b = t;
|
|
210
211
|
},
|
|
211
|
-
getMountedData: () =>
|
|
212
|
-
}), (t, i) => (
|
|
212
|
+
getMountedData: () => D.value
|
|
213
|
+
}), (t, i) => (Q(), J(f(re), X({
|
|
213
214
|
...t.$attrs
|
|
214
215
|
}, {
|
|
215
|
-
open:
|
|
216
|
-
"onUpdate:open": i[0] || (i[0] = (e) =>
|
|
217
|
-
class: [f(
|
|
218
|
-
"button-props":
|
|
219
|
-
"menu-list":
|
|
220
|
-
"overlay-class-name": [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:
|
|
225
|
-
class:
|
|
226
|
-
}, [
|
|
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
|
-
|
|
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
|
|
2
|
-
import { debounce as
|
|
3
|
-
import { ref as
|
|
4
|
-
import { setUrlQuery as C, getUrlQuery as
|
|
5
|
-
const I = (
|
|
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:
|
|
8
|
-
sendToUrl:
|
|
9
|
-
tableKey:
|
|
10
|
-
extraUrlParams:
|
|
11
|
-
searchFormModel:
|
|
12
|
-
} =
|
|
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 =
|
|
14
|
+
const a = d({}), l = d(!1), f = p(() => {
|
|
15
15
|
try {
|
|
16
16
|
const e = encodeURIComponent(
|
|
17
17
|
JSON.stringify({
|
|
18
|
-
...
|
|
19
|
-
...
|
|
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({ [
|
|
27
|
-
}, 500),
|
|
26
|
+
o && (C({ [n.value]: t }), o = !1);
|
|
27
|
+
}, 500), h = () => {
|
|
28
28
|
try {
|
|
29
|
-
const e =
|
|
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
|
|
36
|
-
|
|
35
|
+
return U(
|
|
36
|
+
m,
|
|
37
37
|
() => {
|
|
38
|
-
|
|
38
|
+
r?.value && f();
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
deep: !0,
|
|
42
42
|
immediate: !0
|
|
43
43
|
}
|
|
44
44
|
), g(() => {
|
|
45
|
-
|
|
45
|
+
r?.value && h();
|
|
46
46
|
}), {
|
|
47
|
-
mountedData:
|
|
48
|
-
isValidMountedData:
|
|
47
|
+
mountedData: u(() => a.value),
|
|
48
|
+
isValidMountedData: u(() => v(a.value)),
|
|
49
|
+
isFirstSendToUrl: l
|
|
49
50
|
};
|
|
50
51
|
};
|
|
51
52
|
export {
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.19.
|
|
1
|
+
declare const _default: "7.19.4";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED