@pangu-backend-ui/user-core 0.0.10 → 0.0.12

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent as U, ref as h, inject as C, resolveComponent as c, openBlock as _, createElementBlock as T, Fragment as I, createTextVNode as m, toDisplayString as g, createBlock as w, withCtx as t, createVNode as e, createCommentVNode as k, watch as E, computed as $, resolveDirective as z, withDirectives as O, renderList as B, resolveDynamicComponent as F, createElementVNode as x, unref as H, pushScopeId as A, popScopeId as Y } from "vue";
2
- import { defineStore as j } from "pinia";
3
- import { PgTable as G } from "@pangu-backend-ui/common";
1
+ import { defineComponent as U, ref as w, inject as S, resolveComponent as p, openBlock as m, createElementBlock as T, Fragment as I, createTextVNode as _, toDisplayString as h, createBlock as f, withCtx as t, createVNode as e, createCommentVNode as k, watch as $, computed as E, resolveDirective as z, withDirectives as O, renderList as A, KeepAlive as B, resolveDynamicComponent as F, createElementVNode as x, unref as H, pushScopeId as Y, popScopeId as j } from "vue";
2
+ import { defineStore as G } from "pinia";
3
+ import { PgTable as K } from "@pangu-backend-ui/common";
4
4
  const W = {
5
5
  key: 0,
6
6
  class: "container"
@@ -17,10 +17,10 @@ const W = {
17
17
  }
18
18
  },
