smart-admin-web 10.24.0 → 10.26.0
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/dist/api/index.d.ts +26 -5
- package/dist/api/index.js +35 -17
- package/dist/api/index.js.map +1 -1
- package/dist/api/schema.d.ts +333 -6
- package/dist/components/OrgTreeSelect/index.vue.js +32 -20
- package/dist/components/OrgTreeSelect/index.vue.js.map +1 -1
- package/dist/components/RoleSelect/index.vue.js +12 -14
- package/dist/components/RoleSelect/index.vue.js.map +1 -1
- package/dist/components/UserPicker/index.vue.js +2 -2
- package/dist/components/UserPicker/index2.vue.js +179 -208
- package/dist/components/UserPicker/index2.vue.js.map +1 -1
- package/dist/components/UserSelect/index.vue.js +10 -10
- package/dist/components/UserSelect/index.vue.js.map +1 -1
- package/dist/layouts/NoticeBell.vue.js +2 -2
- package/dist/layouts/NoticeBell2.vue.js +203 -146
- package/dist/layouts/NoticeBell2.vue.js.map +1 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/locales/en-US.d.ts +6 -2
- package/dist/locales/en-US.js +8 -3
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/zh-CN.d.ts +6 -2
- package/dist/locales/zh-CN.js +8 -3
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api.d.ts +22 -0
- package/dist/types/api.js.map +1 -1
- package/dist/views/system/user/index.vue.js +2 -2
- package/dist/views/system/user/index2.vue.js +266 -257
- package/dist/views/system/user/index2.vue.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,192 +1,180 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useMessage as
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { useWindowSize as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as Pe, ref as v, computed as p, onMounted as Ce, reactive as ze, openBlock as i, createBlock as y, unref as s, withCtx as k, createVNode as c, createTextVNode as z, toDisplayString as r, createCommentVNode as h, createElementVNode as l, normalizeClass as R, createElementBlock as m, withDirectives as Z, Fragment as j, renderList as J, withKeys as Q, withModifiers as X, vShow as Y } from "vue";
|
|
2
|
+
import { useMessage as Ne, NTabs as Ie, NTab as ee, NTree as Ee, NTreeSelect as Ue, NInput as ae, NButton as te, NSpin as Te, NEmpty as se } from "naive-ui";
|
|
3
|
+
import { useI18n as $e } from "vue-i18n";
|
|
4
|
+
import { useWindowSize as Ae, useDebounceFn as De } from "@vueuse/core";
|
|
5
|
+
import N from "../AppIcon.vue.js";
|
|
6
|
+
import Me from "../FormContainer/index.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import le from "./UserAvatar.vue.js";
|
|
9
|
-
import { useShellBreakpoint as
|
|
10
|
-
import { orgApi as
|
|
11
|
-
import { buildTree as
|
|
12
|
-
import { translateError as
|
|
13
|
-
const
|
|
9
|
+
import { useShellBreakpoint as Be } from "../../composables/useShellBreakpoint.js";
|
|
10
|
+
import { orgApi as Ke, userApi as ne } from "../../api/index.js";
|
|
11
|
+
import { buildTree as Le } from "../../utils/tree.js";
|
|
12
|
+
import { translateError as oe } from "../../utils/error.js";
|
|
13
|
+
const Ve = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "picker-org"
|
|
16
|
-
},
|
|
17
|
-
class: "scope-trigger",
|
|
18
|
-
role: "button",
|
|
19
|
-
tabindex: "0"
|
|
20
|
-
}, Je = {
|
|
16
|
+
}, Fe = { class: "side-title" }, Oe = { class: "picker-main" }, qe = { class: "picker-toolbar" }, We = {
|
|
21
17
|
class: "user-list",
|
|
22
18
|
role: "group"
|
|
23
|
-
},
|
|
19
|
+
}, Ge = ["aria-checked", "aria-disabled", "tabindex", "onClick", "onKeydown"], He = { class: "user-main" }, Re = { class: "user-name" }, Ze = {
|
|
24
20
|
key: 0,
|
|
25
21
|
class: "user-sub"
|
|
26
|
-
},
|
|
22
|
+
}, je = {
|
|
27
23
|
key: 0,
|
|
28
24
|
class: "user-tag"
|
|
29
|
-
},
|
|
25
|
+
}, Je = {
|
|
30
26
|
key: 1,
|
|
31
27
|
class: "user-check"
|
|
32
|
-
},
|
|
28
|
+
}, Qe = { class: "picker-foot" }, Xe = { class: "picker-total" }, Ye = {
|
|
33
29
|
key: 0,
|
|
34
30
|
class: "pager"
|
|
35
|
-
},
|
|
31
|
+
}, ea = ["disabled", "aria-label"], aa = { class: "pager-num" }, ta = ["disabled", "aria-label"], sa = { class: "picker-selected" }, la = { class: "side-head" }, na = { class: "side-title" }, oa = { class: "side-count" }, ia = { class: "selected-list" }, ra = { class: "user-main" }, ca = { class: "user-name" }, ua = {
|
|
36
32
|
key: 0,
|
|
37
33
|
class: "user-sub"
|
|
38
|
-
},
|
|
34
|
+
}, da = ["aria-label", "onClick"], ie = 20, va = 8, Pa = /* @__PURE__ */ Pe({
|
|
39
35
|
__name: "index",
|
|
40
36
|
props: {
|
|
41
37
|
excludeIds: {}
|
|
42
38
|
},
|
|
43
39
|
emits: ["confirm"],
|
|
44
|
-
setup(
|
|
45
|
-
const
|
|
46
|
-
() =>
|
|
40
|
+
setup(re, { expose: ce, emit: ue }) {
|
|
41
|
+
const de = re, ve = ue, { t: n } = $e(), V = Ne(), D = v(!1), { bp: F } = Be(), { width: pe } = Ae(), f = p(() => F.value === "narrow" || pe.value < 900), me = p(() => F.value === "narrow" ? "drawer" : "modal"), w = v("users"), O = v([]), q = p(() => [{ id: 0, parentId: -1, name: n("common.all"), children: Le(O.value) }]), g = v(null), he = p(
|
|
42
|
+
() => g.value && g.value !== 0 ? g.value : void 0
|
|
47
43
|
);
|
|
48
|
-
|
|
44
|
+
Ce(async () => {
|
|
49
45
|
try {
|
|
50
|
-
|
|
51
|
-
} catch {
|
|
46
|
+
O.value = await Ke.options();
|
|
47
|
+
} catch (e) {
|
|
48
|
+
V.error(oe(e));
|
|
52
49
|
}
|
|
53
50
|
});
|
|
54
|
-
function
|
|
55
|
-
|
|
51
|
+
function fe(e) {
|
|
52
|
+
g.value = e[0] ?? null, B();
|
|
56
53
|
}
|
|
57
54
|
function ge(e) {
|
|
58
|
-
|
|
55
|
+
g.value = e ?? null, B();
|
|
59
56
|
}
|
|
60
|
-
const
|
|
61
|
-
let
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
{ key: "account", label: l("user.account") }
|
|
67
|
-
]);
|
|
68
|
-
async function K() {
|
|
69
|
-
const e = ++T;
|
|
70
|
-
U.value = !0;
|
|
57
|
+
const I = v(""), u = v(1), S = v(0), b = v([]), E = v(!1);
|
|
58
|
+
let U = 0;
|
|
59
|
+
const T = p(() => Math.max(1, Math.ceil(S.value / ie)));
|
|
60
|
+
async function M() {
|
|
61
|
+
const e = ++U;
|
|
62
|
+
E.value = !0;
|
|
71
63
|
try {
|
|
72
|
-
const t =
|
|
73
|
-
page:
|
|
74
|
-
pageSize:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
orgId: fe.value
|
|
64
|
+
const t = I.value.trim() || void 0, a = await ne.options({
|
|
65
|
+
page: u.value,
|
|
66
|
+
pageSize: ie,
|
|
67
|
+
keyword: t,
|
|
68
|
+
orgId: he.value
|
|
78
69
|
});
|
|
79
|
-
if (e !==
|
|
80
|
-
|
|
70
|
+
if (e !== U) return;
|
|
71
|
+
b.value = a.items, S.value = a.total;
|
|
81
72
|
} catch (t) {
|
|
82
|
-
if (e !==
|
|
83
|
-
|
|
73
|
+
if (e !== U) return;
|
|
74
|
+
b.value = [], S.value = 0, V.error(oe(t));
|
|
84
75
|
} finally {
|
|
85
|
-
e ===
|
|
76
|
+
e === U && (E.value = !1);
|
|
86
77
|
}
|
|
87
78
|
}
|
|
88
|
-
function
|
|
89
|
-
|
|
79
|
+
function B() {
|
|
80
|
+
u.value = 1, M();
|
|
90
81
|
}
|
|
91
|
-
const
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
function we(e) {
|
|
96
|
-
b.value = e, P.value.trim() && A();
|
|
82
|
+
const ke = De(B, 300);
|
|
83
|
+
function _e(e) {
|
|
84
|
+
I.value = e, ke();
|
|
97
85
|
}
|
|
98
86
|
function W(e) {
|
|
99
|
-
e < 1 || e >
|
|
87
|
+
e < 1 || e > T.value || e === u.value || (u.value = e, M());
|
|
100
88
|
}
|
|
101
|
-
const o =
|
|
102
|
-
const e =
|
|
89
|
+
const o = ze([]), x = p(() => new Set(o.map((e) => e.id))), _ = p(() => new Set(de.excludeIds ?? [])), $ = v(""), be = p(() => {
|
|
90
|
+
const e = $.value.trim().toLowerCase();
|
|
103
91
|
return e ? o.filter(
|
|
104
92
|
(t) => t.name.toLowerCase().includes(e) || t.account.toLowerCase().includes(e)
|
|
105
93
|
) : o;
|
|
106
94
|
});
|
|
107
|
-
function
|
|
95
|
+
function G(e) {
|
|
108
96
|
for (const t of e)
|
|
109
|
-
!
|
|
97
|
+
!x.value.has(t.id) && !_.value.has(t.id) && o.push(t);
|
|
110
98
|
}
|
|
111
|
-
function
|
|
99
|
+
function K(e) {
|
|
112
100
|
const t = o.findIndex((a) => a.id === e);
|
|
113
101
|
t >= 0 && o.splice(t, 1);
|
|
114
102
|
}
|
|
115
|
-
function
|
|
116
|
-
_.value.has(e.id) || (
|
|
103
|
+
function L(e) {
|
|
104
|
+
_.value.has(e.id) || (x.value.has(e.id) ? K(e.id) : G([e]));
|
|
117
105
|
}
|
|
118
|
-
function
|
|
106
|
+
function ye() {
|
|
119
107
|
o.splice(0, o.length);
|
|
120
108
|
}
|
|
121
|
-
const
|
|
122
|
-
() =>
|
|
109
|
+
const P = p(() => b.value.filter((e) => !_.value.has(e.id))), H = p(
|
|
110
|
+
() => P.value.length > 0 && P.value.every((e) => x.value.has(e.id))
|
|
123
111
|
);
|
|
124
|
-
function
|
|
125
|
-
if (
|
|
126
|
-
for (const e of
|
|
112
|
+
function we() {
|
|
113
|
+
if (H.value)
|
|
114
|
+
for (const e of P.value) K(e.id);
|
|
127
115
|
else
|
|
128
|
-
|
|
116
|
+
G(P.value);
|
|
129
117
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
118
|
+
function A(e) {
|
|
119
|
+
return e.account !== e.name ? e.account : "";
|
|
132
120
|
}
|
|
133
|
-
async function
|
|
134
|
-
if (o.splice(0, o.length),
|
|
121
|
+
async function Se(e) {
|
|
122
|
+
if (o.splice(0, o.length), $.value = "", g.value = null, I.value = "", u.value = 1, b.value = [], S.value = 0, w.value = "users", D.value = !0, M(), !!(e != null && e.length))
|
|
135
123
|
try {
|
|
136
|
-
const { items: t } = await ne.
|
|
137
|
-
for (const
|
|
138
|
-
for (const
|
|
139
|
-
|
|
124
|
+
const { items: t } = await ne.options({ page: 1, pageSize: 200 }), a = t.filter((d) => e.includes(d.id)), C = new Set(a.map((d) => d.id));
|
|
125
|
+
for (const d of a) o.push(d);
|
|
126
|
+
for (const d of e)
|
|
127
|
+
C.has(d) || o.push({ id: d, account: String(d), name: String(d) });
|
|
140
128
|
} catch {
|
|
141
129
|
for (const t of e) o.push({ id: t, account: String(t), name: String(t) });
|
|
142
130
|
}
|
|
143
131
|
}
|
|
144
|
-
async function
|
|
145
|
-
|
|
132
|
+
async function xe() {
|
|
133
|
+
ve(
|
|
146
134
|
"confirm",
|
|
147
135
|
o.map((e) => e.id)
|
|
148
136
|
);
|
|
149
137
|
}
|
|
150
|
-
return ce({ open:
|
|
151
|
-
show:
|
|
152
|
-
"onUpdate:show": t[4] || (t[4] = (a) =>
|
|
138
|
+
return ce({ open: Se }), (e, t) => (i(), y(Me, {
|
|
139
|
+
show: D.value,
|
|
140
|
+
"onUpdate:show": t[4] || (t[4] = (a) => D.value = a),
|
|
153
141
|
variant: me.value,
|
|
154
|
-
title: s(
|
|
142
|
+
title: s(n)("userPicker.title"),
|
|
155
143
|
width: 920,
|
|
156
|
-
"on-confirm":
|
|
157
|
-
"confirm-text": s(
|
|
144
|
+
"on-confirm": xe,
|
|
145
|
+
"confirm-text": s(n)("common.confirm")
|
|
158
146
|
}, {
|
|
159
|
-
default:
|
|
160
|
-
|
|
147
|
+
default: k(() => [
|
|
148
|
+
f.value ? (i(), y(s(Ie), {
|
|
161
149
|
key: 0,
|
|
162
|
-
value:
|
|
163
|
-
"onUpdate:value": t[0] || (t[0] = (a) =>
|
|
150
|
+
value: w.value,
|
|
151
|
+
"onUpdate:value": t[0] || (t[0] = (a) => w.value = a),
|
|
164
152
|
type: "segment",
|
|
165
153
|
animated: "",
|
|
166
154
|
class: "picker-tabs"
|
|
167
155
|
}, {
|
|
168
|
-
default:
|
|
156
|
+
default: k(() => [
|
|
169
157
|
c(s(ee), { name: "users" }, {
|
|
170
|
-
default:
|
|
171
|
-
|
|
158
|
+
default: k(() => [
|
|
159
|
+
z(r(s(n)("userPicker.available")), 1)
|
|
172
160
|
]),
|
|
173
161
|
_: 1
|
|
174
162
|
}),
|
|
175
163
|
c(s(ee), { name: "selected" }, {
|
|
176
|
-
default:
|
|
177
|
-
|
|
164
|
+
default: k(() => [
|
|
165
|
+
z(r(s(n)("userPicker.selected")) + " " + r(o.length), 1)
|
|
178
166
|
]),
|
|
179
167
|
_: 1
|
|
180
168
|
})
|
|
181
169
|
]),
|
|
182
170
|
_: 1
|
|
183
171
|
}, 8, ["value"])) : h("", !0),
|
|
184
|
-
|
|
185
|
-
class:
|
|
172
|
+
l("div", {
|
|
173
|
+
class: R(["user-picker", { "is-compact": f.value }])
|
|
186
174
|
}, [
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
c(s(
|
|
175
|
+
f.value ? h("", !0) : (i(), m("div", Ve, [
|
|
176
|
+
l("div", Fe, r(s(n)("userPicker.org")), 1),
|
|
177
|
+
c(s(Ee), {
|
|
190
178
|
data: q.value,
|
|
191
179
|
"key-field": "id",
|
|
192
180
|
"label-field": "name",
|
|
@@ -194,14 +182,14 @@ const je = {
|
|
|
194
182
|
selectable: "",
|
|
195
183
|
"block-line": "",
|
|
196
184
|
"default-expand-all": "",
|
|
197
|
-
"selected-keys": [
|
|
198
|
-
"onUpdate:selectedKeys":
|
|
185
|
+
"selected-keys": [g.value ?? 0],
|
|
186
|
+
"onUpdate:selectedKeys": fe
|
|
199
187
|
}, null, 8, ["data", "selected-keys"])
|
|
200
188
|
])),
|
|
201
|
-
|
|
202
|
-
|
|
189
|
+
Z(l("div", Oe, [
|
|
190
|
+
f.value ? (i(), y(s(Ue), {
|
|
203
191
|
key: 0,
|
|
204
|
-
value:
|
|
192
|
+
value: g.value ?? 0,
|
|
205
193
|
options: q.value,
|
|
206
194
|
"key-field": "id",
|
|
207
195
|
"label-field": "name",
|
|
@@ -211,37 +199,22 @@ const je = {
|
|
|
211
199
|
class: "picker-org-select",
|
|
212
200
|
"onUpdate:value": ge
|
|
213
201
|
}, null, 8, ["value", "options"])) : h("", !0),
|
|
214
|
-
|
|
202
|
+
l("div", qe, [
|
|
215
203
|
c(s(ae), {
|
|
216
|
-
value:
|
|
204
|
+
value: I.value,
|
|
217
205
|
round: "",
|
|
218
206
|
clearable: "",
|
|
219
|
-
size:
|
|
220
|
-
placeholder:
|
|
207
|
+
size: f.value ? "large" : "medium",
|
|
208
|
+
placeholder: s(n)("userPicker.search"),
|
|
221
209
|
class: "picker-search",
|
|
222
|
-
"onUpdate:value":
|
|
210
|
+
"onUpdate:value": _e
|
|
223
211
|
}, {
|
|
224
|
-
prefix:
|
|
225
|
-
c(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}, {
|
|
231
|
-
default: f(() => [
|
|
232
|
-
n("span", Ze, [
|
|
233
|
-
c(S, {
|
|
234
|
-
icon: "ph:magnifying-glass",
|
|
235
|
-
size: 15
|
|
236
|
-
}),
|
|
237
|
-
c(S, {
|
|
238
|
-
icon: "ph:caret-down",
|
|
239
|
-
size: 10
|
|
240
|
-
})
|
|
241
|
-
])
|
|
242
|
-
]),
|
|
243
|
-
_: 1
|
|
244
|
-
}, 8, ["options", "value"])
|
|
212
|
+
prefix: k(() => [
|
|
213
|
+
c(N, {
|
|
214
|
+
class: "search-icon",
|
|
215
|
+
icon: "ph:magnifying-glass",
|
|
216
|
+
size: 15
|
|
217
|
+
})
|
|
245
218
|
]),
|
|
246
219
|
_: 1
|
|
247
220
|
}, 8, ["value", "size", "placeholder"]),
|
|
@@ -249,159 +222,157 @@ const je = {
|
|
|
249
222
|
text: "",
|
|
250
223
|
type: "primary",
|
|
251
224
|
class: "page-toggle",
|
|
252
|
-
disabled:
|
|
253
|
-
onClick:
|
|
225
|
+
disabled: P.value.length === 0,
|
|
226
|
+
onClick: we
|
|
254
227
|
}, {
|
|
255
|
-
default:
|
|
256
|
-
|
|
228
|
+
default: k(() => [
|
|
229
|
+
z(r(H.value ? s(n)("userPicker.unselectPage") : s(n)("userPicker.selectPage")), 1)
|
|
257
230
|
]),
|
|
258
231
|
_: 1
|
|
259
232
|
}, 8, ["disabled"])
|
|
260
233
|
]),
|
|
261
|
-
c(s(
|
|
262
|
-
show:
|
|
234
|
+
c(s(Te), {
|
|
235
|
+
show: E.value,
|
|
263
236
|
size: "small",
|
|
264
237
|
class: "picker-spin"
|
|
265
238
|
}, {
|
|
266
|
-
default:
|
|
267
|
-
|
|
268
|
-
(i(!0), m(
|
|
239
|
+
default: k(() => [
|
|
240
|
+
l("div", We, [
|
|
241
|
+
(i(!0), m(j, null, J(b.value, (a) => (i(), m("div", {
|
|
269
242
|
key: a.id,
|
|
270
|
-
class:
|
|
271
|
-
"is-selected":
|
|
243
|
+
class: R(["user-row", {
|
|
244
|
+
"is-selected": x.value.has(a.id),
|
|
272
245
|
"is-disabled": _.value.has(a.id)
|
|
273
246
|
}]),
|
|
274
247
|
role: "checkbox",
|
|
275
|
-
"aria-checked":
|
|
248
|
+
"aria-checked": x.value.has(a.id) ? "true" : "false",
|
|
276
249
|
"aria-disabled": _.value.has(a.id) ? "true" : void 0,
|
|
277
250
|
tabindex: _.value.has(a.id) ? -1 : 0,
|
|
278
|
-
onClick: (
|
|
251
|
+
onClick: (C) => L(a),
|
|
279
252
|
onKeydown: [
|
|
280
|
-
Q(X((
|
|
281
|
-
Q(X((
|
|
253
|
+
Q(X((C) => L(a), ["prevent"]), ["enter"]),
|
|
254
|
+
Q(X((C) => L(a), ["prevent"]), ["space"])
|
|
282
255
|
]
|
|
283
256
|
}, [
|
|
284
257
|
c(le, {
|
|
285
258
|
name: a.name,
|
|
286
|
-
src: a.avatar,
|
|
287
259
|
size: 32
|
|
288
|
-
}, null, 8, ["name"
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
260
|
+
}, null, 8, ["name"]),
|
|
261
|
+
l("span", He, [
|
|
262
|
+
l("span", Re, r(a.name), 1),
|
|
263
|
+
A(a) ? (i(), m("span", Ze, r(A(a)), 1)) : h("", !0)
|
|
292
264
|
]),
|
|
293
|
-
_.value.has(a.id) ? (i(), m("span",
|
|
294
|
-
c(
|
|
265
|
+
_.value.has(a.id) ? (i(), m("span", je, r(s(n)("userPicker.existing")), 1)) : (i(), m("span", Je, [
|
|
266
|
+
c(N, {
|
|
295
267
|
icon: "ph:check-bold",
|
|
296
268
|
size: 12
|
|
297
269
|
})
|
|
298
270
|
]))
|
|
299
|
-
], 42,
|
|
300
|
-
!
|
|
271
|
+
], 42, Ge))), 128)),
|
|
272
|
+
!E.value && b.value.length === 0 ? (i(), y(s(se), {
|
|
301
273
|
key: 0,
|
|
302
|
-
description: s(
|
|
274
|
+
description: s(n)("common.noData"),
|
|
303
275
|
class: "user-empty"
|
|
304
276
|
}, null, 8, ["description"])) : h("", !0)
|
|
305
277
|
])
|
|
306
278
|
]),
|
|
307
279
|
_: 1
|
|
308
280
|
}, 8, ["show"]),
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
281
|
+
l("div", Qe, [
|
|
282
|
+
l("span", Xe, r(s(n)("userPicker.total", { n: S.value })), 1),
|
|
283
|
+
T.value > 1 ? (i(), m("div", Ye, [
|
|
284
|
+
l("button", {
|
|
313
285
|
type: "button",
|
|
314
286
|
class: "pager-btn pager-prev",
|
|
315
|
-
disabled:
|
|
316
|
-
"aria-label": s(
|
|
317
|
-
onClick: t[1] || (t[1] = (a) => W(
|
|
287
|
+
disabled: u.value <= 1,
|
|
288
|
+
"aria-label": s(n)("userPicker.prevPage"),
|
|
289
|
+
onClick: t[1] || (t[1] = (a) => W(u.value - 1))
|
|
318
290
|
}, [
|
|
319
|
-
c(
|
|
291
|
+
c(N, {
|
|
320
292
|
icon: "ph:caret-left",
|
|
321
293
|
size: 14
|
|
322
294
|
})
|
|
323
|
-
], 8,
|
|
324
|
-
|
|
325
|
-
|
|
295
|
+
], 8, ea),
|
|
296
|
+
l("span", aa, r(u.value) + " / " + r(T.value), 1),
|
|
297
|
+
l("button", {
|
|
326
298
|
type: "button",
|
|
327
299
|
class: "pager-btn pager-next",
|
|
328
|
-
disabled:
|
|
329
|
-
"aria-label": s(
|
|
330
|
-
onClick: t[2] || (t[2] = (a) => W(
|
|
300
|
+
disabled: u.value >= T.value,
|
|
301
|
+
"aria-label": s(n)("userPicker.nextPage"),
|
|
302
|
+
onClick: t[2] || (t[2] = (a) => W(u.value + 1))
|
|
331
303
|
}, [
|
|
332
|
-
c(
|
|
304
|
+
c(N, {
|
|
333
305
|
icon: "ph:caret-right",
|
|
334
306
|
size: 14
|
|
335
307
|
})
|
|
336
|
-
], 8,
|
|
308
|
+
], 8, ta)
|
|
337
309
|
])) : h("", !0)
|
|
338
310
|
])
|
|
339
311
|
], 512), [
|
|
340
|
-
[Y, !
|
|
312
|
+
[Y, !f.value || w.value === "users"]
|
|
341
313
|
]),
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
314
|
+
Z(l("div", sa, [
|
|
315
|
+
l("div", la, [
|
|
316
|
+
l("span", na, [
|
|
317
|
+
z(r(s(n)("userPicker.selected")) + " ", 1),
|
|
318
|
+
l("span", oa, r(o.length), 1)
|
|
347
319
|
]),
|
|
348
320
|
c(s(te), {
|
|
349
321
|
text: "",
|
|
350
322
|
type: "error",
|
|
351
323
|
class: "selected-clear",
|
|
352
324
|
disabled: o.length === 0,
|
|
353
|
-
onClick:
|
|
325
|
+
onClick: ye
|
|
354
326
|
}, {
|
|
355
|
-
default:
|
|
356
|
-
|
|
327
|
+
default: k(() => [
|
|
328
|
+
z(r(s(n)("userPicker.clear")), 1)
|
|
357
329
|
]),
|
|
358
330
|
_: 1
|
|
359
331
|
}, 8, ["disabled"])
|
|
360
332
|
]),
|
|
361
|
-
o.length >
|
|
333
|
+
o.length > va ? (i(), y(s(ae), {
|
|
362
334
|
key: 0,
|
|
363
|
-
value:
|
|
364
|
-
"onUpdate:value": t[3] || (t[3] = (a) =>
|
|
335
|
+
value: $.value,
|
|
336
|
+
"onUpdate:value": t[3] || (t[3] = (a) => $.value = a),
|
|
365
337
|
round: "",
|
|
366
338
|
clearable: "",
|
|
367
|
-
size:
|
|
368
|
-
placeholder: s(
|
|
339
|
+
size: f.value ? "large" : "small",
|
|
340
|
+
placeholder: s(n)("common.search"),
|
|
369
341
|
class: "selected-search"
|
|
370
342
|
}, null, 8, ["value", "size", "placeholder"])) : h("", !0),
|
|
371
|
-
|
|
372
|
-
(i(!0), m(
|
|
343
|
+
l("div", ia, [
|
|
344
|
+
(i(!0), m(j, null, J(be.value, (a) => (i(), m("div", {
|
|
373
345
|
key: a.id,
|
|
374
346
|
class: "selected-item"
|
|
375
347
|
}, [
|
|
376
348
|
c(le, {
|
|
377
349
|
name: a.name,
|
|
378
|
-
src: a.avatar,
|
|
379
350
|
size: 28
|
|
380
|
-
}, null, 8, ["name"
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
351
|
+
}, null, 8, ["name"]),
|
|
352
|
+
l("span", ra, [
|
|
353
|
+
l("span", ca, r(a.name), 1),
|
|
354
|
+
A(a) ? (i(), m("span", ua, r(A(a)), 1)) : h("", !0)
|
|
384
355
|
]),
|
|
385
|
-
|
|
356
|
+
l("button", {
|
|
386
357
|
type: "button",
|
|
387
358
|
class: "item-remove",
|
|
388
|
-
"aria-label": s(
|
|
389
|
-
onClick: (
|
|
359
|
+
"aria-label": s(n)("userPicker.remove"),
|
|
360
|
+
onClick: (C) => K(a.id)
|
|
390
361
|
}, [
|
|
391
|
-
c(
|
|
362
|
+
c(N, {
|
|
392
363
|
icon: "ph:x",
|
|
393
364
|
size: 12
|
|
394
365
|
})
|
|
395
|
-
], 8,
|
|
366
|
+
], 8, da)
|
|
396
367
|
]))), 128)),
|
|
397
|
-
o.length === 0 ? (i(),
|
|
368
|
+
o.length === 0 ? (i(), y(s(se), {
|
|
398
369
|
key: 0,
|
|
399
|
-
description: s(
|
|
370
|
+
description: s(n)("userPicker.emptySelected"),
|
|
400
371
|
class: "user-empty"
|
|
401
372
|
}, null, 8, ["description"])) : h("", !0)
|
|
402
373
|
])
|
|
403
374
|
], 512), [
|
|
404
|
-
[Y, !
|
|
375
|
+
[Y, !f.value || w.value === "selected"]
|
|
405
376
|
])
|
|
406
377
|
], 2)
|
|
407
378
|
]),
|
|
@@ -410,6 +381,6 @@ const je = {
|
|
|
410
381
|
}
|
|
411
382
|
});
|
|
412
383
|
export {
|
|
413
|
-
|
|
384
|
+
Pa as default
|
|
414
385
|
};
|
|
415
386
|
//# sourceMappingURL=index2.vue.js.map
|