hs-admin-ui 17.0.0 → 17.0.2

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,19 +1,17 @@
1
- import { _ as a } from "./lodash-0gYcuKsH.js";
2
- import { h as m } from "./element-plus-H0jphMe7.js";
3
- import { i as u } from "./index-D0d31kpo.js";
4
- import { N as l, I as E, C as f, a as t } from "./bcVisual-LC2hVSpm.js";
5
- import { H as R, e as s, f as A, h as C, m as I } from "./bcVisual-LC2hVSpm.js";
6
- import "./vendor-CVOmLJNx.js";
1
+ import { _ as a } from "./lodash-FlWkeY7g.js";
2
+ import { I as u } from "./vendor-BCnlL5Mb.js";
3
+ import { i as l } from "./index-pd_Zrkqr.js";
4
+ import { N as m, I as E, C as f, a as c } from "./business-BHAErSNU.js";
5
+ import { H as I, e as M, f as R, h, m as s } from "./business-BHAErSNU.js";
7
6
  import "vue";
8
- import "./vxe-table-Bwt7inBg.js";
9
- function h(r, e) {
10
- l.value = e == null ? void 0 : e.NEXT_NAME, E.value = e == null ? void 0 : e.IS_DEV, f.value = e == null ? void 0 : e.currentRoute, t.value = e == null ? void 0 : e.currentRouter, a.has(r, "_context.directives.loading") || r.directive("loading", m.directive), r.use(u);
7
+ function g(r, e) {
8
+ m.value = e == null ? void 0 : e.NEXT_NAME, E.value = e == null ? void 0 : e.IS_DEV, f.value = e == null ? void 0 : e.currentRoute, c.value = e == null ? void 0 : e.currentRouter, a.has(r, "_context.directives.loading") || r.directive("loading", u.directive), r.use(l);
11
9
  }
12
10
  export {
13
- R as ElMessage,
14
- s as ElMessageBox,
15
- A as ElNotification,
16
- C as Utils,
17
- I as mathTool,
18
- h as useHsAdminUi
11
+ I as ElMessage,
12
+ M as ElMessageBox,
13
+ R as ElNotification,
14
+ h as Utils,
15
+ s as mathTool,
16
+ g as useHsAdminUi
19
17
  };
package/dist/h5.mjs CHANGED
@@ -1,9 +1,7 @@
1
- import { aV as z, x as O, a4 as G, aY as W, as as X, a1 as Z, a2 as f, g as v, ao as J, am as K, a as Q, E as N, h as ee } from "./element-plus-H0jphMe7.js";
2
- import { defineComponent as B, shallowRef as ae, reactive as M, computed as F, watch as te, resolveComponent as le, resolveDirective as oe, withDirectives as ne, createElementBlock as T, openBlock as V, createElementVNode as p, createBlock as A, createCommentVNode as re, createVNode as o, unref as e, withCtx as d, createTextVNode as L, ref as x, onMounted as se, onUnmounted as de, toDisplayString as P, Fragment as ie, renderList as ue } from "vue";
3
- import { _ as H } from "./lodash-0gYcuKsH.js";
4
- import { Z as pe, _ as Y, $ as R, a0 as ce } from "./bcVisual-LC2hVSpm.js";
5
- import "./vendor-CVOmLJNx.js";
6
- import "./vxe-table-Bwt7inBg.js";
1
+ import { bp as z, a3 as O, aA as G, bx as W, aY as X, ax as Z, ay as f, H as v, aU as J, aS as K, a as Q, E as N, I as ee } from "./vendor-BCnlL5Mb.js";
2
+ import { defineComponent as B, shallowRef as ae, reactive as M, computed as A, watch as te, resolveComponent as le, resolveDirective as ne, withDirectives as oe, createElementBlock as T, openBlock as V, createElementVNode as p, createBlock as F, createCommentVNode as re, createVNode as n, unref as e, withCtx as d, createTextVNode as S, ref as x, onMounted as se, onUnmounted as de, toDisplayString as P, Fragment as ie, renderList as ue } from "vue";
3
+ import { _ as H } from "./lodash-FlWkeY7g.js";
4
+ import { Z as pe, _ as Y, $ as R, a0 as ce } from "./business-BHAErSNU.js";
7
5
  const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" }, fe = /* @__PURE__ */ B({
8
6
  __name: "Upload",
9
7
  props: {
@@ -26,15 +24,15 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
26
24
  },
27
25
  emits: ["success"],
28
26
  setup(c, { emit: b }) {
29
- const m = c, S = b, I = ae(), n = M({
27
+ const m = c, L = b, I = ae(), o = M({
30
28
  loading: !1,
31
29
  preview: !1,
32
30
  index: 0,
33
31
  headers: m.headers,
34
32
  fileList: []
35
- }), g = F(() => n.fileList.map((u) => u.url));
33
+ }), g = A(() => o.fileList.map((u) => u.url));
36
34
  te(
37
- () => n.fileList.length,
35
+ () => o.fileList.length,
38
36
  (u) => {
39
37
  setTimeout(() => {
40
38
  const s = document.querySelector(".upload-wrapper .el-upload--picture-card");
@@ -50,39 +48,39 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
50
48
  return pe({
51
49
  url: `${window.location.origin}/${m.proxy}/pub_token/mobile_attach_push`
52
50
  }).then((u) => {
53
- n.headers = {
51
+ o.headers = {
54
52
  Authorization: `Bearer ${u == null ? void 0 : u.access_token}`
55
53
  };
56
54
  });
57
55
  }
58
56
  function t(u) {
59
- n.index = n.fileList.findIndex((s) => s.url === u.url), n.preview = !0;
57
+ o.index = o.fileList.findIndex((s) => s.url === u.url), o.preview = !0;
60
58
  }
61
59
  async function i() {
62
- n.loading = !0, I.value.submit();
60
+ o.loading = !0, I.value.submit();
63
61
  }
64
- function $(u, s, C) {
65
- n.loading = !1, S("success", { result: u, file: s, files: C });
62
+ function U(u, s, C) {
63
+ o.loading = !1, L("success", { result: u, file: s, files: C });
66
64
  }
67
65
  return (u, s) => {
68
- const C = le("el-image-viewer"), D = oe("loading");
69
- return ne((V(), T("div", me, [
66
+ const C = le("el-image-viewer"), $ = ne("loading");
67
+ return oe((V(), T("div", me, [
70
68
  p("div", ge, [
71
- o(e(z), {
69
+ n(e(z), {
72
70
  ref_key: "uploadRef",
73
71
  ref: I,
74
- "file-list": n.fileList,
75
- "onUpdate:fileList": s[0] || (s[0] = (E) => n.fileList = E),
72
+ "file-list": o.fileList,
73
+ "onUpdate:fileList": s[0] || (s[0] = (E) => o.fileList = E),
76
74
  "list-type": "picture-card",
77
75
  accept: "image/*",
78
76
  name: "file",
79
77
  action: c.action,
80
- headers: n.headers,
78
+ headers: o.headers,
81
79
  limit: c.limit,
82
80
  "auto-upload": !1,
83
81
  "on-preview": t,
84
82
  "before-upload": w,
85
- "on-success": $
83
+ "on-success": U
86
84
  }, {
87
85
  default: d(() => [...s[2] || (s[2] = [
88
86
  p("svg", {
@@ -112,25 +110,25 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
112
110
  _: 1
113
111
  }, 8, ["file-list", "action", "headers", "limit"])
114
112
  ]),
115
- n.preview ? (V(), A(C, {
113
+ o.preview ? (V(), F(C, {
116
114
  key: 0,
117
115
  "url-list": g.value,
118
116
  "show-progress": "",
119
- "initial-index": n.index,
120
- onClose: s[1] || (s[1] = (E) => n.preview = !1)
117
+ "initial-index": o.index,
118
+ onClose: s[1] || (s[1] = (E) => o.preview = !1)
121
119
  }, null, 8, ["url-list", "initial-index"])) : re("", !0),
122
- o(e(O), {
120
+ n(e(O), {
123
121
  size: "large",
124
122
  type: "primary",
125
123
  onClick: i
126
124
  }, {
127
125
  default: d(() => [...s[3] || (s[3] = [
128
- L("上传", -1)
126
+ S("上传", -1)
129
127
  ])]),
130
128
  _: 1
131
129
  })
132
130
  ])), [
133
- [D, n.loading]
131
+ [$, o.loading]
134
132
  ]);
135
133
  };
136
134
  }
@@ -207,7 +205,7 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
207
205
  }
208
206
  },
209
207
  setup(c) {
210
- const { countdownText: b, isCountingDown: m, stopCountdown: S, sendSmsCode: I } = D(), n = x(), g = x(!1), w = c, t = M({
208
+ const { countdownText: b, isCountingDown: m, stopCountdown: L, sendSmsCode: I } = $(), o = x(), g = x(!1), w = c, t = M({
211
209
  name: "",
212
210
  gender: "男",
213
211
  phone: "",
@@ -222,15 +220,15 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
222
220
  companyName: "",
223
221
  defaultMemberType: "",
224
222
  discount: 0
225
- }), $ = async () => {
226
- if (!n.value) return !1;
223
+ }), U = async () => {
224
+ if (!o.value) return !1;
227
225
  try {
228
- return await n.value.validate();
226
+ return await o.value.validate();
229
227
  } catch {
230
228
  return !1;
231
229
  }
232
230
  }, u = async () => {
233
- if (!await $()) return;
231
+ if (!await U()) return;
234
232
  g.value = !0;
235
233
  const a = {
236
234
  vip_name: t.name,
@@ -273,8 +271,8 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
273
271
  const a = await s();
274
272
  i.defaultMemberType = (a == null ? void 0 : a.id) || "", i.discount = (a == null ? void 0 : a.discount) || 0;
275
273
  };
276
- function D() {
277
- const r = x(0), a = x(null), l = 60, _ = x(!1), U = F(() => r.value > 0 ? `${r.value}秒后重新发送` : "获取验证码"), j = () => {
274
+ function $() {
275
+ const r = x(0), a = x(null), l = 60, _ = x(!1), D = A(() => r.value > 0 ? `${r.value}秒后重新发送` : "获取验证码"), j = () => {
278
276
  r.value = l, _.value = !0, a.value = setInterval(() => {
279
277
  r.value--, r.value <= 0 && q();
280
278
  }, 1e3);
@@ -282,12 +280,12 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
282
280
  a.value && (clearInterval(a.value), a.value = null), r.value = 0, _.value = !1;
283
281
  };
284
282
  return {
285
- countdownText: U,
283
+ countdownText: D,
286
284
  isCountingDown: _,
287
285
  stopCountdown: q,
288
286
  sendSmsCode: async () => {
289
- if (_.value || !n.value) return;
290
- if (!await n.value.validateField("phone")) {
287
+ if (_.value || !o.value) return;
288
+ if (!await o.value.validateField("phone")) {
291
289
  N.warning("请先输入正确的手机号");
292
290
  return;
293
291
  }
@@ -307,21 +305,21 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
307
305
  }
308
306
  function E() {
309
307
  if (t.idCard.length === 18) {
310
- const r = t.idCard.substring(6, 14), a = parseInt(r.substring(0, 4)), l = parseInt(r.substring(4, 6)), _ = parseInt(r.substring(6, 8)), U = (/* @__PURE__ */ new Date()).getFullYear() - a - ((/* @__PURE__ */ new Date()).getMonth() + 1 < l || (/* @__PURE__ */ new Date()).getMonth() + 1 === l && (/* @__PURE__ */ new Date()).getDate() < _ ? 1 : 0);
311
- t.age = U.toString(), t.gender = Number(t.idCard.charAt(16)) % 2 === 0 ? "女" : "男";
308
+ const r = t.idCard.substring(6, 14), a = parseInt(r.substring(0, 4)), l = parseInt(r.substring(4, 6)), _ = parseInt(r.substring(6, 8)), D = (/* @__PURE__ */ new Date()).getFullYear() - a - ((/* @__PURE__ */ new Date()).getMonth() + 1 < l || (/* @__PURE__ */ new Date()).getMonth() + 1 === l && (/* @__PURE__ */ new Date()).getDate() < _ ? 1 : 0);
309
+ t.age = D.toString(), t.gender = Number(t.idCard.charAt(16)) % 2 === 0 ? "女" : "男";
312
310
  }
313
311
  }
314
312
  return se(() => {
315
313
  C();
316
314
  }), de(() => {
317
- S();
315
+ L();
318
316
  }), (r, a) => (V(), T("div", _e, [
319
317
  p("header", be, [
320
318
  a[8] || (a[8] = p("h1", { class: "page-title" }, "会员信息登记", -1)),
321
319
  p("p", we, [
322
- o(e(G), null, {
320
+ n(e(G), null, {
323
321
  default: d(() => [
324
- o(e(W))
322
+ n(e(W))
325
323
  ]),
326
324
  _: 1
327
325
  }),
@@ -329,12 +327,12 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
329
327
  ])
330
328
  ]),
331
329
  p("main", Ce, [
332
- o(e(X), { class: "form-scroll" }, {
330
+ n(e(X), { class: "form-scroll" }, {
333
331
  default: d(() => [
334
332
  p("div", xe, [
335
- o(e(Z), {
333
+ n(e(Z), {
336
334
  ref_key: "formRef",
337
- ref: n,
335
+ ref: o,
338
336
  model: t,
339
337
  rules: e(ye),
340
338
  "label-position": "left",
@@ -342,12 +340,12 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
342
340
  class: "member-form"
343
341
  }, {
344
342
  default: d(() => [
345
- o(e(f), {
343
+ n(e(f), {
346
344
  label: "姓名",
347
345
  prop: "name"
348
346
  }, {
349
347
  default: d(() => [
350
- o(e(v), {
348
+ n(e(v), {
351
349
  modelValue: t.name,
352
350
  "onUpdate:modelValue": a[0] || (a[0] = (l) => t.name = l),
353
351
  placeholder: e(y).name,
@@ -356,12 +354,12 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
356
354
  ]),
357
355
  _: 1
358
356
  }),
359
- o(e(f), {
357
+ n(e(f), {
360
358
  label: "手机号",
361
359
  prop: "phone"
362
360
  }, {
363
361
  default: d(() => [
364
- o(e(v), {
362
+ n(e(v), {
365
363
  modelValue: t.phone,
366
364
  "onUpdate:modelValue": a[1] || (a[1] = (l) => t.phone = l),
367
365
  type: "tel",
@@ -372,12 +370,12 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
372
370
  ]),
373
371
  _: 1
374
372
  }),
375
- o(e(f), {
373
+ n(e(f), {
376
374
  label: "身份证号",
377
375
  prop: "idCard"
378
376
  }, {
379
377
  default: d(() => [
380
- o(e(v), {
378
+ n(e(v), {
381
379
  modelValue: t.idCard,
382
380
  "onUpdate:modelValue": a[2] || (a[2] = (l) => t.idCard = l),
383
381
  onInput: E,
@@ -388,24 +386,24 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
388
386
  ]),
389
387
  _: 1
390
388
  }),
391
- o(e(f), {
389
+ n(e(f), {
392
390
  label: "性别",
393
391
  prop: "gender"
394
392
  }, {
395
393
  default: d(() => [
396
- o(e(J), {
394
+ n(e(J), {
397
395
  modelValue: t.gender,
398
396
  "onUpdate:modelValue": a[3] || (a[3] = (l) => t.gender = l),
399
397
  class: "gender-radio-group"
400
398
  }, {
401
399
  default: d(() => [
402
- (V(!0), T(ie, null, ue(e(ve), (l) => (V(), A(e(K), {
400
+ (V(!0), T(ie, null, ue(e(ve), (l) => (V(), F(e(K), {
403
401
  key: l.value,
404
402
  value: l.value,
405
403
  border: ""
406
404
  }, {
407
405
  default: d(() => [
408
- L(P(l.label), 1)
406
+ S(P(l.label), 1)
409
407
  ]),
410
408
  _: 2
411
409
  }, 1032, ["value"]))), 128))
@@ -415,12 +413,12 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
415
413
  ]),
416
414
  _: 1
417
415
  }),
418
- o(e(f), {
416
+ n(e(f), {
419
417
  label: "年龄",
420
418
  prop: "age"
421
419
  }, {
422
420
  default: d(() => [
423
- o(e(v), {
421
+ n(e(v), {
424
422
  type: "number",
425
423
  modelValue: t.age,
426
424
  "onUpdate:modelValue": a[4] || (a[4] = (l) => t.age = l),
@@ -431,12 +429,12 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
431
429
  ]),
432
430
  _: 1
433
431
  }),
434
- o(e(f), {
432
+ n(e(f), {
435
433
  label: "地址",
436
434
  prop: "address"
437
435
  }, {
438
436
  default: d(() => [
439
- o(e(v), {
437
+ n(e(v), {
440
438
  modelValue: t.address,
441
439
  "onUpdate:modelValue": a[5] || (a[5] = (l) => t.address = l),
442
440
  placeholder: e(y).address,
@@ -445,12 +443,12 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
445
443
  ]),
446
444
  _: 1
447
445
  }),
448
- o(e(f), {
446
+ n(e(f), {
449
447
  label: "备注",
450
448
  prop: "remark"
451
449
  }, {
452
450
  default: d(() => [
453
- o(e(v), {
451
+ n(e(v), {
454
452
  modelValue: t.remark,
455
453
  "onUpdate:modelValue": a[6] || (a[6] = (l) => t.remark = l),
456
454
  placeholder: e(y).remark,
@@ -459,13 +457,13 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
459
457
  ]),
460
458
  _: 1
461
459
  }),
462
- o(e(f), {
460
+ n(e(f), {
463
461
  label: "验证码",
464
462
  prop: "captcha"
465
463
  }, {
466
464
  default: d(() => [
467
465
  p("div", Ve, [
468
- o(e(v), {
466
+ n(e(v), {
469
467
  modelValue: t.captcha,
470
468
  "onUpdate:modelValue": a[7] || (a[7] = (l) => t.captcha = l),
471
469
  placeholder: e(y).captcha,
@@ -473,7 +471,7 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
473
471
  clearable: "",
474
472
  class: "sms-code-input"
475
473
  }, null, 8, ["modelValue", "placeholder", "maxlength"]),
476
- o(e(O), {
474
+ n(e(O), {
477
475
  type: "primary",
478
476
  disabled: e(m),
479
477
  loading: g.value,
@@ -481,7 +479,7 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
481
479
  onClick: e(I)
482
480
  }, {
483
481
  default: d(() => [
484
- L(P(e(b)), 1)
482
+ S(P(e(b)), 1)
485
483
  ]),
486
484
  _: 1
487
485
  }, 8, ["disabled", "loading", "onClick"])
@@ -493,7 +491,7 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
493
491
  _: 1
494
492
  }, 8, ["model", "rules"]),
495
493
  p("div", Ie, [
496
- o(e(O), {
494
+ n(e(O), {
497
495
  type: "primary",
498
496
  round: "",
499
497
  class: "submit-btn",
@@ -501,7 +499,7 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
501
499
  onClick: u
502
500
  }, {
503
501
  default: d(() => [...a[9] || (a[9] = [
504
- L(" 提交 ", -1)
502
+ S(" 提交 ", -1)
505
503
  ])]),
506
504
  _: 1
507
505
  }, 8, ["loading"])
@@ -513,17 +511,17 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
513
511
  ])
514
512
  ]));
515
513
  }
516
- }), ke = /* @__PURE__ */ Y(Ee, [["__scopeId", "data-v-992af5c2"]]), Le = {
514
+ }), ke = /* @__PURE__ */ Y(Ee, [["__scopeId", "data-v-992af5c2"]]), Se = {
517
515
  Upload: he,
518
516
  MemberRegister: ke
519
517
  };
520
- function Se(c) {
521
- for (const [b, m] of Object.entries(Le))
518
+ function Le(c) {
519
+ for (const [b, m] of Object.entries(Se))
522
520
  c.component(`H${b}`, m);
523
521
  }
524
- function qe(c) {
525
- H.has(c, "_context.directives.loading") || c.directive("loading", ee.directive), c.use(Se);
522
+ function Me(c) {
523
+ H.has(c, "_context.directives.loading") || c.directive("loading", ee.directive), c.use(Le);
526
524
  }
527
525
  export {
528
- qe as useHsAdminUi
526
+ Me as useHsAdminUi
529
527
  };