geekplus-digital-ui 0.1.16 → 0.1.18

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 +1 @@
1
- .d-copy[data-v-c0f87f3d] .el-link__inner{gap:5px}
1
+ .d-copy[data-v-b0bd3813] .el-link__inner{gap:5px}
@@ -1,11 +1,13 @@
1
- import { ref as m, toRef as C, computed as p, onMounted as L, onBeforeUnmount as x, openBlock as a, createBlock as d, unref as f, withModifiers as S, normalizeStyle as M, withCtx as y, createElementBlock as N, normalizeClass as _, createVNode as B, renderSlot as w, createCommentVNode as R } from "vue";
2
- import { useClipboard as $ } from "@vueuse/core";
3
- import { ElMessage as b, ElLink as z, ElIcon as I } from "element-plus";
1
+ import { ref as m, toRef as C, computed as p, onMounted as L, onBeforeUnmount as x, openBlock as a, createBlock as d, unref as f, withModifiers as S, normalizeStyle as M, withCtx as y, createElementBlock as N, normalizeClass as _, createVNode as b, renderSlot as B, createCommentVNode as w } from "vue";
2
+ import { useClipboard as R } from "@vueuse/core";
3
+ import { ElMessage as $, ElLink as z } from "element-plus";
4
+ import "../../index.js";
4
5
  import "../../../hooks/index.js";
5
- import V from "../../icons/copy-light.vue.js";
6
+ import D from "../../icons/copy-light.vue.js";
6
7
  import './copy.css';/* empty css */