19
19
  setup(a) {
20
- const o = a, l = h({
20
+ const o = a, l = w({
21
21
  plainMobile: null,
22
22
  loading: !1
23
- }), r = C("http");
23
+ }), r = S("http");
24
24
  function v() {
25
25
  l.value.plainMobile == null && (l.value.loading = !0, r == null || r.get(`/api/user/${o.userId}/plainmobile`).then((s) => {
26
26
  l.value.plainMobile = s.data, l.value.loading = !1;
@@ -28,15 +28,15 @@ const W = {
28
28
  l.value.loading = !1;
29
29
  }));
30
30
  }
31
- return (s, p) => {
32
- const u = c("View"), b = c("el-icon"), y = c("Loading");
33
- return o.maskMobile != null ? (_(), T("div", W, [
34
- l.value.plainMobile == null ? (_(), T(I, { key: 0 }, [
35
- m(g(o.maskMobile), 1)
36
- ], 64)) : (_(), T(I, { key: 1 }, [
37
- m(g(l.value.plainMobile), 1)
31
+ return (s, c) => {
32
+ const u = p("View"), b = p("el-icon"), D = p("Loading");
33
+ return o.maskMobile != null ? (m(), T("div", W, [
34
+ l.value.plainMobile == null ? (m(), T(I, { key: 0 }, [
35
+ _(h(o.maskMobile), 1)
36
+ ], 64)) : (m(), T(I, { key: 1 }, [
37
+ _(h(l.value.plainMobile), 1)
38
38
  ], 64)),
39
- l.value.plainMobile == null && !l.value.loading && o.userId != null ? (_(), w(b, {
39
+ l.value.plainMobile == null && !l.value.loading && o.userId != null ? (m(), f(b, {
40
40
  key: 2,
41
41
  class: "view-icon",
42
42
  onClick: v
@@ -46,12 +46,12 @@ const W = {
46
46
  ]),
47
47
  _: 1
48
48
  })) : k("", !0),
49
- l.value.loading ? (_(), w(b, {
49
+ l.value.loading ? (m(), f(b, {
50
50
  key: 3,
51
51
  class: "is-loading view-icon"
52
52
  }, {
53
53
  default: t(() => [
54
- e(y)
54
+ e(D)
55
55
  ]),
56
56
  _: 1
57
57
  })) : k("", !0)
@@ -64,13 +64,13 @@ const M = (a, o) => {
64
64
  for (const [r, v] of o)
65
65
  l[r] = v;
66
66
  return l;
67
- }, S = /* @__PURE__ */ M(q, [["__scopeId", "data-v-76c9c9ae"]]), J = {
67
+ }, C = /* @__PURE__ */ M(q, [["__scopeId", "data-v-76c9c9ae"]]), J = {
68
68
  install: (a) => {
69
- a.component("PgUserMobile", S);
69
+ a.component("PgUserMobile", C);
70
70
  }
71
71
  };
72
- function K() {
73
- const a = C("http");
72
+ function Q() {
73
+ const a = S("http");
74
74
  function o(l) {
75
75
  return a == null ? void 0 : a.get(`/api/user/${l}`);
76
76
  }
@@ -78,26 +78,26 @@ function K() {
78
78
  getUserDetail: o
79
79
  };
80
80
  }
81
- const Q = /* @__PURE__ */ U({
81
+ const X = /* @__PURE__ */ U({
82
82
  __name: "LoginHistory",
83
83
  props: ["userId"],
84
84
  setup(a) {
85
- const l = h({
85
+ const l = w({
86
86
  userId: a.userId,
87
87
  loginTimeStart: null,
88
88
  loginTimeEnd: null
89
- }), r = h([]);
90
- E(r, (p) => {
91
- p ? (l.value.loginTimeStart = p[0], l.value.loginTimeEnd = p[1]) : (l.value.loginTimeStart = null, l.value.loginTimeEnd = null), console.log(l.value.loginTimeStart, l.value.loginTimeEnd);
89
+ }), r = w([]);
90
+ $(r, (c) => {
91
+ c ? (l.value.loginTimeStart = c[0], l.value.loginTimeEnd = c[1]) : (l.value.loginTimeStart = null, l.value.loginTimeEnd = null);
92
92
  });
93
- const v = h();
93
+ const v = w();
94
94
  function s() {
95
95
  v.value.search();
96
96
  }
97
- return (p, u) => {
98
- const b = c("el-date-picker"), y = c("el-button"), f = c("el-space"), i = c("el-table-column"), d = c("el-tag"), V = c("pg-table");
99
- return _(), T(I, null, [
100
- e(f, null, {
97
+ return (c, u) => {
98
+ const b = p("el-date-picker"), D = p("el-button"), g = p("el-space"), i = p("el-table-column"), d = p("el-tag"), V = p("pg-table");
99
+ return m(), T(I, null, [
100
+ e(g, null, {
101
101
  default: t(() => [
102
102
  e(b, {
103
103
  modelValue: r.value,
@@ -108,13 +108,13 @@ const Q = /* @__PURE__ */ U({
108
108
  "end-placeholder": "登录结束时间",
109
109
  clearable: ""
110
110
  }, null, 8, ["modelValue"]),
111
- e(y, {
111
+ e(D, {
112
112
  type: "primary",
113
113
  icon: "search",
114
114
  onClick: s
115
115
  }, {
116
116
  default: t(() => [
117
- m("搜索")
117
+ _("搜索")
118
118
  ]),
119
119
  _: 1
120
120
  })
@@ -153,43 +153,43 @@ const Q = /* @__PURE__ */ U({
153
153
  "show-overflow-tooltip": ""
154
154
  }, {
155
155
  default: t(({ row: n }) => [
156
- n.method === "SMS" ? (_(), w(d, {
156
+ n.method === "SMS" ? (m(), f(d, {
157
157
  key: 0,
158
158
  type: "primary",
159
159
  size: "small"
160
160
  }, {
161
161
  default: t(() => [
162
- m("短信登录")
162
+ _("短信登录")
163
163
  ]),
164
164
  _: 1
165
165
  })) : k("", !0),
166
- n.method === "THIRD_PLATFORM" ? (_(), w(d, {
166
+ n.method === "THIRD_PLATFORM" ? (m(), f(d, {
167
167
  key: 1,
168
168
  type: "primary",
169
169
  size: "small"
170
170
  }, {
171
171
  default: t(() => [
172
- m("第三方平台")
172
+ _("第三方平台")
173
173
  ]),
174
174
  _: 1
175
175
  })) : k("", !0),
176
- n.method === "UNIVERIFY" ? (_(), w(d, {
176
+ n.method === "UNIVERIFY" ? (m(), f(d, {
177
177
  key: 2,
178
178
  type: "primary",
179
179
  size: "small"
180
180
  }, {
181
181
  default: t(() => [
182
- m("一键登录")
182
+ _("一键登录")
183
183
  ]),
184
184
  _: 1
185
185
  })) : k("", !0),
186
- n.method === "PASSWORD" ? (_(), w(d, {
186
+ n.method === "PASSWORD" ? (m(), f(d, {
187
187
  key: 3,
188
188
  type: "primary",
189
189
  size: "small"
190
190
  }, {
191
191
  default: t(() => [
192
- m("帐号密码")
192
+ _("帐号密码")
193
193
  ]),
194
194
  _: 1
195
195
  })) : k("", !0)
@@ -220,35 +220,35 @@ const Q = /* @__PURE__ */ U({
220
220
  ], 64);
221
221
  };
222
222
  }
223
- }), N = j("pg-user-core-config-store", () => {
223
+ }), N = G("pg-user-core-config-store", () => {
224
224
  const a = [];
225
225
  return a.push({
226
226
  name: "登录历史",
227
227
  code: "LOGIN_HISTORY",
228
- component: Q
228
+ component: X
229
229
  }), {
230
- userDetailDialogTabs: $(() => a)
230
+ userDetailDialogTabs: E(() => a)
231
231
  };
232
232
  }), L = /* @__PURE__ */ U({
233
233
  __name: "UserDetailDialog",
234
234
  setup(a, { expose: o }) {
235
- const { getUserDetail: l } = K(), r = N(), v = h(!1), s = h(), p = h({
235
+ const { getUserDetail: l } = Q(), r = N(), v = w(!1), s = w(), c = w({
236
236
  activeName: r.userDetailDialogTabs[0].code,
237
237
  tabs: []
238
- }), u = h(!1);
239
- function b(y, f) {
238
+ }), u = w(!1);
239
+ function b(D, g) {
240
240
  var i;
241
- u.value = !0, (i = l(y)) == null || i.then((d) => {
242
- s.value = d.data, u.value = !1, v.value = !0, p.value.tabs.length = 0, p.value.tabs = p.value.tabs.concat(r.userDetailDialogTabs), f && (p.value.tabs = p.value.tabs.concat(f));
241
+ u.value = !0, (i = l(D)) == null || i.then((d) => {
242
+ s.value = d.data, u.value = !1, v.value = !0, c.value.tabs.length = 0, c.value.tabs = c.value.tabs.concat(r.userDetailDialogTabs), g && (c.value.tabs = c.value.tabs.concat(g));
243
243
  });
244
244
  }
245
245
  return o({
246
246
  show: b
247
- }), (y, f) => {
248
- const i = c("el-descriptions-item"), d = c("el-descriptions"), V = c("el-tab-pane"), n = c("el-tabs"), P = c("el-dialog"), R = z("loading");
249
- return O((_(), w(P, {
247
+ }), (D, g) => {
248
+ const i = p("el-descriptions-item"), d = p("el-descriptions"), V = p("el-tab-pane"), n = p("el-tabs"), P = p("el-dialog"), R = z("loading");
249
+ return O((m(), f(P, {
250
250
  modelValue: v.value,
251
- "onUpdate:modelValue": f[1] || (f[1] = (D) => v.value = D),
251
+ "onUpdate:modelValue": g[1] || (g[1] = (y) => v.value = y),
252
252
  title: "用户详情",
253
253
  width: "1300"
254
254
  }, {
@@ -257,19 +257,19 @@ const Q = /* @__PURE__ */ U({
257
257
  default: t(() => [
258
258
  e(i, { label: "用户编号" }, {
259
259
  default: t(() => [
260
- m(g(s.value.id), 1)
260
+ _(h(s.value.id), 1)
261
261
  ]),
262
262
  _: 1
263
263
  }),
264
264
  e(i, { label: "用户昵称" }, {
265
265
  default: t(() => [
266
- m(g(s.value.nickname), 1)
266
+ _(h(s.value.nickname), 1)
267
267
  ]),
268
268
  _: 1
269
269
  }),
270
270
  e(i, { label: "手机号码" }, {
271
271
  default: t(() => [
272
- (_(), w(S, {
272
+ (m(), f(C, {
273
273
  "mask-mobile": s.value.mobile,
274
274
  "user-id": s.value.id,
275
275
  key: s.value.id
@@ -279,43 +279,43 @@ const Q = /* @__PURE__ */ U({
279
279
  }),
280
280
  e(i, { label: "邀请编码" }, {
281
281
  default: t(() => [
282
- m(g(s.value.inviteCode), 1)
282
+ _(h(s.value.inviteCode), 1)
283
283
  ]),
284
284
  _: 1
285
285
  }),
286
286
  e(i, { label: "活动时间" }, {
287
287
  default: t(() => [
288
- m(g(s.value.touchTime), 1)
288
+ _(h(s.value.touchTime), 1)
289
289
  ]),
290
290
  _: 1
291
291
  }),
292
292
  e(i, { label: "注册时间" }, {
293
293
  default: t(() => [
294
- m(g(s.value.createdTime), 1)
294
+ _(h(s.value.createdTime), 1)
295
295
  ]),
296
296
  _: 1
297
297
  }),
298
298
  e(i, { label: "最后登陆" }, {
299
299
  default: t(() => [
300
- m(g(s.value.lastLoginTime), 1)
300
+ _(h(s.value.lastLoginTime), 1)
301
301
  ]),
302
302
  _: 1
303
303
  }),
304
304
  e(i, { label: "最后更新" }, {
305
305
  default: t(() => [
306
- m(g(s.value.updatedTime), 1)
306
+ _(h(s.value.updatedTime), 1)
307
307
  ]),
308
308
  _: 1
309
309
  }),
310
310
  e(i, { label: "上级用户" }, {
311
311
  default: t(() => [
312
- m(g(s.value.parentId), 1)
312
+ _(h(s.value.parentId), 1)
313
313
  ]),
314
314
  _: 1
315
315
  }),
316
316
  e(i, { label: "邀请关系" }, {
317
317
  default: t(() => [
318
- m(g(s.value.relationPath), 1)
318
+ _(h(s.value.relationPath), 1)
319
319
  ]),
320
320
  _: 1
321
321
  })
@@ -323,21 +323,24 @@ const Q = /* @__PURE__ */ U({
323
323
  _: 1
324
324
  }),
325
325
  e(n, {
326
- modelValue: p.value.activeName,
327
- "onUpdate:modelValue": f[0] || (f[0] = (D) => p.value.activeName = D),
326
+ modelValue: c.value.activeName,
327
+ "onUpdate:modelValue": g[0] || (g[0] = (y) => c.value.activeName = y),
328
328
  style: { "margin-top": "10px" },
329
329
  type: "border-card"
330
330
  }, {
331
331
  default: t(() => [
332
- (_(!0), T(I, null, B(p.value.tabs, (D, se) => (_(), w(V, {
333
- label: D.name,
334
- name: D.code,
335
- key: `user_detail_dialog_${D.code}`
332
+ (m(!0), T(I, null, A(c.value.tabs, (y, ue) => (m(), f(V, {
333
+ label: y.name,
334
+ name: y.code,
335
+ key: `user_detail_dialog_${y.code}`
336
336
  }, {
337
337
  default: t(() => [
338
- (_(), w(F(D.component), {
339
- userId: s.value.id
340
- }, null, 8, ["userId"]))
338
+ (m(), f(B, null, [
339
+ c.value.activeName == y.code ? (m(), f(F(y.component), {
340
+ key: `ud_tab_${y.code}`,
341
+ userId: s.value.id
342
+ }, null, 8, ["userId"])) : k("", !0)
343
+ ], 1024))
341
344
  ]),
342
345
  _: 2
343
346
  }, 1032, ["label", "name"]))), 128))
@@ -351,37 +354,37 @@ const Q = /* @__PURE__ */ U({
351
354
  ]);
352
355
  };
353
356
  }
354
- }), X = {
357
+ }), Z = {
355
358
  install: (a) => {
356
359
  a.component("PgUserDetailDialog", L);
357
360
  }
358
- }, Z = [
361
+ }, ee = [
359
362
  J,
360
- X
361
- ], ee = (a) => (A("data-v-391c43be"), a = a(), Y(), a), le = { class: "page-layout" }, te = { style: { "margin-top": "10px" } }, oe = /* @__PURE__ */ ee(() => /* @__PURE__ */ x("template", { "slot-scope": "{row}" }, null, -1)), ae = /* @__PURE__ */ U({
363
+ Z
364
+ ], le = (a) => (Y("data-v-391c43be"), a = a(), j(), a), te = { class: "page-layout" }, oe = { style: { "margin-top": "10px" } }, ae = /* @__PURE__ */ le(() => /* @__PURE__ */ x("template", { "slot-scope": "{row}" }, null, -1)), ne = /* @__PURE__ */ U({
362
365
  __name: "list",
363
366
  setup(a) {
364
- const o = h({
367
+ const o = w({
365
368
  id: null,
366
369
  parentId: null,
367
370
  phone: null,
368
371
  nicekname: null,
369
372
  inviteCode: null
370
- }), l = h(null);
373
+ }), l = w(null);
371
374
  function r() {
372
375
  l.value.search();
373
376
  }
374
- const v = h();
375
- function s(p) {
376
- v.value.show(p.id);
377
+ const v = w();
378
+ function s(c) {
379
+ v.value.show(c.id);
377
380
  }
378
- return (p, u) => {
379
- const b = c("el-input"), y = c("el-button"), f = c("el-space"), i = c("el-card"), d = c("el-table-column"), V = c("el-image");
380
- return _(), T(I, null, [
381
- x("div", le, [
381
+ return (c, u) => {
382
+ const b = p("el-input"), D = p("el-button"), g = p("el-space"), i = p("el-card"), d = p("el-table-column"), V = p("el-image");
383
+ return m(), T(I, null, [
384
+ x("div", te, [
382
385
  e(i, null, {
383
386
  default: t(() => [
384
- e(f, null, {
387
+ e(g, null, {
385
388
  default: t(() => [
386
389
  e(b, {
387
390
  modelValue: o.value.id,
@@ -418,13 +421,13 @@ const Q = /* @__PURE__ */ U({
418
421
  style: { width: "100px" },
419
422
  clearable: ""
420
423
  }, null, 8, ["modelValue"]),
421
- e(y, {
424
+ e(D, {
422
425
  type: "primary",
423
426
  icon: "search",
424
427
  onClick: r
425
428
  }, {
426
429
  default: t(() => [
427
- m("搜索")
430
+ _("搜索")
428
431
  ]),
429
432
  _: 1
430
433
  })
@@ -434,8 +437,8 @@ const Q = /* @__PURE__ */ U({
434
437
  ]),
435
438
  _: 1
436
439
  }),
437
- x("div", te, [
438
- e(H(G), {
440
+ x("div", oe, [
441
+ e(H(K), {
439
442
  ref_key: "userTable",
440
443
  ref: l,
441
444
  "data-url": "/api/user/page",
@@ -457,7 +460,7 @@ const Q = /* @__PURE__ */ U({
457
460
  "show-overflow-tooltip": ""
458
461
  }, {
459
462
  default: t((n) => [
460
- (_(), w(S, {
463
+ (m(), f(C, {
461
464
  "mask-mobile": n.row.mobile,
462
465
  "user-id": n.row.id,
463
466
  key: n.row.id
@@ -545,7 +548,7 @@ const Q = /* @__PURE__ */ U({
545
548
  fixed: "right"
546
549
  }, {
547
550
  default: t(() => [
548
- oe
551
+ ae
549
552
  ]),
550
553
  _: 1
551
554
  })
@@ -562,7 +565,7 @@ const Q = /* @__PURE__ */ U({
562
565
  };
563
566
  }
564
567
  });
565
- const ne = /* @__PURE__ */ M(ae, [["__scopeId", "data-v-391c43be"]]), ie = {
568
+ const ie = /* @__PURE__ */ M(ne, [["__scopeId", "data-v-391c43be"]]), re = {
566
569
  install: (a, o) => {
567
570
  let l = o.router, r = l.getRoutes().find((v) => v.path == "/");
568
571
  r && r.meta && l.addRoute({
@@ -573,22 +576,23 @@ const ne = /* @__PURE__ */ M(ae, [["__scopeId", "data-v-391c43be"]]), ie = {
573
576
  children: [{
574
577
  path: "list",
575
578
  name: "UserList",
576
- component: ne
579
+ component: ie
577
580
  }]
578
581
  });
579
582
  }
580
- }, re = (a, o) => {
583
+ }, se = (a, o) => {
581
584
  const l = N();
582
585
  if (o.userDetailDialogTabs && o.userDetailDialogTabs.length)
583
586
  for (let r of o.userDetailDialogTabs)
584
587
  l.userDetailDialogTabs.push(r);
585
- Z.forEach((r) => a.use(r)), a.use(ie, o);
586
- }, pe = {
587
- install: re
588
+ ee.forEach((r) => a.use(r)), a.use(re, o);
589
+ }, me = {
590
+ install: se
588
591
  };
589
592
  export {
590
- X as UserDetailDialog,
593
+ Z as UserDetailDialog,
591
594
  J as UserMobileComp,
592
- pe as default,
593
- re as install
595
+ me as default,
596
+ se as install,
597
+ N as useUserCoreConfigStore
594
598
  };
package/index.umd.cjs CHANGED
@@ -1 +1 @@
1
- (function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("pinia"),require("@pangu-backend-ui/common")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","@pangu-backend-ui/common"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m["pg-user-core"]={},m.Vue,m.pinia,m.common))})(this,function(m,e,y,D){"use strict";const T={key:0,class:"container"},B=e.defineComponent({__name:"UserMobileComponent",props:{userId:{type:Number,default:null},maskMobile:{type:String,default:null}},setup(l){const o=l,t=e.ref({plainMobile:null,loading:!1}),i=e.inject("http");function p(){t.value.plainMobile==null&&(t.value.loading=!0,i==null||i.get(`/api/user/${o.userId}/plainmobile`).then(r=>{t.value.plainMobile=r.data,t.value.loading=!1}).finally(()=>{t.value.loading=!1}))}return(r,d)=>{const c=e.resolveComponent("View"),_=e.resolveComponent("el-icon"),g=e.resolveComponent("Loading");return o.maskMobile!=null?(e.openBlock(),e.createElementBlock("div",T,[t.value.plainMobile==null?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(o.maskMobile),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.value.plainMobile),1)],64)),t.value.plainMobile==null&&!t.value.loading&&o.userId!=null?(e.openBlock(),e.createBlock(_,{key:2,class:"view-icon",onClick:p},{default:e.withCtx(()=>[e.createVNode(c)]),_:1})):e.createCommentVNode("",!0),t.value.loading?(e.openBlock(),e.createBlock(_,{key:3,class:"is-loading view-icon"},{default:e.withCtx(()=>[e.createVNode(g)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}}),q="",w=(l,o)=>{const t=l.__vccOpts||l;for(const[i,p]of o)t[i]=p;return t},V=w(B,[["__scopeId","data-v-76c9c9ae"]]),u={install:l=>{l.component("PgUserMobile",V)}};function S(){const l=e.inject("http");function o(t){return l==null?void 0:l.get(`/api/user/${t}`)}return{getUserDetail:o}}const I=e.defineComponent({__name:"LoginHistory",props:["userId"],setup(l){const o=l,t=e.ref({userId:o.userId,loginTimeStart:null,loginTimeEnd:null}),i=e.ref([]);e.watch(i,d=>{d?(t.value.loginTimeStart=d[0],t.value.loginTimeEnd=d[1]):(t.value.loginTimeStart=null,t.value.loginTimeEnd=null),console.log(t.value.loginTimeStart,t.value.loginTimeEnd)});const p=e.ref();function r(){p.value.search()}return(d,c)=>{const _=e.resolveComponent("el-date-picker"),g=e.resolveComponent("el-button"),f=e.resolveComponent("el-space"),n=e.resolveComponent("el-table-column"),s=e.resolveComponent("el-tag"),h=e.resolveComponent("pg-table");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(f,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=a=>i.value=a),type:"datetimerange","range-separator":"-","start-placeholder":"登录开始时间","end-placeholder":"登录结束时间",clearable:""},null,8,["modelValue"]),e.createVNode(g,{type:"primary",icon:"search",onClick:r},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1}),e.createVNode(h,{ref_key:"historiesTable",ref:p,style:{"margin-top":"10px"},"data-url":"/api/user/login-history",condition:t.value},{columns:e.withCtx(()=>[e.createVNode(n,{prop:"createdTime",label:"登录时间",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"ip",label:"登录IP",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"runtimeName",label:"运行容器",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{label:"登录方式",align:"center","show-overflow-tooltip":""},{default:e.withCtx(({row:a})=>[a.method==="SMS"?(e.openBlock(),e.createBlock(s,{key:0,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("短信登录")]),_:1})):e.createCommentVNode("",!0),a.method==="THIRD_PLATFORM"?(e.openBlock(),e.createBlock(s,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("第三方平台")]),_:1})):e.createCommentVNode("",!0),a.method==="UNIVERIFY"?(e.openBlock(),e.createBlock(s,{key:2,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("一键登录")]),_:1})):e.createCommentVNode("",!0),a.method==="PASSWORD"?(e.openBlock(),e.createBlock(s,{key:3,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("帐号密码")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{prop:"thirdPlatformName",label:"第三方登录",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"versionCode",label:"版本代码",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"versionName",label:"版本名称",align:"center","show-overflow-tooltip":""})]),_:1},8,["condition"])],64)}}}),N=y.defineStore("pg-user-core-config-store",()=>{const l=[];return l.push({name:"登录历史",code:"LOGIN_HISTORY",component:I}),{userDetailDialogTabs:e.computed(()=>l)}}),C=e.defineComponent({__name:"UserDetailDialog",setup(l,{expose:o}){const{getUserDetail:t}=S(),i=N(),p=e.ref(!1),r=e.ref(),d=e.ref({activeName:i.userDetailDialogTabs[0].code,tabs:[]}),c=e.ref(!1);function _(g,f){var n;c.value=!0,(n=t(g))==null||n.then(s=>{r.value=s.data,c.value=!1,p.value=!0,d.value.tabs.length=0,d.value.tabs=d.value.tabs.concat(i.userDetailDialogTabs),f&&(d.value.tabs=d.value.tabs.concat(f))})}return o({show:_}),(g,f)=>{const n=e.resolveComponent("el-descriptions-item"),s=e.resolveComponent("el-descriptions"),h=e.resolveComponent("el-tab-pane"),a=e.resolveComponent("el-tabs"),z=e.resolveComponent("el-dialog"),j=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(z,{modelValue:p.value,"onUpdate:modelValue":f[1]||(f[1]=b=>p.value=b),title:"用户详情",width:"1300"},{default:e.withCtx(()=>[e.createVNode(s,{border:""},{default:e.withCtx(()=>[e.createVNode(n,{label:"用户编号"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.id),1)]),_:1}),e.createVNode(n,{label:"用户昵称"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.nickname),1)]),_:1}),e.createVNode(n,{label:"手机号码"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(V,{"mask-mobile":r.value.mobile,"user-id":r.value.id,key:r.value.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(n,{label:"邀请编码"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.inviteCode),1)]),_:1}),e.createVNode(n,{label:"活动时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.touchTime),1)]),_:1}),e.createVNode(n,{label:"注册时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.createdTime),1)]),_:1}),e.createVNode(n,{label:"最后登陆"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.lastLoginTime),1)]),_:1}),e.createVNode(n,{label:"最后更新"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.updatedTime),1)]),_:1}),e.createVNode(n,{label:"上级用户"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.parentId),1)]),_:1}),e.createVNode(n,{label:"邀请关系"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.relationPath),1)]),_:1})]),_:1}),e.createVNode(a,{modelValue:d.value.activeName,"onUpdate:modelValue":f[0]||(f[0]=b=>d.value.activeName=b),style:{"margin-top":"10px"},type:"border-card"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tabs,(b,A)=>(e.openBlock(),e.createBlock(h,{label:b.name,name:b.code,key:`user_detail_dialog_${b.code}`},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.component),{userId:r.value.id},null,8,["userId"]))]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])),[[j,c.value]])}}}),k={install:l=>{l.component("PgUserDetailDialog",C)}},U=[u,k],M=l=>(e.pushScopeId("data-v-391c43be"),l=l(),e.popScopeId(),l),E={class:"page-layout"},L={style:{"margin-top":"10px"}},P=M(()=>e.createElementVNode("template",{"slot-scope":"{row}"},null,-1)),R=e.defineComponent({__name:"list",setup(l){const o=e.ref({id:null,parentId:null,phone:null,nicekname:null,inviteCode:null}),t=e.ref(null);function i(){t.value.search()}const p=e.ref();function r(d){p.value.show(d.id)}return(d,c)=>{const _=e.resolveComponent("el-input"),g=e.resolveComponent("el-button"),f=e.resolveComponent("el-space"),n=e.resolveComponent("el-card"),s=e.resolveComponent("el-table-column"),h=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",E,[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:o.value.id,"onUpdate:modelValue":c[0]||(c[0]=a=>o.value.id=a),placeholder:"ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:o.value.parentId,"onUpdate:modelValue":c[1]||(c[1]=a=>o.value.parentId=a),placeholder:"父用户ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:o.value.phone,"onUpdate:modelValue":c[2]||(c[2]=a=>o.value.phone=a),placeholder:"手机号",style:{width:"120px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:o.value.nicekname,"onUpdate:modelValue":c[3]||(c[3]=a=>o.value.nicekname=a),placeholder:"昵称",style:{width:"150px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:o.value.inviteCode,"onUpdate:modelValue":c[4]||(c[4]=a=>o.value.inviteCode=a),placeholder:"邀请码",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(g,{type:"primary",icon:"search",onClick:i},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createElementVNode("div",L,[e.createVNode(e.unref(D.PgTable),{ref_key:"userTable",ref:t,"data-url":"/api/user/page",condition:o.value,onRowDbClick:c[5]||(c[5]=a=>r(a))},{columns:e.withCtx(()=>[e.createVNode(s,{prop:"id",label:"UID",width:"80",align:"center"}),e.createVNode(s,{prop:"mobile",label:"手机",width:"115",align:"left","show-overflow-tooltip":""},{default:e.withCtx(a=>[(e.openBlock(),e.createBlock(V,{"mask-mobile":a.row.mobile,"user-id":a.row.id,key:a.row.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(s,{prop:"username",label:"用户名",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"nickname",label:"昵称",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"inviteCode",label:"邀请码",width:"90",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{prop:"avatar",label:"头像",width:"60",align:"center","show-overflow-tooltip":""},{default:e.withCtx(a=>[e.createVNode(h,{fit:"cover",size:30,src:a.row.avatar,"preview-teleported":"","preview-src-list":[a.row.avatar]},null,8,["src","preview-src-list"])]),_:1}),e.createVNode(s,{prop:"parentId",label:"上级ID",width:"80",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"relationPath",label:"邀请关系","min-width":"150",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"blackUnlockTime",label:"黑名单解锁",width:"145",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"lastLoginTime",label:"最后登录时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{prop:"createdTime",label:"创建时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{label:"操作",width:"220",fixed:"right"},{default:e.withCtx(()=>[P]),_:1})]),_:1},8,["condition"])])]),e.createVNode(C,{ref_key:"userDetailDialog",ref:p},null,512)],64)}}}),H="",F=w(R,[["__scopeId","data-v-391c43be"]]),$={install:(l,o)=>{let t=o.router,i=t.getRoutes().find(p=>p.path=="/");i&&i.meta&&t.addRoute({path:"/user",name:"User",redirect:"/user/list",component:i.meta.commonLayout,children:[{path:"list",name:"UserList",component:F}]})}},x=(l,o)=>{const t=N();if(o.userDetailDialogTabs&&o.userDetailDialogTabs.length)for(let i of o.userDetailDialogTabs)t.userDetailDialogTabs.push(i);U.forEach(i=>l.use(i)),l.use($,o)},O={install:x};m.UserDetailDialog=k,m.UserMobileComp=u,m.default=O,m.install=x,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("pinia"),require("@pangu-backend-ui/common")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","@pangu-backend-ui/common"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m["pg-user-core"]={},m.Vue,m.pinia,m.common))})(this,function(m,e,x,D){"use strict";const T={key:0,class:"container"},B=e.defineComponent({__name:"UserMobileComponent",props:{userId:{type:Number,default:null},maskMobile:{type:String,default:null}},setup(l){const t=l,o=e.ref({plainMobile:null,loading:!1}),r=e.inject("http");function p(){o.value.plainMobile==null&&(o.value.loading=!0,r==null||r.get(`/api/user/${t.userId}/plainmobile`).then(i=>{o.value.plainMobile=i.data,o.value.loading=!1}).finally(()=>{o.value.loading=!1}))}return(i,d)=>{const c=e.resolveComponent("View"),_=e.resolveComponent("el-icon"),b=e.resolveComponent("Loading");return t.maskMobile!=null?(e.openBlock(),e.createElementBlock("div",T,[o.value.plainMobile==null?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.maskMobile),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.value.plainMobile),1)],64)),o.value.plainMobile==null&&!o.value.loading&&t.userId!=null?(e.openBlock(),e.createBlock(_,{key:2,class:"view-icon",onClick:p},{default:e.withCtx(()=>[e.createVNode(c)]),_:1})):e.createCommentVNode("",!0),o.value.loading?(e.openBlock(),e.createBlock(_,{key:3,class:"is-loading view-icon"},{default:e.withCtx(()=>[e.createVNode(b)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}}),q="",N=(l,t)=>{const o=l.__vccOpts||l;for(const[r,p]of t)o[r]=p;return o},V=N(B,[["__scopeId","data-v-76c9c9ae"]]),u={install:l=>{l.component("PgUserMobile",V)}};function S(){const l=e.inject("http");function t(o){return l==null?void 0:l.get(`/api/user/${o}`)}return{getUserDetail:t}}const U=e.defineComponent({__name:"LoginHistory",props:["userId"],setup(l){const t=l,o=e.ref({userId:t.userId,loginTimeStart:null,loginTimeEnd:null}),r=e.ref([]);e.watch(r,d=>{d?(o.value.loginTimeStart=d[0],o.value.loginTimeEnd=d[1]):(o.value.loginTimeStart=null,o.value.loginTimeEnd=null)});const p=e.ref();function i(){p.value.search()}return(d,c)=>{const _=e.resolveComponent("el-date-picker"),b=e.resolveComponent("el-button"),f=e.resolveComponent("el-space"),n=e.resolveComponent("el-table-column"),s=e.resolveComponent("el-tag"),h=e.resolveComponent("pg-table");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(f,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=a=>r.value=a),type:"datetimerange","range-separator":"-","start-placeholder":"登录开始时间","end-placeholder":"登录结束时间",clearable:""},null,8,["modelValue"]),e.createVNode(b,{type:"primary",icon:"search",onClick:i},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1}),e.createVNode(h,{ref_key:"historiesTable",ref:p,style:{"margin-top":"10px"},"data-url":"/api/user/login-history",condition:o.value},{columns:e.withCtx(()=>[e.createVNode(n,{prop:"createdTime",label:"登录时间",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"ip",label:"登录IP",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"runtimeName",label:"运行容器",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{label:"登录方式",align:"center","show-overflow-tooltip":""},{default:e.withCtx(({row:a})=>[a.method==="SMS"?(e.openBlock(),e.createBlock(s,{key:0,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("短信登录")]),_:1})):e.createCommentVNode("",!0),a.method==="THIRD_PLATFORM"?(e.openBlock(),e.createBlock(s,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("第三方平台")]),_:1})):e.createCommentVNode("",!0),a.method==="UNIVERIFY"?(e.openBlock(),e.createBlock(s,{key:2,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("一键登录")]),_:1})):e.createCommentVNode("",!0),a.method==="PASSWORD"?(e.openBlock(),e.createBlock(s,{key:3,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("帐号密码")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{prop:"thirdPlatformName",label:"第三方登录",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"versionCode",label:"版本代码",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"versionName",label:"版本名称",align:"center","show-overflow-tooltip":""})]),_:1},8,["condition"])],64)}}}),w=x.defineStore("pg-user-core-config-store",()=>{const l=[];return l.push({name:"登录历史",code:"LOGIN_HISTORY",component:U}),{userDetailDialogTabs:e.computed(()=>l)}}),C=e.defineComponent({__name:"UserDetailDialog",setup(l,{expose:t}){const{getUserDetail:o}=S(),r=w(),p=e.ref(!1),i=e.ref(),d=e.ref({activeName:r.userDetailDialogTabs[0].code,tabs:[]}),c=e.ref(!1);function _(b,f){var n;c.value=!0,(n=o(b))==null||n.then(s=>{i.value=s.data,c.value=!1,p.value=!0,d.value.tabs.length=0,d.value.tabs=d.value.tabs.concat(r.userDetailDialogTabs),f&&(d.value.tabs=d.value.tabs.concat(f))})}return t({show:_}),(b,f)=>{const n=e.resolveComponent("el-descriptions-item"),s=e.resolveComponent("el-descriptions"),h=e.resolveComponent("el-tab-pane"),a=e.resolveComponent("el-tabs"),z=e.resolveComponent("el-dialog"),j=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(z,{modelValue:p.value,"onUpdate:modelValue":f[1]||(f[1]=g=>p.value=g),title:"用户详情",width:"1300"},{default:e.withCtx(()=>[e.createVNode(s,{border:""},{default:e.withCtx(()=>[e.createVNode(n,{label:"用户编号"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.id),1)]),_:1}),e.createVNode(n,{label:"用户昵称"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.nickname),1)]),_:1}),e.createVNode(n,{label:"手机号码"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(V,{"mask-mobile":i.value.mobile,"user-id":i.value.id,key:i.value.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(n,{label:"邀请编码"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.inviteCode),1)]),_:1}),e.createVNode(n,{label:"活动时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.touchTime),1)]),_:1}),e.createVNode(n,{label:"注册时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.createdTime),1)]),_:1}),e.createVNode(n,{label:"最后登陆"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.lastLoginTime),1)]),_:1}),e.createVNode(n,{label:"最后更新"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.updatedTime),1)]),_:1}),e.createVNode(n,{label:"上级用户"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.parentId),1)]),_:1}),e.createVNode(n,{label:"邀请关系"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.relationPath),1)]),_:1})]),_:1}),e.createVNode(a,{modelValue:d.value.activeName,"onUpdate:modelValue":f[0]||(f[0]=g=>d.value.activeName=g),style:{"margin-top":"10px"},type:"border-card"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tabs,(g,H)=>(e.openBlock(),e.createBlock(h,{label:g.name,name:g.code,key:`user_detail_dialog_${g.code}`},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[d.value.activeName==g.code?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.component),{key:`ud_tab_${g.code}`,userId:i.value.id},null,8,["userId"])):e.createCommentVNode("",!0)],1024))]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])),[[j,c.value]])}}}),k={install:l=>{l.component("PgUserDetailDialog",C)}},I=[u,k],M=l=>(e.pushScopeId("data-v-391c43be"),l=l(),e.popScopeId(),l),E={class:"page-layout"},L={style:{"margin-top":"10px"}},P=M(()=>e.createElementVNode("template",{"slot-scope":"{row}"},null,-1)),R=e.defineComponent({__name:"list",setup(l){const t=e.ref({id:null,parentId:null,phone:null,nicekname:null,inviteCode:null}),o=e.ref(null);function r(){o.value.search()}const p=e.ref();function i(d){p.value.show(d.id)}return(d,c)=>{const _=e.resolveComponent("el-input"),b=e.resolveComponent("el-button"),f=e.resolveComponent("el-space"),n=e.resolveComponent("el-card"),s=e.resolveComponent("el-table-column"),h=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",E,[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:t.value.id,"onUpdate:modelValue":c[0]||(c[0]=a=>t.value.id=a),placeholder:"ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.parentId,"onUpdate:modelValue":c[1]||(c[1]=a=>t.value.parentId=a),placeholder:"父用户ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.phone,"onUpdate:modelValue":c[2]||(c[2]=a=>t.value.phone=a),placeholder:"手机号",style:{width:"120px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.nicekname,"onUpdate:modelValue":c[3]||(c[3]=a=>t.value.nicekname=a),placeholder:"昵称",style:{width:"150px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.inviteCode,"onUpdate:modelValue":c[4]||(c[4]=a=>t.value.inviteCode=a),placeholder:"邀请码",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(b,{type:"primary",icon:"search",onClick:r},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createElementVNode("div",L,[e.createVNode(e.unref(D.PgTable),{ref_key:"userTable",ref:o,"data-url":"/api/user/page",condition:t.value,onRowDbClick:c[5]||(c[5]=a=>i(a))},{columns:e.withCtx(()=>[e.createVNode(s,{prop:"id",label:"UID",width:"80",align:"center"}),e.createVNode(s,{prop:"mobile",label:"手机",width:"115",align:"left","show-overflow-tooltip":""},{default:e.withCtx(a=>[(e.openBlock(),e.createBlock(V,{"mask-mobile":a.row.mobile,"user-id":a.row.id,key:a.row.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(s,{prop:"username",label:"用户名",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"nickname",label:"昵称",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"inviteCode",label:"邀请码",width:"90",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{prop:"avatar",label:"头像",width:"60",align:"center","show-overflow-tooltip":""},{default:e.withCtx(a=>[e.createVNode(h,{fit:"cover",size:30,src:a.row.avatar,"preview-teleported":"","preview-src-list":[a.row.avatar]},null,8,["src","preview-src-list"])]),_:1}),e.createVNode(s,{prop:"parentId",label:"上级ID",width:"80",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"relationPath",label:"邀请关系","min-width":"150",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"blackUnlockTime",label:"黑名单解锁",width:"145",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"lastLoginTime",label:"最后登录时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{prop:"createdTime",label:"创建时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{label:"操作",width:"220",fixed:"right"},{default:e.withCtx(()=>[P]),_:1})]),_:1},8,["condition"])])]),e.createVNode(C,{ref_key:"userDetailDialog",ref:p},null,512)],64)}}}),A="",$=N(R,[["__scopeId","data-v-391c43be"]]),F={install:(l,t)=>{let o=t.router,r=o.getRoutes().find(p=>p.path=="/");r&&r.meta&&o.addRoute({path:"/user",name:"User",redirect:"/user/list",component:r.meta.commonLayout,children:[{path:"list",name:"UserList",component:$}]})}},y=(l,t)=>{const o=w();if(t.userDetailDialogTabs&&t.userDetailDialogTabs.length)for(let r of t.userDetailDialogTabs)o.userDetailDialogTabs.push(r);I.forEach(r=>l.use(r)),l.use(F,t)},O={install:y};m.UserDetailDialog=k,m.UserMobileComp=u,m.default=O,m.install=y,m.useUserCoreConfigStore=w,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pangu-backend-ui/user-core",
3
3
  "private": false,
4
- "version": "0.0.10",
4
+ "version": "0.0.12",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
7
7
  "unpkg": "index.umd.cjs",
package/types/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { App } from 'vue';
2
2
  export * from './components';
3
3
  export * from './model';
4
+ export * from './store/ConfigStore';
4
5
  import InstallOptions from './types/InstallOptions';
5
6
  export declare const install: (app: App, option: InstallOptions) => void;
6
7
  declare const _default: {
@@ -1,5 +1,5 @@
1
1
  import UserDetailDialogTabConfig from '../types/UserDetailDialogTabConfig';
2
- export declare const useConfigStore: import("pinia").StoreDefinition<"pg-user-core-config-store", import("pinia")._UnwrapAll<Pick<{
2
+ export declare const useUserCoreConfigStore: import("pinia").StoreDefinition<"pg-user-core-config-store", import("pinia")._UnwrapAll<Pick<{
3
3
  userDetailDialogTabs: import("vue").ComputedRef<UserDetailDialogTabConfig[]>;
4
4
  }, never>>, Pick<{
5
5
  userDetailDialogTabs: import("vue").ComputedRef<UserDetailDialogTabConfig[]>;
package/web-types.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
- "name": "@pangu-backend-ui/common",
5
- "version": "0.0.6",
4
+ "name": "@pangu-backend-ui/user-core",
5
+ "version": "0.0.1",
6
6
  "js-types-syntax": "typescript",
7
7
  "description-markup": "markdown",
8
8
  "contributions": {