7
- import j from "../../../_virtual/_plugin-vue_export-helper.js";
8
- import { useLocale as D } from "../../../hooks/use-locale/index.js";
8
+ import I from "../../../_virtual/_plugin-vue_export-helper.js";
9
+ import { useLocale as V } from "../../../hooks/use-locale/index.js";
10
+ import { DIcon as j } from "../../icon/index.js";
9
11
  const H = /* @__PURE__ */ Object.assign({
10
12
  name: "DCopy"
11
13
  }, {
@@ -27,9 +29,9 @@ const H = /* @__PURE__ */ Object.assign({
27
29
  // 触发元素显示的dom,不设置就一直显示
28
30
  },
29
31
  setup(n, { expose: v }) {
30
- const r = n, l = m(null), s = m(!1), g = C(r, "text"), { copy: E } = $({
32
+ const r = n, l = m(null), s = m(!1), g = C(r, "text"), { copy: E } = R({
31
33
  source: g
32
- }), { t: h } = D(), e = p(() => {
34
+ }), { t: h } = V(), e = p(() => {
33
35
  const o = l.value?.$el ?? l.value;
34
36
  if (!r.triggerElement || !o)
35
37
  return null;
@@ -42,22 +44,22 @@ const H = /* @__PURE__ */ Object.assign({
42
44
  return null;
43
45
  }), k = p(() => ({
44
46
  display: r.triggerElement && !s.value ? "none" : ""
45
- })), u = () => {
47
+ })), i = () => {
46
48
  E().then(() => {
47
- b.success(h("d.copy.success"));
49
+ $.success(h("d.copy.success"));
48
50
  });
49
- }, c = () => {
51
+ }, u = () => {
50
52
  s.value = !0;
51
- }, i = () => {
53
+ }, c = () => {
52
54
  s.value = !1;
53
55
  };
54
56
  return L(() => {
55
- e.value && (e.value.addEventListener("mouseenter", c), e.value.addEventListener("mouseleave", i));
57
+ e.value && (e.value.addEventListener("mouseenter", u), e.value.addEventListener("mouseleave", c));
56
58
  }), x(() => {
57
- e.value && (e.value.removeEventListener("mouseenter", c), e.value.removeEventListener("mouseleave", i));
59
+ e.value && (e.value.removeEventListener("mouseenter", u), e.value.removeEventListener("mouseleave", c));
58
60
  }), v({
59
61
  rootRef: l,
60
- handleCopy: u
62
+ handleCopy: i
61
63
  }), (o, t) => (a(), d(f(z), {
62
64
  ref_key: "rootRef",
63
65
  ref: l,
@@ -65,24 +67,24 @@ const H = /* @__PURE__ */ Object.assign({
65
67
  type: n.type,
66
68
  underline: "never",
67
69
  style: M(k.value),
68
- onClick: S(u, ["stop"])
70
+ onClick: S(i, ["stop"])
69
71
  }, {
70
72
  default: y(() => [
71
73
  n.icon ? (a(), N("i", {
72
74
  key: 0,
73
75
  class: _(n.icon)
74
- }, null, 2)) : (a(), d(f(I), { key: 1 }, {
76
+ }, null, 2)) : (a(), d(f(j), { key: 1 }, {
75
77
  default: y(() => [
76
- B(V)
78
+ b(D)
77
79
  ]),
78
80
  _: 1
79
81
  })),
80
- o.$slots.default ? w(o.$slots, "default", { key: 2 }, void 0, !0) : R("", !0)
82
+ o.$slots.default ? B(o.$slots, "default", { key: 2 }, void 0, !0) : w("", !0)
81
83
  ]),
82
84
  _: 3
83
85
  }, 8, ["type", "style"]));
84
86
  }
85
- }), P = /* @__PURE__ */ j(H, [["__scopeId", "data-v-c0f87f3d"]]);
87
+ }), T = /* @__PURE__ */ I(H, [["__scopeId", "data-v-b0bd3813"]]);
86
88
  export {
87
- P as default
89
+ T as default
88
90
  };
@@ -1 +1 @@
1
- .d-fold-text[data-v-1c355079]{display:flex;flex-direction:column;overflow-wrap:break-word}.d-fold-text .text-content[data-v-1c355079]{white-space:pre-wrap}.d-fold-text .text-content.line-clamp[data-v-1c355079]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.d-fold-text .text-link[data-v-1c355079]{display:flex}.d-fold-text .text-link[data-v-1c355079] .el-link__inner{gap:5px}
1
+ .d-fold-text[data-v-24cf8de0]{display:flex;flex-direction:column;overflow-wrap:break-word}.d-fold-text .text-content[data-v-24cf8de0]{white-space:pre-wrap}.d-fold-text .text-content.line-clamp[data-v-24cf8de0]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.d-fold-text .text-link[data-v-24cf8de0]{display:flex}.d-fold-text .text-link[data-v-24cf8de0] .el-link__inner{gap:5px}
@@ -1,13 +1,15 @@
1
- import { ref as i, computed as C, onMounted as h, openBlock as n, createElementBlock as p, createElementVNode as d, normalizeStyle as w, normalizeClass as E, renderSlot as F, createBlock as f, unref as e, withCtx as a, toDisplayString as c, createVNode as r, createCommentVNode as b } from "vue";
2
- import { useResizeObserver as B } from "@vueuse/core";
3
- import { ElLink as v, ElIcon as x } from "element-plus";
1
+ import { ref as s, computed as C, onMounted as h, openBlock as n, createElementBlock as p, createElementVNode as d, normalizeStyle as w, normalizeClass as F, renderSlot as b, createBlock as f, unref as e, withCtx as r, toDisplayString as c, createVNode as a, createCommentVNode as B } from "vue";
2
+ import { useResizeObserver as D } from "@vueuse/core";
3
+ import { ElLink as v } from "element-plus";
4
+ import "../../index.js";
4
5
  import "../../../hooks/index.js";
5
- import L from "../../icons/angle-up-light.vue.js";
6
- import N from "../../icons/angle-down-light.vue.js";
6
+ import E from "../../icons/angle-up-light.vue.js";
7
+ import L from "../../icons/angle-down-light.vue.js";
7
8
  import './fold-text.css';/* empty css */
8
- import T from "../../../_virtual/_plugin-vue_export-helper.js";
9
- import { useLocale as z } from "../../../hooks/use-locale/index.js";
10
- const D = { class: "d-fold-text" }, R = {
9
+ import N from "../../../_virtual/_plugin-vue_export-helper.js";
10
+ import { useLocale as T } from "../../../hooks/use-locale/index.js";
11
+ import { DIcon as x } from "../../icon/index.js";
12
+ const z = { class: "d-fold-text" }, R = {
11
13
  key: 0,
12
14
  class: "text-link"
13
15
  }, S = /* @__PURE__ */ Object.assign({
@@ -24,35 +26,35 @@ const D = { class: "d-fold-text" }, R = {
24
26
  default: 3
25
27
  }
26
28
  },
27
- setup(s) {
28
- const y = s, t = i(null), u = i(!1), l = i(!1), { t: m } = z(), k = C(() => ({
29
+ setup(i) {
30
+ const y = i, t = s(null), u = s(!1), l = s(!1), { t: m } = T(), k = C(() => ({
29
31
  "line-clamp": !l.value && y.lineClamp
30
32
  }));
31
33
  return h(() => {
32
- B(t, () => {
34
+ D(t, () => {
33
35
  !l.value && t.value && (u.value = t.value.scrollHeight > t.value.clientHeight);
34
36
  });
35
- }), (_, o) => (n(), p("div", D, [
37
+ }), (_, o) => (n(), p("div", z, [
36
38
  d("div", {
37
39
  ref_key: "textRef",
38
40
  ref: t,
39
- class: E(["text-content", k.value]),
40
- style: w({ "-webkit-line-clamp": s.lineClamp })
41
+ class: F(["text-content", k.value]),
42
+ style: w({ "-webkit-line-clamp": i.lineClamp })
41
43
  }, [
42
- F(_.$slots, "default", {}, void 0, !0)
44
+ b(_.$slots, "default", {}, void 0, !0)
43
45
  ], 6),
44
- s.showFold && u.value ? (n(), p("div", R, [
46
+ i.showFold && u.value ? (n(), p("div", R, [
45
47
  l.value ? (n(), f(e(v), {
46
48
  key: 0,
47
49
  type: "primary",
48
50
  underline: "never",
49
51
  onClick: o[0] || (o[0] = (g) => l.value = !1)
50
52
  }, {
51
- default: a(() => [
53
+ default: r(() => [
52
54
  d("span", null, c(e(m)("d.foldText.collapse")), 1),
53
- r(e(x), null, {
54
- default: a(() => [
55
- r(L)
55
+ a(e(x), null, {
56
+ default: r(() => [
57
+ a(E)
56
58
  ]),
57
59
  _: 1
58
60
  })
@@ -64,21 +66,21 @@ const D = { class: "d-fold-text" }, R = {
64
66
  underline: "never",
65
67
  onClick: o[1] || (o[1] = (g) => l.value = !0)
66
68
  }, {
67
- default: a(() => [
69
+ default: r(() => [
68
70
  d("span", null, c(e(m)("d.foldText.expand")), 1),
69
- r(e(x), null, {
70
- default: a(() => [
71
- r(N)
71
+ a(e(x), null, {
72
+ default: r(() => [
73
+ a(L)
72
74
  ]),
73
75
  _: 1
74
76
  })
75
77
  ]),
76
78
  _: 1
77
79
  }))
78
- ])) : b("", !0)
80
+ ])) : B("", !0)
79
81
  ]));
80
82
  }
81
- }), U = /* @__PURE__ */ T(S, [["__scopeId", "data-v-1c355079"]]);
83
+ }), G = /* @__PURE__ */ N(S, [["__scopeId", "data-v-24cf8de0"]]);
82
84
  export {
83
- U as default
85
+ G as default
84
86
  };
@@ -0,0 +1,18 @@
1
+ export const DIcon: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLElement, import('vue').ComponentProvideOptions, {
3
+ P: {};
4
+ B: {};
5
+ D: {};
6
+ C: {};
7
+ M: {};
8
+ Defaults: {};
9
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
10
+ __isFragment?: never;
11
+ __isTeleport?: never;
12
+ __isSuspense?: never;
13
+ } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
14
+ $slots: {
15
+ default?(_: {}): any;
16
+ };
17
+ });
18
+ export default DIcon;
@@ -0,0 +1,6 @@
1
+ import o from "./src/icon.vue.js";
2
+ const c = o;
3
+ export {
4
+ c as DIcon,
5
+ c as default
6
+ };
@@ -0,0 +1 @@
1
+ .d-icon[data-v-b523c56c]{display:inline-flex}.d-icon[data-v-b523c56c] svg{box-sizing:content-box;display:inline-block;height:1em;overflow:visible;vertical-align:-.125em;width:1.25em}
@@ -0,0 +1,14 @@
1
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
+ export default _default;
3
+ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
7
+ type __VLS_TemplateResult = {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ };
12
+ refs: {};
13
+ rootEl: HTMLElement;
14
+ };
@@ -0,0 +1,16 @@
1
+ import { openBlock as o, createElementBlock as t, renderSlot as c } from "vue";
2
+ import './icon.css';/* empty css */
3
+ import n from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = { class: "d-icon" }, s = /* @__PURE__ */ Object.assign({
5
+ name: "DIcon"
6
+ }, {
7
+ __name: "icon",
8
+ setup(_) {
9
+ return (e, a) => (o(), t("i", r, [
10
+ c(e.$slots, "default", {}, void 0, !0)
11
+ ]));
12
+ }
13
+ }), m = /* @__PURE__ */ n(s, [["__scopeId", "data-v-b523c56c"]]);
14
+ export {
15
+ m as default
16
+ };
@@ -1 +1 @@
1
- .d-icon-tip .tip-content[data-v-04e984ec]{white-space:pre-wrap}
1
+ .d-icon-tip .tip-content[data-v-3271ffa0]{white-space:pre-wrap}
@@ -1,8 +1,10 @@
1
- import { openBlock as n, createBlock as i, unref as c, withCtx as t, createVNode as l, mergeProps as m, createElementBlock as s, normalizeClass as d, createElementVNode as f, renderSlot as u, createTextVNode as y, toDisplayString as k } from "vue";
2
- import { ElTooltip as g, ElLink as S, ElIcon as E } from "element-plus";
1
+ import { openBlock as n, createBlock as i, unref as o, withCtx as e, createVNode as r, mergeProps as p, createElementBlock as s, normalizeClass as d, createElementVNode as f, renderSlot as u, createTextVNode as y, toDisplayString as k } from "vue";
2
+ import { ElTooltip as g, ElLink as S } from "element-plus";
3
+ import "../../index.js";
3
4
  import C from "../../icons/circle-exclamation-solid.vue.js";
4
5
  import './icon-tip.css';/* empty css */
5
- import _ from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ import E from "../../../_virtual/_plugin-vue_export-helper.js";
7
+ import { DIcon as _ } from "../../icon/index.js";
6
8
  const h = { class: "tip-content" }, x = /* @__PURE__ */ Object.assign({
7
9
  name: "DIconTip"
8
10
  }, {
@@ -24,31 +26,31 @@ const h = { class: "tip-content" }, x = /* @__PURE__ */ Object.assign({
24
26
  }
25
27
  },
26
28
  emits: ["click"],
27
- setup(e, { emit: r }) {
28
- const a = r, p = () => {
29
+ setup(t, { emit: l }) {
30
+ const a = l, m = () => {
29
31
  a("click");
30
32
  };
31
- return (o, I) => (n(), i(c(g), { placement: e.placement }, {
32
- content: t(() => [
33
+ return (c, I) => (n(), i(o(g), { placement: t.placement }, {
34
+ content: e(() => [
33
35
  f("div", h, [
34
- u(o.$slots, "content", {}, () => [
35
- y(k(e.content), 1)
36
+ u(c.$slots, "content", {}, () => [
37
+ y(k(t.content), 1)
36
38
  ], !0)
37
39
  ])
38
40
  ]),
39
- default: t(() => [
40
- l(c(S), m(o.$attrs, {
41
- type: e.type,
41
+ default: e(() => [
42
+ r(o(S), p(c.$attrs, {
43
+ type: t.type,
42
44
  underline: "never",
43
- onClick: p
45
+ onClick: m
44
46
  }), {
45
- default: t(() => [
46
- e.icon ? (n(), s("i", {
47
+ default: e(() => [
48
+ t.icon ? (n(), s("i", {
47
49
  key: 0,
48
- class: d(["d-icon-tip", e.icon])
49
- }, null, 2)) : (n(), i(c(E), { key: 1 }, {
50
- default: t(() => [
51
- l(C)
50
+ class: d(["d-icon-tip", t.icon])
51
+ }, null, 2)) : (n(), i(o(_), { key: 1 }, {
52
+ default: e(() => [
53
+ r(C)
52
54
  ]),
53
55
  _: 1
54
56
  }))
@@ -59,7 +61,7 @@ const h = { class: "tip-content" }, x = /* @__PURE__ */ Object.assign({
59
61
  _: 3
60
62
  }, 8, ["placement"]));
61
63
  }
62
- }), D = /* @__PURE__ */ _(x, [["__scopeId", "data-v-04e984ec"]]);
64
+ }), b = /* @__PURE__ */ E(x, [["__scopeId", "data-v-3271ffa0"]]);
63
65
  export {
64
- D as default
66
+ b as default
65
67
  };
@@ -2,3 +2,4 @@ export * from './copy';
2
2
  export * from './fold-text';
3
3
  export * from './icon-tip';
4
4
  export * from './upload';
5
+ export * from './icon';
@@ -2,9 +2,11 @@ import { DCopy as p } from "./copy/index.js";
2
2
  import { DFoldText as t } from "./fold-text/index.js";
3
3
  import { DIconTip as f } from "./icon-tip/index.js";
4
4
  import { DUpload as D } from "./upload/index.js";
5
+ import { DIcon as d } from "./icon/index.js";
5
6
  export {
6
7
  p as DCopy,
7
8
  t as DFoldText,
9
+ d as DIcon,
8
10
  f as DIconTip,
9
11
  D as DUpload
10
12
  };
@@ -1 +1 @@
1
- .d-upload[data-v-322bef31]{line-height:normal}.d-upload.is-list[data-v-322bef31],.d-upload.is-list .list[data-v-322bef31]{display:flex;flex-direction:column;gap:8px}.d-upload.is-list .list .list-item .file-row[data-v-322bef31]{position:relative;display:flex;align-items:center;gap:10px}.d-upload.is-list .list .list-item .file-row[data-v-322bef31] .el-link{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.d-upload.is-list .list .list-item .file-row[data-v-322bef31] .el-link .el-link__inner{display:inline}.d-upload.is-list .list .list-item .file-row .remove-icon[data-v-322bef31]{cursor:pointer;display:none;color:var(--el-text-color-secondary)}.d-upload.is-list .list .list-item .file-row:hover .remove-icon[data-v-322bef31]{display:block}.d-upload.is-card[data-v-322bef31],.d-upload.is-card .card[data-v-322bef31]{display:flex;flex-wrap:wrap;gap:8px}.d-upload.is-card .card .card-item[data-v-322bef31]{display:flex;justify-content:center;align-items:center;font-size:16px;border:1px solid var(--el-border-color);border-radius:4px;overflow:hidden;position:relative;cursor:pointer}.d-upload.is-card .card .card-item .card-cover[data-v-322bef31]{display:flex;justify-content:center;align-items:center;gap:10px;position:absolute;top:0;left:0;width:100%;height:100%;background:var(--el-overlay-color);opacity:0}.d-upload.is-card .card .card-item .card-cover .el-icon[data-v-322bef31]{color:var(--el-color-white);font-size:16px}.d-upload.is-card .card .card-item .card-cover[data-v-322bef31]:hover{opacity:1}.d-upload.is-card .card .el-image[data-v-322bef31]{width:100%;height:100%}.d-upload .expand-toggle[data-v-322bef31] .el-link__inner{gap:5px}.d-upload .tip[data-v-322bef31]{width:100%;font-size:12px;margin:0;color:var(--el-text-color-regular)}
1
+ .d-upload[data-v-4214bfeb]{line-height:normal}.d-upload.is-list[data-v-4214bfeb],.d-upload.is-list .list[data-v-4214bfeb]{display:flex;flex-direction:column;gap:8px}.d-upload.is-list .list .list-item .file-row[data-v-4214bfeb]{position:relative;display:flex;align-items:center;gap:10px}.d-upload.is-list .list .list-item .file-row[data-v-4214bfeb] .el-link{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.d-upload.is-list .list .list-item .file-row[data-v-4214bfeb] .el-link .el-link__inner{display:inline}.d-upload.is-list .list .list-item .file-row .remove-icon[data-v-4214bfeb]{cursor:pointer;display:none;color:var(--el-text-color-secondary)}.d-upload.is-list .list .list-item .file-row:hover .remove-icon[data-v-4214bfeb]{display:block}.d-upload.is-card[data-v-4214bfeb],.d-upload.is-card .card[data-v-4214bfeb]{display:flex;flex-wrap:wrap;gap:8px}.d-upload.is-card .card .card-item[data-v-4214bfeb]{display:flex;justify-content:center;align-items:center;font-size:16px;border:1px solid var(--el-border-color);border-radius:4px;overflow:hidden;position:relative;cursor:pointer}.d-upload.is-card .card .card-item .card-cover[data-v-4214bfeb]{display:flex;justify-content:center;align-items:center;gap:10px;position:absolute;top:0;left:0;width:100%;height:100%;background:var(--el-overlay-color);opacity:0}.d-upload.is-card .card .card-item .card-cover .d-icon[data-v-4214bfeb]{color:var(--el-color-white)}.d-upload.is-card .card .card-item .card-cover[data-v-4214bfeb]:hover{opacity:1}.d-upload.is-card .card .el-image[data-v-4214bfeb]{width:100%;height:100%}.d-upload .expand-toggle[data-v-4214bfeb] .el-link__inner{gap:5px}.d-upload .tip[data-v-4214bfeb]{width:100%;font-size:12px;margin:0;color:var(--el-text-color-regular)}
@@ -1,29 +1,31 @@
1
- import { useModel as ve, ref as y, computed as v, watch as Ve, onMounted as De, onBeforeUnmount as Ie, openBlock as o, createElementBlock as f, normalizeClass as Ne, createVNode as d, unref as n, createBlock as c, createCommentVNode as p, withCtx as i, createElementVNode as _, createTextVNode as C, toDisplayString as k, normalizeStyle as F, Fragment as q, renderList as ye, withModifiers as he, mergeModels as ge } from "vue";
1
+ import { useModel as ve, ref as y, computed as v, reactive as Ee, watch as Ve, onMounted as Ie, onBeforeUnmount as Ne, openBlock as o, createElementBlock as f, normalizeClass as Be, createVNode as d, unref as n, createBlock as c, createCommentVNode as p, withCtx as i, createElementVNode as _, createTextVNode as C, toDisplayString as k, normalizeStyle as F, Fragment as q, renderList as ye, withModifiers as he, mergeModels as ge } from "vue";
2
2
  import "../../../hooks/index.js";
3
- import { useFormItem as Be, ElMessageBox as $e, ElMessage as O, ElUpload as Pe, ElImageViewer as je, ElDialog as Re, ElButton as M, ElImage as He, ElIcon as h, ElProgress as ke, ElLink as K } from "element-plus";
4
- import { cloneDeep as L, isFunction as we } from "lodash-es";
5
- import { saveAs as qe } from "file-saver";
6
- import Oe from "../../icons/angle-down-light.vue.js";
7
- import Ke from "../../icons/angle-up-light.vue.js";
8
- import Xe from "../../icons/circle-play-light.vue.js";
9
- import Ge from "../../icons/circle-xmark-light.vue.js";
10
- import Je from "../../icons/download-light.vue.js";
11
- import Qe from "../../icons/eye-light.vue.js";
12
- import We from "../../icons/file-light.vue.js";
13
- import Ye from "../../icons/plus-light.vue.js";
14
- import Ze from "../../icons/trash-light.vue.js";
3
+ import { useFormItem as $e, ElMessageBox as Pe, ElMessage as O, ElUpload as je, ElImageViewer as Re, ElDialog as He, ElButton as M, ElImage as qe, ElProgress as ke, ElLink as K } from "element-plus";
4
+ import "../../index.js";
5
+ import { cloneDeep as b, isFunction as we } from "lodash-es";
6
+ import { saveAs as Oe } from "file-saver";
7
+ import Ke from "../../icons/angle-down-light.vue.js";
8
+ import Xe from "../../icons/angle-up-light.vue.js";
9
+ import Ge from "../../icons/circle-play-light.vue.js";
10
+ import Je from "../../icons/circle-xmark-light.vue.js";
11
+ import Qe from "../../icons/download-light.vue.js";
12
+ import We from "../../icons/eye-light.vue.js";
13
+ import Ye from "../../icons/file-light.vue.js";
14
+ import Ze from "../../icons/plus-light.vue.js";
15
+ import et from "../../icons/trash-light.vue.js";
15
16
  import './upload2.css';import './upload.css';/* empty css */
16
17
  /* empty css */
17
- import et from "../../../_virtual/_plugin-vue_export-helper.js";
18
- import { useLocale as tt } from "../../../hooks/use-locale/index.js";
19
- import { useActivated as lt } from "../../../hooks/use-activated/index.js";
20
- const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
18
+ import tt from "../../../_virtual/_plugin-vue_export-helper.js";
19
+ import { useLocale as lt } from "../../../hooks/use-locale/index.js";
20
+ import { useActivated as at } from "../../../hooks/use-activated/index.js";
21
+ import { DIcon as h } from "../../icon/index.js";
22
+ const ot = { class: "d-upload__preview" }, nt = ["src"], st = { key: 2 }, it = {
21
23
  key: 0,
22
24
  style: { width: "100%" }
23
- }, it = ["onClick"], rt = { class: "card-cover" }, ut = ["innerHTML"], dt = { class: "file-row" }, ct = {
25
+ }, rt = ["onClick"], ut = { class: "card-cover" }, dt = ["innerHTML"], ct = { class: "file-row" }, pt = {
24
26
  key: 6,
25
27
  class: "expand-toggle"
26
- }, pt = /* @__PURE__ */ Object.assign({
28
+ }, ft = /* @__PURE__ */ Object.assign({
27
29
  name: "DUpload"
28
30
  }, {
29
31
  __name: "upload",
@@ -106,13 +108,13 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
106
108
  }),
107
109
  emits: /* @__PURE__ */ ge(["change", "success"], ["update:modelValue", "update:uploadingCount"]),
108
110
  setup(g, { emit: xe }) {
109
- const l = g, E = xe, z = ve(g, "modelValue"), X = ve(g, "uploadingCount"), G = ["jpg", "jpeg", "png", "gif"], Se = ["mp4"], s = y([]), V = y(!1), w = y(!1), D = y(0), I = y([]), b = y(""), x = y(!1), J = y(null), Q = y(null), { t: r } = tt(), _e = lt(), { formItem: W } = Be(), N = v(() => x.value ? s.value : s.value.slice(0, l.maxShow)), B = v(() => s.value.length > 0), $ = v(() => !l.disabled && !Y.value), T = v(() => l.showType === "list"), Y = v(() => s.value.length >= l.maxNumber), Ce = v(() => T.value ? "is-list" : "is-card"), Z = v(() => l.format.length ? l.format.map((t) => t.toUpperCase()) : []), ee = v(() => ({
111
+ const l = g, z = xe, D = ve(g, "modelValue"), X = ve(g, "uploadingCount"), G = ["jpg", "jpeg", "png", "gif"], Se = ["mp4"], s = y([]), E = y(!1), w = y(!1), V = y(0), I = y([]), L = y(""), x = y(!1), J = y(null), Q = y(null), { t: r } = lt(), _e = at(), { formItem: W } = $e(), N = v(() => x.value ? s.value : s.value.slice(0, l.maxShow)), B = v(() => s.value.length > 0), $ = v(() => !l.disabled && !Y.value), T = v(() => l.showType === "list"), Y = v(() => s.value.length >= l.maxNumber), Ce = v(() => T.value ? "is-list" : "is-card"), Z = v(() => l.format.length ? l.format.map((t) => t.toUpperCase()) : []), ee = v(() => ({
110
112
  width: l.size,
111
113
  height: l.size
112
- })), Le = v(() => l.format.map((t) => `.${t}`).join(",")), te = v(() => ({
114
+ })), be = v(() => l.format.map((t) => `.${t}`).join(",")), te = v(() => ({
113
115
  maxHeight: l.scrollHeight,
114
116
  overflow: "auto"
115
- })), be = v(() => {
117
+ })), Le = v(() => {
116
118
  const t = l.format.length && l.format.every((e) => G.includes(e)), a = [];
117
119
  return l.maxSize && !t && a.push(r("d.upload.lessThan", { size: l.maxSize })), l.format.length && a.push(r("d.upload.format", { format: l.format.join("/") })), l.pasteable && a.push(r("d.upload.pasteable")), a.join(r("d.upload.comma"));
118
120
  }), Te = (t) => {
@@ -135,17 +137,17 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
135
137
  }, S = (t) => G.includes(P(t.name)), U = (t) => Se.includes(P(t.name)), A = (t) => t?.uploadStatus === "finished", le = (t) => !l.disabled && A(t), ae = () => {
136
138
  J.value?.$el.querySelector("input")?.click();
137
139
  }, Ue = (t) => {
138
- if (D.value = 0, I.value = [], b.value = "", S(t)) {
140
+ if (V.value = 0, I.value = [], L.value = "", S(t)) {
139
141
  const a = s.value.filter((e) => S(e));
140
- D.value = a.findIndex((e) => e.url === t.url), I.value = a.map((e) => e.url), V.value = !0;
142
+ V.value = a.findIndex((e) => e.url === t.url), I.value = a.map((e) => e.url), E.value = !0;
141
143
  }
142
- U(t) && (b.value = t.url, w.value = !0);
144
+ U(t) && (L.value = t.url, w.value = !0);
143
145
  }, oe = () => {
144
146
  Q.value?.pause(), w.value = !1;
145
147
  }, ne = (t) => {
146
148
  const a = () => {
147
149
  const u = s.value.indexOf(t);
148
- u !== -1 && (s.value.splice(u, 1), z.value = L(s.value), E("change", u, L(s.value)), W?.validate("change"));
150
+ u !== -1 && (s.value.splice(u, 1), D.value = b(s.value), z("change", u, b(s.value)), W?.validate("change"));
149
151
  }, e = async () => {
150
152
  if (!A(t)) {
151
153
  a();
@@ -153,7 +155,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
153
155
  }
154
156
  a();
155
157
  };
156
- $e.confirm(r("d.upload.deleteConfirm"), r("d.upload.tip"), {
158
+ Pe.confirm(r("d.upload.deleteConfirm"), r("d.upload.tip"), {
157
159
  type: "warning"
158
160
  }).then(async () => {
159
161
  await e();
@@ -162,7 +164,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
162
164
  }, Ae = (t) => {
163
165
  O.success(r("d.upload.fileSuccess", { file: t.name }));
164
166
  const a = s.value.every((e) => e.uploadStatus === "finished");
165
- E("success", t, a);
167
+ z("success", t, a);
166
168
  }, Fe = (t, a) => {
167
169
  const e = P(t.name);
168
170
  if (e) {
@@ -171,22 +173,22 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
171
173
  return a || O.error(r("d.upload.fileFormat", { file: t.name, format: l.format.join("/") })), !1;
172
174
  }
173
175
  return !0;
174
- }, Me = (t) => t.size > l.maxSize * 1024 * 1024 ? (O.error(r("d.upload.fileLessThan", { file: t.name, size: l.maxSize })), !1) : !0, Ee = (t, a) => {
176
+ }, Me = (t) => t.size > l.maxSize * 1024 * 1024 ? (O.error(r("d.upload.fileLessThan", { file: t.name, size: l.maxSize })), !1) : !0, ze = (t, a) => {
175
177
  if (!a)
176
178
  return;
177
179
  const { loaded: e = 0, total: u = 0 } = t || {};
178
180
  u > 0 && (a.percentage = Math.floor(e / u * 100));
179
- }, se = (t, a) => (Fe(t, a) && Me(t) && ze(t), !1), ze = async (t) => {
181
+ }, se = (t, a) => (Fe(t, a) && Me(t) && De(t), !1), De = async (t) => {
180
182
  if (Y.value)
181
183
  return !1;
182
184
  x.value || j();
183
185
  const a = new FormData();
184
186
  a.append("file", t), we(l.beforeUpload) && l.beforeUpload(t, a);
185
- const e = {
187
+ const e = Ee({
186
188
  uploadStatus: "processing",
187
189
  percentage: 0,
188
190
  name: t.name
189
- };
191
+ });
190
192
  s.value.push(e);
191
193
  const u = s.value.length - 1;
192
194
  X.value++;
@@ -196,7 +198,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
196
198
  url: l.url,
197
199
  method: "post",
198
200
  data: a,
199
- onUploadProgress: (H) => Ee(H, e)
201
+ onUploadProgress: (H) => ze(H, e)
200
202
  }), R = ce?.data || ce;
201
203
  if (R && m() !== -1) {
202
204
  const {
@@ -219,10 +221,10 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
219
221
  } catch {
220
222
  m() !== -1 && s.value.splice(m(), 1);
221
223
  } finally {
222
- X.value--, z.value = L(s.value), E("change", u, L(s.value)), W?.validate("change");
224
+ X.value--, D.value = b(s.value), z("change", u, b(s.value)), W?.validate("change");
223
225
  }
224
226
  }, ie = (t) => {
225
- t?.url && qe(t.url, t.name);
227
+ t?.url && Oe(t.url, t.name);
226
228
  }, j = () => {
227
229
  x.value = !x.value;
228
230
  }, re = (t) => {
@@ -236,44 +238,44 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
236
238
  }, ue = (t) => {
237
239
  !B.value || !t?.url || (S(t) || U(t) ? Ue(t) : ie(t));
238
240
  }, de = () => {
239
- we(l.downloadAllMethod) ? l.downloadAllMethod(L(s.value)) : s.value.forEach((t) => {
241
+ we(l.downloadAllMethod) ? l.downloadAllMethod(b(s.value)) : s.value.forEach((t) => {
240
242
  ie(t);
241
243
  });
242
244
  };
243
245
  return Ve(
244
- z,
246
+ D,
245
247
  (t) => {
246
248
  Te(t);
247
249
  },
248
250
  { immediate: !0 }
249
- ), De(() => {
251
+ ), Ie(() => {
250
252
  document.addEventListener("paste", re);
251
- }), Ie(() => {
253
+ }), Ne(() => {
252
254
  document.removeEventListener("paste", re);
253
255
  }), (t, a) => (o(), f("div", {
254
- class: Ne(["d-upload", Ce.value])
256
+ class: Be(["d-upload", Ce.value])
255
257
  }, [
256
- d(n(Pe), {
258
+ d(n(je), {
257
259
  ref_key: "uploadRef",
258
260
  ref: J,
259
261
  style: { display: "none" },
260
262
  "show-file-list": !1,
261
263
  "file-list": s.value,
262
- accept: Le.value,
264
+ accept: be.value,
263
265
  "before-upload": se,
264
266
  "with-credentials": "",
265
267
  multiple: "",
266
268
  action: "/"
267
269
  }, null, 8, ["file-list", "accept"]),
268
- V.value ? (o(), c(n(je), {
270
+ E.value ? (o(), c(n(Re), {
269
271
  key: 0,
270
272
  "url-list": I.value,
271
- "initial-index": D.value,
273
+ "initial-index": V.value,
272
274
  "hide-on-click-modal": "",
273
275
  teleported: "",
274
- onClose: a[0] || (a[0] = (e) => V.value = !1)
276
+ onClose: a[0] || (a[0] = (e) => E.value = !1)
275
277
  }, null, 8, ["url-list", "initial-index"])) : p("", !0),
276
- w.value ? (o(), c(n(Re), {
278
+ w.value ? (o(), c(n(He), {
277
279
  key: 1,
278
280
  modelValue: w.value,
279
281
  "onUpdate:modelValue": a[1] || (a[1] = (e) => w.value = e),
@@ -292,20 +294,20 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
292
294
  })
293
295
  ]),
294
296
  default: i(() => [
295
- _("div", at, [
296
- b.value ? (o(), f("video", {
297
+ _("div", ot, [
298
+ L.value ? (o(), f("video", {
297
299
  key: 0,
298
300
  ref_key: "videoRef",
299
301
  ref: Q,
300
- src: b.value,
302
+ src: L.value,
301
303
  controls: "",
302
304
  class: "preview-video"
303
- }, null, 8, ot)) : p("", !0)
305
+ }, null, 8, nt)) : p("", !0)
304
306
  ])
305
307
  ]),
306
308
  _: 1
307
309
  }, 8, ["modelValue", "title"])) : p("", !0),
308
- T.value ? (o(), f("div", nt, [
310
+ T.value ? (o(), f("div", st, [
309
311
  $.value ? (o(), c(n(M), {
310
312
  key: 0,
311
313
  onClick: ae
@@ -332,7 +334,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
332
334
  class: "card",
333
335
  style: F(te.value)
334
336
  }, [
335
- g.showDownloadAll && B.value ? (o(), f("div", st, [
337
+ g.showDownloadAll && B.value ? (o(), f("div", it, [
336
338
  d(n(M), {
337
339
  type: "primary",
338
340
  link: "",
@@ -351,30 +353,30 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
351
353
  onClick: (m) => ue(e)
352
354
  }, [
353
355
  A(e) ? (o(), f(q, { key: 0 }, [
354
- S(e) ? (o(), c(n(He), {
356
+ S(e) ? (o(), c(n(qe), {
355
357
  key: 0,
356
358
  src: e.url,
357
359
  fit: "cover"
358
360
  }, null, 8, ["src"])) : U(e) ? (o(), c(n(h), { key: 1 }, {
359
361
  default: i(() => [
360
- d(Xe)
362
+ d(Ge)
361
363
  ]),
362
364
  _: 1
363
365
  })) : (o(), c(n(h), { key: 2 }, {
364
366
  default: i(() => [
365
- d(We)
367
+ d(Ye)
366
368
  ]),
367
369
  _: 1
368
370
  })),
369
- _("div", rt, [
371
+ _("div", ut, [
370
372
  S(e) || U(e) ? (o(), c(n(h), { key: 0 }, {
371
373
  default: i(() => [
372
- d(Qe)
374
+ d(We)
373
375
  ]),
374
376
  _: 1
375
377
  })) : (o(), c(n(h), { key: 1 }, {
376
378
  default: i(() => [
377
- d(Je)
379
+ d(Qe)
378
380
  ]),
379
381
  _: 1
380
382
  })),
@@ -383,7 +385,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
383
385
  onClick: he((m) => ne(e), ["stop"])
384
386
  }, {
385
387
  default: i(() => [
386
- d(Ze)
388
+ d(et)
387
389
  ]),
388
390
  _: 1
389
391
  }, 8, ["onClick"])) : p("", !0)
@@ -395,7 +397,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
395
397
  "stroke-width": 5,
396
398
  "show-text": !1
397
399
  }, null, 8, ["percentage"]))
398
- ], 12, it))), 128)),
400
+ ], 12, rt))), 128)),
399
401
  $.value ? (o(), f("div", {
400
402
  key: 1,
401
403
  class: "card-item",
@@ -404,7 +406,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
404
406
  }, [
405
407
  d(n(h), null, {
406
408
  default: i(() => [
407
- d(Ye)
409
+ d(Ze)
408
410
  ]),
409
411
  _: 1
410
412
  })
@@ -413,8 +415,8 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
413
415
  $.value && g.showTip ? (o(), f("p", {
414
416
  key: 4,
415
417
  class: "tip",
416
- innerHTML: be.value
417
- }, null, 8, ut)) : p("", !0),
418
+ innerHTML: Le.value
419
+ }, null, 8, dt)) : p("", !0),
418
420
  T.value && N.value.length ? (o(), f("div", {
419
421
  key: 5,
420
422
  style: F(te.value),
@@ -424,7 +426,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
424
426
  key: e.id || `${e.name}-${u}`,
425
427
  class: "list-item"
426
428
  }, [
427
- _("div", dt, [
429
+ _("div", ct, [
428
430
  d(n(K), {
429
431
  type: "primary",
430
432
  underline: "never",
@@ -441,7 +443,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
441
443
  onClick: he((m) => ne(e), ["stop"])
442
444
  }, {
443
445
  default: i(() => [
444
- d(Ge)
446
+ d(Je)
445
447
  ]),
446
448
  _: 1
447
449
  }, 8, ["onClick"])) : p("", !0)
@@ -453,7 +455,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
453
455
  }, null, 8, ["percentage"]))
454
456
  ]))), 128))
455
457
  ], 4)) : p("", !0),
456
- s.value.length > g.maxShow ? (o(), f("div", ct, [
458
+ s.value.length > g.maxShow ? (o(), f("div", pt, [
457
459
  x.value ? (o(), c(n(K), {
458
460
  key: 0,
459
461
  type: "primary",
@@ -464,7 +466,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
464
466
  _("span", null, k(n(r)("d.upload.collapse")), 1),
465
467
  d(n(h), null, {
466
468
  default: i(() => [
467
- d(Ke)
469
+ d(Xe)
468
470
  ]),
469
471
  _: 1
470
472
  })
@@ -480,7 +482,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
480
482
  _("span", null, k(n(r)("d.upload.expand")), 1),
481
483
  d(n(h), null, {
482
484
  default: i(() => [
483
- d(Oe)
485
+ d(Ke)
484
486
  ]),
485
487
  _: 1
486
488
  })
@@ -490,7 +492,7 @@ const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
490
492
  ])) : p("", !0)
491
493
  ], 2));
492
494
  }
493
- }), Et = /* @__PURE__ */ et(pt, [["__scopeId", "data-v-322bef31"]]);
495
+ }), Vt = /* @__PURE__ */ tt(ft, [["__scopeId", "data-v-4214bfeb"]]);
494
496
  export {
495
- Et as default
497
+ Vt as default
496
498
  };
package/index.js CHANGED
@@ -2,22 +2,24 @@ import { install as o } from "./install.js";
2
2
  import "./components/index.js";
3
3
  import "./hooks/index.js";
4
4
  import { setComponentRegistry as x, setGlobalConfig as i } from "./config/index.js";
5
- import { DCopy as s } from "./components/copy/index.js";
6
- import { DFoldText as n } from "./components/fold-text/index.js";
7
- import { DIconTip as c } from "./components/icon-tip/index.js";
8
- import { DUpload as u } from "./components/upload/index.js";
9
- import { useActivated as g } from "./hooks/use-activated/index.js";
10
- import { useLocale as T } from "./hooks/use-locale/index.js";
5
+ import { DCopy as n } from "./components/copy/index.js";
6
+ import { DFoldText as a } from "./components/fold-text/index.js";
7
+ import { DIcon as d } from "./components/icon/index.js";
8
+ import { DIconTip as u } from "./components/icon-tip/index.js";
9
+ import { DUpload as g } from "./components/upload/index.js";
10
+ import { useActivated as I } from "./hooks/use-activated/index.js";
11
+ import { useLocale as b } from "./hooks/use-locale/index.js";
11
12
  const p = { install: o };
12
13
  export {
13
- s as DCopy,
14
- n as DFoldText,
15
- c as DIconTip,
16
- u as DUpload,
14
+ n as DCopy,
15
+ a as DFoldText,
16
+ d as DIcon,
17
+ u as DIconTip,
18
+ g as DUpload,
17
19
  p as default,
18
20
  o as install,
19
21
  x as setComponentRegistry,
20
22
  i as setGlobalConfig,
21
- g as useActivated,
22
- T as useLocale
23
+ I as useActivated,
24
+ b as useLocale
23
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geekplus-digital-ui",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",