geekplus-digital-ui 0.1.33 → 0.1.35

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.
@@ -2,13 +2,13 @@ import { useLocale as e } from "../../../hooks/use-locale/index.js";
2
2
  import "../../../hooks/index.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
4
  import n from "../../icons/copy-light.js";
5
- import './copy.vue_vue_type_style_index_0_scoped_5cfb3191_lang.css';/* empty css */
5
+ import './copy.vue_vue_type_style_index_0_scoped_e06a10af_lang.css';/* empty css */
6
6
  import r from "../../icon/index.js";
7
7
  import "../../index.js";
8
- import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createVNode as c, normalizeClass as l, normalizeStyle as u, onBeforeUnmount as d, onMounted as f, openBlock as p, ref as m, renderSlot as h, unref as g, withCtx as _, withModifiers as v } from "vue";
9
- import { useClipboard as y } from "@vueuse/core";
10
- import { ElLink as b, ElMessage as x } from "element-plus";
11
- var S = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DCopy" }, {
8
+ import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createVNode as c, normalizeClass as l, normalizeStyle as u, onBeforeUnmount as d, onMounted as f, openBlock as p, ref as m, renderSlot as h, toRef as g, unref as _, withCtx as v, withModifiers as y } from "vue";
9
+ import { useClipboard as b } from "@vueuse/core";
10
+ import { ElLink as x, ElMessage as S } from "element-plus";
11
+ var C = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DCopy" }, {
12
12
  __name: "copy",
13
13
  props: {
14
14
  text: { type: String },
@@ -19,51 +19,51 @@ var S = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DCopy" }, {
19
19
  icon: { type: String },
20
20
  triggerElement: { type: String }
21
21
  },
22
- setup(t, { expose: S }) {
23
- let C = t, w = m(null), T = m(!1), { copy: E } = y({ source: C.text }), { t: D } = e(), O = i(() => {
24
- let e = w.value?.$el ?? w.value;
25
- if (!C.triggerElement || !e) return null;
22
+ setup(t, { expose: C }) {
23
+ let w = t, T = m(null), E = m(!1), { copy: D } = b({ source: g(w, "text") }), { t: O } = e(), k = i(() => {
24
+ let e = T.value?.$el ?? T.value;
25
+ if (!w.triggerElement || !e) return null;
26
26
  let t = e.parentNode;
27
27
  for (; t;) {
28
- if (t.matches(C.triggerElement)) return t;
28
+ if (t.matches(w.triggerElement)) return t;
29
29
  t = t.parentNode;
30
30
  }
31
31
  return null;
32
- }), k = i(() => ({ display: C.triggerElement && !T.value ? "none" : "" })), A = () => {
33
- E().then(() => {
34
- x.success(D("d.copy.success"));
32
+ }), A = i(() => ({ display: w.triggerElement && !E.value ? "none" : "" })), j = () => {
33
+ D().then(() => {
34
+ S.success(O("d.copy.success"));
35
35
  });
36
- }, j = () => {
37
- T.value = !0;
38
36
  }, M = () => {
39
- T.value = !1;
37
+ E.value = !0;
38
+ }, N = () => {
39
+ E.value = !1;
40
40
  };
41
41
  return f(() => {
42
- O.value && (O.value.addEventListener("mouseenter", j), O.value.addEventListener("mouseleave", M));
42
+ k.value && (k.value.addEventListener("mouseenter", M), k.value.addEventListener("mouseleave", N));
43
43
  }), d(() => {
44
- O.value && (O.value.removeEventListener("mouseenter", j), O.value.removeEventListener("mouseleave", M));
45
- }), S({
46
- rootRef: w,
47
- handleCopy: A
48
- }), (e, i) => (p(), a(g(b), {
44
+ k.value && (k.value.removeEventListener("mouseenter", M), k.value.removeEventListener("mouseleave", N));
45
+ }), C({
46
+ rootRef: T,
47
+ handleCopy: j
48
+ }), (e, i) => (p(), a(_(x), {
49
49
  ref_key: "rootRef",
50
- ref: w,
50
+ ref: T,
51
51
  class: "d-copy",
52
52
  type: t.type,
53
53
  underline: "never",
54
- style: u(k.value),
55
- onClick: v(A, ["stop"])
54
+ style: u(A.value),
55
+ onClick: y(j, ["stop"])
56
56
  }, {
57
- default: _(() => [t.icon ? (p(), s("i", {
57
+ default: v(() => [t.icon ? (p(), s("i", {
58
58
  key: 0,
59
59
  class: l(t.icon)
60
- }, null, 2)) : (p(), a(g(r), { key: 1 }, {
61
- default: _(() => [c(n)]),
60
+ }, null, 2)) : (p(), a(_(r), { key: 1 }, {
61
+ default: v(() => [c(n)]),
62
62
  _: 1
63
63
  })), e.$slots.default ? h(e.$slots, "default", { key: 2 }, void 0, !0) : o("", !0)]),
64
64
  _: 3
65
65
  }, 8, ["type", "style"]));
66
66
  }
67
- }), [["__scopeId", "data-v-5cfb3191"]]);
67
+ }), [["__scopeId", "data-v-e06a10af"]]);
68
68
  //#endregion
69
- export { S as default };
69
+ export { C as default };
@@ -0,0 +1 @@
1
+ .d-copy[data-v-e06a10af] .el-link__inner{gap:4px}
@@ -1,4 +1,5 @@
1
1
  export const DEditor: import('vue').DefineComponent<{}, {
2
+ editorRef: import('vue').Ref<any, any>;
2
3
  $emit: (event: "update:model-value", ...args: any[]) => void;
3
4
  disabled: boolean;
4
5
  modelValue: string;
@@ -20,7 +21,5 @@ export const DEditor: import('vue').DefineComponent<{}, {
20
21
  readonly editorConfig?: Record<string, any>;
21
22
  readonly placeholder?: string;
22
23
  };
23
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
24
- rootRef: HTMLDivElement;
25
- }, HTMLDivElement>;
24
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
26
25
  export default DEditor;
@@ -1,4 +1,5 @@
1
1
  declare const _default: import('vue').DefineComponent<{}, {
2
+ editorRef: import('vue').Ref<any, any>;
2
3
  $emit: (event: "update:model-value", ...args: any[]) => void;
3
4
  disabled: boolean;
4
5
  modelValue: string;
@@ -20,7 +21,5 @@ declare const _default: import('vue').DefineComponent<{}, {
20
21
  readonly editorConfig?: Record<string, any>;
21
22
  readonly placeholder?: string;
22
23
  };
23
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
24
- rootRef: HTMLDivElement;
25
- }, HTMLDivElement>;
24
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
26
25
  export default _default;
@@ -0,0 +1 @@
1
+ .d-editor[data-v-051c358d]{width:100%}.d-editor.w-e-full-screen-container[data-v-051c358d]{z-index:1000}.d-editor .toolbar-container[data-v-051c358d]{border-bottom:1px solid var(--el-border-color)}.d-editor .toolbar-container[data-v-051c358d] .w-e-toolbar{border-radius:4px}.d-editor .toolbar-container[data-v-051c358d] .w-e-drop-panel{z-index:100}.d-editor .editor-container[data-v-051c358d]{min-height:var(--minHeight);background:var(--el-fill-color-blank);border-radius:4px}.d-editor .editor-container[data-v-051c358d] p[id^=w-e-element-paragraph-]{margin:10px 0}.d-editor .editor-container[data-v-051c358d] .w-e-text-placeholder{font-size:14px;font-style:normal;line-height:normal;top:11px}.d-editor .editor-container[data-v-051c358d] .w-e-image-container{width:500px}.d-editor .editor-container[data-v-051c358d] pre code{text-shadow:none}.d-editor.editor-disabled[data-v-051c358d]:not(.editor-border) div[id^=w-e-textarea-]{padding:0}.d-editor.editor-disabled[data-v-051c358d]:not(.editor-border) p[id^=w-e-element-paragraph-]:first-child{margin-top:0}.d-editor.editor-disabled[data-v-051c358d]:not(.editor-border) p[id^=w-e-element-paragraph-]:last-child{margin-bottom:0}.editor-border[data-v-051c358d]{border:1px solid var(--el-border-color);background:var(--el-bg-color);border-radius:4px;transition:border-color .2s cubic-bezier(.645,.045,.355,1)}.editor-border[data-v-051c358d]:hover{border-color:var(--el-text-color-disabled)}.editor-disabled .editor-container[data-v-051c358d] img{cursor:zoom-in}.el-form-item.is-error .editor-border[data-v-051c358d]{border:1px solid var(--el-color-danger)}
@@ -1,7 +1,7 @@
1
1
  import { useLocale as e } from "../../../hooks/use-locale/index.js";
2
2
  import "../../../hooks/index.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- import './editor.vue_vue_type_style_index_0_scoped_4d9761f4_lang.css';import './editor.css';/* empty css */
4
+ import './editor.vue_vue_type_style_index_0_scoped_051c358d_lang.css';import './editor.css';/* empty css */
5
5
  import n from "./code-collapse.js";
6
6
  /* empty css */
7
7
  import { computed as r, createApp as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createVNode as c, nextTick as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, openBlock as p, ref as m, unref as h, vShow as g, watch as _, withDirectives as v } from "vue";
@@ -46,14 +46,22 @@ var w = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DEditor" }, {
46
46
  placeholder: String
47
47
  },
48
48
  emits: ["update:model-value"],
49
- setup(t, { emit: w }) {
50
- let T = t, E = w, D = m(null), O = m(null), k = m(""), A = m(""), j = m(null), M = m(0), N = m(!1), P = m([]), F = m(0), I = /* @__PURE__ */ new Map(), { t: L, getLocale: R } = e(), { formItem: z } = b(), B = r(() => R()), V = (e) => {
51
- O.value = Object.seal(e);
52
- }, H = (e) => {
53
- let t = e;
54
- t === "<p><br></p>" && (t = ""), t !== A.value && (j.value = t, A.value = t, E("update:model-value", t), z?.validate("change"), z?.validate("blur"));
49
+ setup(t, { expose: w, emit: T }) {
50
+ let E = t, D = T, O = m(null), k = m(""), A = m(""), j = m(null), M = m(0), N = m(!1), P = m([]), F = m(0), I = /* @__PURE__ */ new Map(), { t: L, getLocale: R } = e(), { formItem: z } = b(), B = r(() => R()), V = (e) => e === "<p><br></p>" ? "" : e || "", H = () => {
51
+ if (E.disabled) {
52
+ l(() => {
53
+ J(), X();
54
+ });
55
+ return;
56
+ }
57
+ J();
55
58
  }, U = (e) => {
56
- if (!T.disabled) return;
59
+ O.value = Object.seal(e);
60
+ }, W = (e) => {
61
+ let t = V(e);
62
+ t !== A.value && (j.value = t, A.value = t, D("update:model-value", t), z?.validate("change"), z?.validate("blur"));
63
+ }, G = (e) => {
64
+ if (!E.disabled) return;
57
65
  let t = e?.target?.closest?.("img");
58
66
  if (!t) return;
59
67
  let n = O.value?.getEditableContainer?.(), r = Array.from(n?.querySelectorAll?.("img") || []);
@@ -62,19 +70,19 @@ var w = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DEditor" }, {
62
70
  if (a.length === 0) return;
63
71
  let o = i(t), s = a.findIndex((e) => e === o);
64
72
  P.value = a, F.value = s >= 0 ? s : 0, N.value = !0, e?.stopPropagation?.();
65
- }, W = (e) => {
66
- if (T.disabled) {
67
- U(e);
73
+ }, K = (e) => {
74
+ if (E.disabled) {
75
+ G(e);
68
76
  return;
69
77
  }
70
78
  O.value?.focus?.();
71
- }, G = () => {
79
+ }, q = () => {
72
80
  N.value = !1, P.value = [], F.value = 0;
73
- }, K = () => {
81
+ }, J = () => {
74
82
  I.forEach(({ app: e, host: t, pre: n }) => {
75
83
  t?.isConnected && n?.isConnected && t.parentNode && t.parentNode.insertBefore(n, t), e.unmount(), t?.remove();
76
84
  }), I.clear();
77
- }, q = (e) => {
85
+ }, Y = (e) => {
78
86
  let t = document.createElement("div");
79
87
  e.parentNode?.insertBefore(t, e);
80
88
  let r = i(n), a = r.mount(t);
@@ -83,31 +91,31 @@ var w = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DEditor" }, {
83
91
  host: t,
84
92
  pre: e
85
93
  });
86
- }, J = () => {
94
+ }, X = () => {
87
95
  let e = O.value?.getEditableContainer?.()?.querySelectorAll("pre");
88
96
  e && e.forEach((e) => {
89
- e.parentElement?.tagName !== "DETAILS" && q(e);
97
+ e.parentElement?.tagName !== "DETAILS" && Y(e);
90
98
  });
91
- }, Y = r(() => ({ ...T.toolbarConfig })), X = r(() => ({
92
- placeholder: T.disabled ? "" : T.placeholder || L("d.editor.placeholder"),
93
- readOnly: T.disabled,
99
+ }, Z = r(() => ({ ...E.toolbarConfig })), Q = r(() => ({
100
+ placeholder: E.disabled ? "" : E.placeholder || L("d.editor.placeholder"),
101
+ readOnly: E.disabled,
94
102
  autoFocus: !1,
95
- ...T.editorConfig
96
- })), Z = r(() => ({ "--minHeight": T.disabled ? "" : `${T.minHeight}px` }));
103
+ ...E.editorConfig
104
+ })), $ = r(() => ({ "--minHeight": E.disabled ? "" : `${E.minHeight}px` }));
97
105
  return _(B, (e) => {
98
106
  x(e === "zh-cn" ? "zh-CN" : "en");
99
- }, { immediate: !0 }), _(() => T.disabled, () => {
100
- K(), M.value++;
101
- }), _(() => T.modelValue, () => {
102
- let e = j.value === T.modelValue;
103
- A.value = T.modelValue, e ? j.value = null : k.value === T.modelValue ? M.value++ : k.value = T.modelValue, T.disabled ? l(() => {
104
- K(), J();
105
- }) : K();
107
+ }, { immediate: !0 }), _(() => E.disabled, () => {
108
+ J(), M.value++;
109
+ }), _(() => E.modelValue, (e) => {
110
+ let t = V(e), n = A.value, r = j.value === t;
111
+ if (A.value = t, j.value = null, !r && O.value && t !== n) {
112
+ O.value = null, k.value = t, M.value++, H();
113
+ return;
114
+ }
115
+ k.value = t, H();
106
116
  }, { immediate: !0 }), f(() => {
107
- K(), O.value?.destroy?.();
108
- }), (e, n) => (p(), s("div", {
109
- ref_key: "rootRef",
110
- ref: D,
117
+ J(), O.value?.destroy?.();
118
+ }), w({ editorRef: O }), (e, n) => (p(), s("div", {
111
119
  key: M.value,
112
120
  class: u(["d-editor", {
113
121
  "editor-border": t.border,
@@ -117,7 +125,7 @@ var w = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DEditor" }, {
117
125
  v(c(h(C), {
118
126
  class: "toolbar-container",
119
127
  editor: O.value,
120
- "default-config": Y.value,
128
+ "default-config": Z.value,
121
129
  mode: t.mode
122
130
  }, null, 8, [
123
131
  "editor",
@@ -126,13 +134,13 @@ var w = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DEditor" }, {
126
134
  ]), [[g, t.showToolbar && !t.disabled]]),
127
135
  c(h(S), {
128
136
  class: "editor-container",
129
- style: d(Z.value),
137
+ style: d($.value),
130
138
  "model-value": k.value,
131
- "default-config": X.value,
139
+ "default-config": Q.value,
132
140
  mode: t.mode,
133
- onOnCreated: V,
134
- "onUpdate:modelValue": H,
135
- onClick: W
141
+ onOnCreated: U,
142
+ "onUpdate:modelValue": W,
143
+ onClick: K
136
144
  }, null, 8, [
137
145
  "style",
138
146
  "model-value",
@@ -145,10 +153,10 @@ var w = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DEditor" }, {
145
153
  "initial-index": F.value,
146
154
  "hide-on-click-modal": "",
147
155
  teleported: "",
148
- onClose: G
156
+ onClose: q
149
157
  }, null, 8, ["url-list", "initial-index"])) : o("", !0)
150
158
  ], 2));
151
159
  }
152
- }), [["__scopeId", "data-v-4d9761f4"]]);
160
+ }), [["__scopeId", "data-v-051c358d"]]);
153
161
  //#endregion
154
162
  export { w as default };
@@ -1,4 +1,7 @@
1
1
  export const DUpload: import('vue').DefineComponent<{}, {
2
+ uploadRef: import('vue').Ref<any, any>;
3
+ triggerUpload: () => void;
4
+ downloadAll: () => void;
2
5
  $emit: (event: "success" | "change", ...args: any[]) => void;
3
6
  disabled: boolean;
4
7
  size: string;
@@ -13,21 +13,21 @@ import ie from "../../icons/file-light.js";
13
13
  import ae from "../../icons/plus-light.js";
14
14
  import oe from "../../icons/trash-light.js";
15
15
  import se from "../../icons/image-light.js";
16
- import './upload.vue_vue_type_style_index_1_lang.css';import './upload.vue_vue_type_style_index_0_scoped_0552ceda_lang.css';/* empty css */
16
+ import './upload.vue_vue_type_style_index_1_lang.css';import './upload.vue_vue_type_style_index_0_scoped_ddbeb9ca_lang.css';/* empty css */
17
17
  /* empty css */
18
18
  import "../../index.js";
19
19
  import { isFunction as ce } from "lodash-es";
20
- import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, mergeModels as m, normalizeClass as le, normalizeStyle as h, onBeforeUnmount as ue, onMounted as de, openBlock as g, reactive as fe, ref as _, renderList as v, toDisplayString as y, unref as b, useModel as x, watch as pe, withCtx as S, withModifiers as me } from "vue";
21
- import { ElButton as C, ElDialog as he, ElImage as ge, ElImageViewer as _e, ElLink as w, ElMessage as T, ElMessageBox as ve, ElProgress as E, ElUpload as ye, useFormItem as be } from "element-plus";
22
- import { saveAs as xe } from "file-saver";
20
+ import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, mergeModels as m, normalizeClass as le, normalizeStyle as h, onBeforeUnmount as ue, onMounted as de, openBlock as g, reactive as fe, ref as _, renderList as v, toDisplayString as y, unref as b, useModel as pe, watch as me, withCtx as x, withModifiers as he } from "vue";
21
+ import { ElButton as S, ElDialog as ge, ElImage as _e, ElImageViewer as ve, ElLink as C, ElMessage as w, ElMessageBox as ye, ElProgress as T, ElUpload as be, useFormItem as xe } from "element-plus";
22
+ import { saveAs as Se } from "file-saver";
23
23
  //#region packages/components/upload/src/upload.vue
24
- var Se = { class: "d-upload__preview" }, Ce = ["src"], we = {
24
+ var Ce = { class: "d-upload__preview" }, we = ["src"], Te = {
25
25
  key: 2,
26
26
  class: "header"
27
- }, Te = ["onClick"], Ee = { class: "card-cover" }, De = ["innerHTML"], Oe = { class: "file-row" }, ke = {
27
+ }, Ee = ["onClick"], De = { class: "card-cover" }, Oe = ["innerHTML"], ke = { class: "file-row" }, Ae = {
28
28
  key: 6,
29
29
  class: "expand-toggle"
30
- }, D = /* @__PURE__ */ n(/* @__PURE__ */ Object.assign({ name: "DUpload" }, {
30
+ }, E = /* @__PURE__ */ n(/* @__PURE__ */ Object.assign({ name: "DUpload" }, {
31
31
  __name: "upload",
32
32
  props: /* @__PURE__ */ m({
33
33
  domain: {
@@ -98,23 +98,23 @@ var Se = { class: "d-upload__preview" }, Ce = ["src"], we = {
98
98
  uploadingCountModifiers: {}
99
99
  }),
100
100
  emits: /* @__PURE__ */ m(["change", "success"], ["update:modelValue", "update:uploadingCount"]),
101
- setup(n, { emit: m }) {
102
- let D = n, O = m, k = x(n, "modelValue"), Ae = x(n, "uploadingCount"), A = [
101
+ setup(n, { expose: m, emit: E }) {
102
+ let D = n, je = E, O = pe(n, "modelValue"), Me = pe(n, "uploadingCount"), Ne = [
103
103
  "jpg",
104
104
  "jpeg",
105
105
  "png",
106
106
  "gif"
107
- ], je = ["mp4"], j = _([]), M = _(!1), N = _(!1), P = _(0), F = _([]), I = _(""), L = _(!1), R = _(null), z = _(null), { t: B } = e(), Me = t(), { formItem: Ne } = be(), V = s(() => L.value ? j.value : j.value.slice(0, D.maxShow)), H = s(() => j.value.length > 0), U = s(() => !D.disabled && !G.value), W = s(() => D.showType === "list"), Pe = s(() => U.value && W.value || D.showDownloadAll && H.value), G = s(() => j.value.length >= D.maxNumber), Fe = s(() => W.value ? "is-list" : "is-card"), Ie = s(() => D.format.length ? D.format.map((e) => e.toUpperCase()) : []), Le = s(() => ({
107
+ ], Pe = ["mp4"], k = _([]), A = _(!1), j = _(!1), M = _(0), N = _([]), P = _(""), F = _(!1), I = _(null), L = _(null), { t: R } = e(), Fe = t(), { formItem: Ie } = xe(), z = s(() => F.value ? k.value : k.value.slice(0, D.maxShow)), B = s(() => k.value.length > 0), V = s(() => !D.disabled && !U.value), H = s(() => D.showType === "list"), Le = s(() => V.value && H.value || D.showDownloadAll && B.value), U = s(() => k.value.length >= D.maxNumber), Re = s(() => H.value ? "is-list" : "is-card"), W = s(() => D.format.length ? D.format.map((e) => e.toUpperCase()) : []), G = s(() => ({
108
108
  width: D.size,
109
109
  height: D.size
110
- })), Re = s(() => D.format.map((e) => `.${e}`).join(",")), ze = s(() => ({
110
+ })), ze = s(() => D.format.map((e) => `.${e}`).join(",")), K = s(() => ({
111
111
  maxHeight: D.scrollHeight,
112
112
  overflow: D.scrollHeight ? "auto" : void 0
113
113
  })), Be = s(() => {
114
- let e = D.format.length && D.format.every((e) => A.includes(e)), t = [];
115
- return D.maxSize && !e && t.push(B("d.upload.lessThan", { size: D.maxSize })), D.format.length && t.push(B("d.upload.format", { format: D.format.join("/") })), D.pasteable && t.push(B("d.upload.pasteable")), t.join(B("d.upload.comma"));
114
+ let e = D.format.length && D.format.every((e) => Ne.includes(e)), t = [];
115
+ return D.maxSize && !e && t.push(R("d.upload.lessThan", { size: D.maxSize })), D.format.length && t.push(R("d.upload.format", { format: D.format.join("/") })), D.pasteable && t.push(R("d.upload.pasteable")), t.join(R("d.upload.comma"));
116
116
  }), Ve = (e) => {
117
- j.value.some((e) => e.status === "uploading") || (j.value = e?.map((e) => ({
117
+ k.value.some((e) => e.status === "uploading") || (k.value = e?.map((e) => ({
118
118
  id: e.id,
119
119
  name: e.name || e.docName,
120
120
  docName: e.name || e.docName,
@@ -123,50 +123,50 @@ var Se = { class: "d-upload__preview" }, Ce = ["src"], we = {
123
123
  type: D.docType || e.type || e.docType,
124
124
  docType: D.docType || e.type || e.docType,
125
125
  status: "success"
126
- })) || [], Z());
127
- }, K = (e) => {
126
+ })) || [], Q());
127
+ }, q = (e) => {
128
128
  if (e) {
129
129
  let t = e.split(".");
130
130
  return t[t.length - 1].toLowerCase();
131
131
  }
132
132
  return "";
133
- }, q = (e) => A.includes(K(e.name)), J = (e) => je.includes(K(e.name)), Y = (e) => e?.status === "success", He = (e) => !D.disabled && Y(e), Ue = () => {
134
- R.value?.$el.querySelector("input")?.click();
135
- }, We = (e) => {
136
- if (P.value = 0, F.value = [], I.value = "", q(e)) {
137
- let t = j.value.filter((e) => q(e));
138
- P.value = t.findIndex((t) => t.url === e.url), F.value = t.map((e) => e.url), M.value = !0;
133
+ }, J = (e) => Ne.includes(q(e.name)), Y = (e) => Pe.includes(q(e.name)), X = (e) => e?.status === "success", He = (e) => !D.disabled && X(e), Z = () => {
134
+ I.value?.$el.querySelector("input")?.click();
135
+ }, Ue = (e) => {
136
+ if (M.value = 0, N.value = [], P.value = "", J(e)) {
137
+ let t = k.value.filter((e) => J(e));
138
+ M.value = t.findIndex((t) => t.url === e.url), N.value = t.map((e) => e.url), A.value = !0;
139
139
  }
140
- J(e) && (I.value = e.url, N.value = !0);
141
- }, X = () => {
142
- z.value?.pause(), N.value = !1;
140
+ Y(e) && (P.value = e.url, j.value = !0);
141
+ }, We = () => {
142
+ L.value?.pause(), j.value = !1;
143
143
  }, Ge = (e) => {
144
144
  let t = () => {
145
- let t = j.value.indexOf(e);
146
- t !== -1 && (j.value.splice(t, 1), Z(), Xe(e));
145
+ let t = k.value.indexOf(e);
146
+ t !== -1 && (k.value.splice(t, 1), Q(), Xe(e));
147
147
  }, n = async () => {
148
- if (!Y(e)) {
148
+ if (!X(e)) {
149
149
  t();
150
150
  return;
151
151
  }
152
152
  t();
153
153
  };
154
- ve.confirm(B("d.upload.deleteConfirm"), B("d.upload.tip"), { type: "warning" }).then(async () => {
154
+ ye.confirm(R("d.upload.deleteConfirm"), R("d.upload.tip"), { type: "warning" }).then(async () => {
155
155
  await n();
156
156
  }).catch(() => {});
157
157
  }, Ke = (e, t) => {
158
- T.success(B("d.upload.fileSuccess", { file: e.name })), O("success", e, t, j.value);
158
+ w.success(R("d.upload.fileSuccess", { file: e.name })), je("success", e, t, k.value);
159
159
  }, qe = (e, t) => {
160
- let n = K(e.name);
160
+ let n = q(e.name);
161
161
  if (n) {
162
162
  let r = n.toUpperCase();
163
- if (Ie.value.length && !Ie.value.includes(r)) return t || T.error(B("d.upload.fileFormat", {
163
+ if (W.value.length && !W.value.includes(r)) return t || w.error(R("d.upload.fileFormat", {
164
164
  file: e.name,
165
165
  format: D.format.join("/")
166
166
  })), !1;
167
167
  }
168
168
  return !0;
169
- }, Je = (e) => e.size > D.maxSize * 1024 * 1024 ? (T.error(B("d.upload.fileLessThan", {
169
+ }, Je = (e) => e.size > D.maxSize * 1024 * 1024 ? (w.error(R("d.upload.fileLessThan", {
170
170
  file: e.name,
171
171
  size: D.maxSize
172
172
  })), !1) : !0, Ye = (e, t) => {
@@ -174,12 +174,12 @@ var Se = { class: "d-upload__preview" }, Ce = ["src"], we = {
174
174
  let { loaded: n = 0, total: r = 0 } = e || {};
175
175
  r > 0 && (t.percentage = Math.floor(n / r * 100));
176
176
  }, Xe = (e) => {
177
- k.value = j.value, O("change", e, j.value), Ne?.validate("change");
178
- }, Z = () => {
179
- Ae.value = j.value.filter((e) => e.status === "uploading").length;
177
+ O.value = k.value, je("change", e, k.value), Ie?.validate("change");
178
+ }, Q = () => {
179
+ Me.value = k.value.filter((e) => e.status === "uploading").length;
180
180
  }, Ze = (e, t) => (qe(e, t) && Je(e) && Qe(e), !1), Qe = async (e) => {
181
- if (G.value) return !1;
182
- L.value || Q();
181
+ if (U.value) return !1;
182
+ F.value || $();
183
183
  let t = new FormData();
184
184
  t.append("file", e);
185
185
  let n = fe({
@@ -187,8 +187,8 @@ var Se = { class: "d-upload__preview" }, Ce = ["src"], we = {
187
187
  percentage: 0,
188
188
  name: e.name
189
189
  });
190
- j.value.push(n), Z();
191
- let r = () => j.value.indexOf(n);
190
+ k.value.push(n), Q();
191
+ let r = () => k.value.indexOf(n);
192
192
  try {
193
193
  let { data: e } = await D.axios({
194
194
  url: D.url,
@@ -208,204 +208,208 @@ var Se = { class: "d-upload__preview" }, Ce = ["src"], we = {
208
208
  docType: D.docType || a,
209
209
  status: "success"
210
210
  }), Ke(i, n);
211
- } else r() !== -1 && j.value.splice(r(), 1);
211
+ } else r() !== -1 && k.value.splice(r(), 1);
212
212
  } catch {
213
- r() !== -1 && j.value.splice(r(), 1);
213
+ r() !== -1 && k.value.splice(r(), 1);
214
214
  } finally {
215
- Z(), Xe(n);
215
+ Q(), Xe(n);
216
216
  }
217
217
  }, $e = (e) => {
218
- e?.url && xe(e.url, e.name);
219
- }, Q = () => {
220
- L.value = !L.value;
218
+ e?.url && Se(e.url, e.name);
219
+ }, $ = () => {
220
+ F.value = !F.value;
221
221
  }, et = (e) => {
222
- if (!D.pasteable || D.disabled || !Me.value) return;
222
+ if (!D.pasteable || D.disabled || !Fe.value) return;
223
223
  let t = e.clipboardData?.items || [];
224
224
  for (let e = 0; e < t.length; e++) {
225
225
  let n = t[e].getAsFile();
226
226
  n && Ze(n, !0);
227
227
  }
228
- }, $ = (e) => {
229
- !H.value || !e?.url || (q(e) || J(e) ? We(e) : $e(e));
230
- }, tt = () => {
231
- ce(D.downloadAllMethod) ? D.downloadAllMethod(j.value) : j.value.forEach((e) => {
228
+ }, tt = (e) => {
229
+ !B.value || !e?.url || (J(e) || Y(e) ? Ue(e) : $e(e));
230
+ }, nt = () => {
231
+ ce(D.downloadAllMethod) ? D.downloadAllMethod(k.value) : k.value.forEach((e) => {
232
232
  $e(e);
233
233
  });
234
234
  };
235
- return pe(k, (e) => {
235
+ return me(O, (e) => {
236
236
  Ve(e);
237
237
  }, { immediate: !0 }), de(() => {
238
238
  document.addEventListener("paste", et);
239
239
  }), ue(() => {
240
240
  document.removeEventListener("paste", et);
241
- }), (e, t) => (g(), u("div", { class: le(["d-upload", Fe.value]) }, [
242
- p(b(ye), {
241
+ }), m({
242
+ uploadRef: I,
243
+ triggerUpload: Z,
244
+ downloadAll: nt
245
+ }), (e, t) => (g(), u("div", { class: le(["d-upload", Re.value]) }, [
246
+ p(b(be), {
243
247
  ref_key: "uploadRef",
244
- ref: R,
248
+ ref: I,
245
249
  style: { display: "none" },
246
250
  "show-file-list": !1,
247
- "file-list": j.value,
248
- accept: Re.value,
251
+ "file-list": k.value,
252
+ accept: ze.value,
249
253
  "before-upload": Ze,
250
254
  "with-credentials": "",
251
255
  multiple: "",
252
256
  action: "/"
253
257
  }, null, 8, ["file-list", "accept"]),
254
- M.value ? (g(), c(b(_e), {
258
+ A.value ? (g(), c(b(ve), {
255
259
  key: 0,
256
- "url-list": F.value,
257
- "initial-index": P.value,
260
+ "url-list": N.value,
261
+ "initial-index": M.value,
258
262
  "hide-on-click-modal": "",
259
263
  teleported: "",
260
- onClose: t[0] ||= (e) => M.value = !1
264
+ onClose: t[0] ||= (e) => A.value = !1
261
265
  }, null, 8, ["url-list", "initial-index"])) : l("", !0),
262
- N.value ? (g(), c(b(he), {
266
+ j.value ? (g(), c(b(ge), {
263
267
  key: 1,
264
- modelValue: N.value,
265
- "onUpdate:modelValue": t[1] ||= (e) => N.value = e,
266
- title: b(B)("d.upload.preview"),
268
+ modelValue: j.value,
269
+ "onUpdate:modelValue": t[1] ||= (e) => j.value = e,
270
+ title: b(R)("d.upload.preview"),
267
271
  width: "1200px",
268
272
  "align-center": "",
269
- "before-close": X,
273
+ "before-close": We,
270
274
  "append-to-body": ""
271
275
  }, {
272
- footer: S(() => [p(b(C), { onClick: X }, {
273
- default: S(() => [f(y(b(B)("d.upload.close")), 1)]),
276
+ footer: x(() => [p(b(S), { onClick: We }, {
277
+ default: x(() => [f(y(b(R)("d.upload.close")), 1)]),
274
278
  _: 1
275
279
  })]),
276
- default: S(() => [d("div", Se, [I.value ? (g(), u("video", {
280
+ default: x(() => [d("div", Ce, [P.value ? (g(), u("video", {
277
281
  key: 0,
278
282
  ref_key: "videoRef",
279
- ref: z,
280
- src: I.value,
283
+ ref: L,
284
+ src: P.value,
281
285
  controls: "",
282
286
  class: "preview-video"
283
- }, null, 8, Ce)) : l("", !0)])]),
287
+ }, null, 8, we)) : l("", !0)])]),
284
288
  _: 1
285
289
  }, 8, ["modelValue", "title"])) : l("", !0),
286
- Pe.value ? (g(), u("div", we, [U.value && W.value ? (g(), c(b(C), {
290
+ Le.value ? (g(), u("div", Te, [V.value && H.value ? (g(), c(b(S), {
287
291
  key: 0,
288
- onClick: Ue
292
+ onClick: Z
289
293
  }, {
290
- default: S(() => [f(y(b(B)("d.upload.upload")), 1)]),
294
+ default: x(() => [f(y(b(R)("d.upload.upload")), 1)]),
291
295
  _: 1
292
- })) : l("", !0), n.showDownloadAll && H.value ? (g(), c(b(C), {
296
+ })) : l("", !0), n.showDownloadAll && B.value ? (g(), c(b(S), {
293
297
  key: 1,
294
298
  type: "primary",
295
299
  link: "",
296
- onClick: tt
300
+ onClick: nt
297
301
  }, {
298
- default: S(() => [f(y(b(B)("d.upload.downloadAll")), 1)]),
302
+ default: x(() => [f(y(b(R)("d.upload.downloadAll")), 1)]),
299
303
  _: 1
300
304
  })) : l("", !0)])) : l("", !0),
301
- W.value ? l("", !0) : (g(), u("div", {
305
+ H.value ? l("", !0) : (g(), u("div", {
302
306
  key: 3,
303
307
  class: "card",
304
- style: h(ze.value)
305
- }, [(g(!0), u(o, null, v(V.value, (e, t) => (g(), u("div", {
308
+ style: h(K.value)
309
+ }, [(g(!0), u(o, null, v(z.value, (e, t) => (g(), u("div", {
306
310
  key: e.id || `${e.name}-${t}`,
307
311
  class: "card-item",
308
- style: h(Le.value),
309
- onClick: (t) => $(e)
310
- }, [Y(e) ? (g(), u(o, { key: 0 }, [q(e) ? (g(), c(b(ge), {
312
+ style: h(G.value),
313
+ onClick: (t) => tt(e)
314
+ }, [X(e) ? (g(), u(o, { key: 0 }, [J(e) ? (g(), c(b(_e), {
311
315
  key: 0,
312
316
  src: e.url,
313
317
  fit: "cover"
314
318
  }, {
315
- error: S(() => [p(b(a), { class: "el-image__error" }, {
316
- default: S(() => [p(se)]),
319
+ error: x(() => [p(b(a), { class: "el-image__error" }, {
320
+ default: x(() => [p(se)]),
317
321
  _: 1
318
322
  })]),
319
323
  _: 1
320
- }, 8, ["src"])) : J(e) ? (g(), c(b(a), { key: 1 }, {
321
- default: S(() => [p(ee)]),
324
+ }, 8, ["src"])) : Y(e) ? (g(), c(b(a), { key: 1 }, {
325
+ default: x(() => [p(ee)]),
322
326
  _: 1
323
327
  })) : (g(), c(b(a), { key: 2 }, {
324
- default: S(() => [p(ie)]),
328
+ default: x(() => [p(ie)]),
325
329
  _: 1
326
- })), d("div", Ee, [q(e) || J(e) ? (g(), c(b(a), { key: 0 }, {
327
- default: S(() => [p(re)]),
330
+ })), d("div", De, [J(e) || Y(e) ? (g(), c(b(a), { key: 0 }, {
331
+ default: x(() => [p(re)]),
328
332
  _: 1
329
333
  })) : (g(), c(b(a), { key: 1 }, {
330
- default: S(() => [p(ne)]),
334
+ default: x(() => [p(ne)]),
331
335
  _: 1
332
336
  })), He(e) ? (g(), c(b(a), {
333
337
  key: 2,
334
- onClick: me((t) => Ge(e), ["stop"])
338
+ onClick: he((t) => Ge(e), ["stop"])
335
339
  }, {
336
- default: S(() => [p(oe)]),
340
+ default: x(() => [p(oe)]),
337
341
  _: 1
338
- }, 8, ["onClick"])) : l("", !0)])], 64)) : (g(), c(b(E), {
342
+ }, 8, ["onClick"])) : l("", !0)])], 64)) : (g(), c(b(T), {
339
343
  key: 1,
340
344
  style: { width: "80%" },
341
345
  percentage: e.percentage,
342
346
  "stroke-width": 5,
343
347
  "show-text": !1
344
- }, null, 8, ["percentage"]))], 12, Te))), 128)), U.value ? (g(), u("div", {
348
+ }, null, 8, ["percentage"]))], 12, Ee))), 128)), V.value ? (g(), u("div", {
345
349
  key: 0,
346
350
  class: "card-item",
347
- style: h(Le.value),
348
- onClick: Ue
351
+ style: h(G.value),
352
+ onClick: Z
349
353
  }, [p(b(a), null, {
350
- default: S(() => [p(ae)]),
354
+ default: x(() => [p(ae)]),
351
355
  _: 1
352
356
  })], 4)) : l("", !0)], 4)),
353
- U.value && n.showTip ? (g(), u("p", {
357
+ V.value && n.showTip ? (g(), u("p", {
354
358
  key: 4,
355
359
  class: "tip",
356
360
  innerHTML: Be.value
357
- }, null, 8, De)) : l("", !0),
358
- W.value ? (g(), u("div", {
361
+ }, null, 8, Oe)) : l("", !0),
362
+ H.value ? (g(), u("div", {
359
363
  key: 5,
360
- style: h(ze.value),
364
+ style: h(K.value),
361
365
  class: "list"
362
- }, [(g(!0), u(o, null, v(V.value, (e, t) => (g(), u("div", {
366
+ }, [(g(!0), u(o, null, v(z.value, (e, t) => (g(), u("div", {
363
367
  key: e.id || `${e.name}-${t}`,
364
368
  class: "list-item"
365
- }, [d("div", Oe, [p(b(w), {
369
+ }, [d("div", ke, [p(b(C), {
366
370
  type: "primary",
367
371
  underline: "never",
368
- onClick: (t) => $(e)
372
+ onClick: (t) => tt(e)
369
373
  }, {
370
- default: S(() => [f(y(e.name), 1)]),
374
+ default: x(() => [f(y(e.name), 1)]),
371
375
  _: 2
372
376
  }, 1032, ["onClick"]), He(e) ? (g(), c(b(a), {
373
377
  key: 0,
374
378
  class: "remove-icon",
375
- onClick: me((t) => Ge(e), ["stop"])
379
+ onClick: he((t) => Ge(e), ["stop"])
376
380
  }, {
377
- default: S(() => [p(te)]),
381
+ default: x(() => [p(te)]),
378
382
  _: 1
379
- }, 8, ["onClick"])) : l("", !0)]), Y(e) ? l("", !0) : (g(), c(b(E), {
383
+ }, 8, ["onClick"])) : l("", !0)]), X(e) ? l("", !0) : (g(), c(b(T), {
380
384
  key: 0,
381
385
  percentage: e.percentage,
382
386
  "stroke-width": 8
383
387
  }, null, 8, ["percentage"]))]))), 128))], 4)) : l("", !0),
384
- j.value.length > n.maxShow ? (g(), u("div", ke, [L.value ? (g(), c(b(w), {
388
+ k.value.length > n.maxShow ? (g(), u("div", Ae, [F.value ? (g(), c(b(C), {
385
389
  key: 0,
386
390
  type: "primary",
387
391
  underline: "never",
388
- onClick: Q
392
+ onClick: $
389
393
  }, {
390
- default: S(() => [d("span", null, y(b(B)("d.upload.collapse")), 1), p(b(a), null, {
391
- default: S(() => [p(i)]),
394
+ default: x(() => [d("span", null, y(b(R)("d.upload.collapse")), 1), p(b(a), null, {
395
+ default: x(() => [p(i)]),
392
396
  _: 1
393
397
  })]),
394
398
  _: 1
395
- })) : (g(), c(b(w), {
399
+ })) : (g(), c(b(C), {
396
400
  key: 1,
397
401
  type: "primary",
398
402
  underline: "never",
399
- onClick: Q
403
+ onClick: $
400
404
  }, {
401
- default: S(() => [d("span", null, y(b(B)("d.upload.expand")), 1), p(b(a), null, {
402
- default: S(() => [p(r)]),
405
+ default: x(() => [d("span", null, y(b(R)("d.upload.expand")), 1), p(b(a), null, {
406
+ default: x(() => [p(r)]),
403
407
  _: 1
404
408
  })]),
405
409
  _: 1
406
410
  }))])) : l("", !0)
407
411
  ], 2));
408
412
  }
409
- }), [["__scopeId", "data-v-0552ceda"]]);
413
+ }), [["__scopeId", "data-v-ddbeb9ca"]]);
410
414
  //#endregion
411
- export { D as default };
415
+ export { E as default };
@@ -1,4 +1,7 @@
1
1
  declare const _default: import('vue').DefineComponent<{}, {
2
+ uploadRef: import('vue').Ref<any, any>;
3
+ triggerUpload: () => void;
4
+ downloadAll: () => void;
2
5
  $emit: (event: "success" | "change", ...args: any[]) => void;
3
6
  disabled: boolean;
4
7
  size: string;
@@ -0,0 +1 @@
1
+ .d-upload[data-v-ddbeb9ca]{line-height:normal}.d-upload .header[data-v-ddbeb9ca]{align-items:center;gap:8px;width:100%;display:flex}.d-upload .header .el-button[data-v-ddbeb9ca]{margin:0}.d-upload.is-list[data-v-ddbeb9ca],.d-upload.is-list .list[data-v-ddbeb9ca]{flex-direction:column;gap:8px;display:flex}.d-upload.is-list .list .list-item .file-row[data-v-ddbeb9ca]{align-items:center;gap:4px;display:flex;position:relative}.d-upload.is-list .list .list-item .file-row[data-v-ddbeb9ca] .el-link{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.d-upload.is-list .list .list-item .file-row[data-v-ddbeb9ca] .el-link .el-link__inner{display:inline}.d-upload.is-list .list .list-item .file-row .remove-icon[data-v-ddbeb9ca]{cursor:pointer;color:var(--el-text-color-secondary);display:none}.d-upload.is-list .list .list-item .file-row:hover .remove-icon[data-v-ddbeb9ca]{display:block}.d-upload.is-card[data-v-ddbeb9ca],.d-upload.is-card .card[data-v-ddbeb9ca]{flex-wrap:wrap;gap:8px;display:flex}.d-upload.is-card .card .card-item[data-v-ddbeb9ca]{box-sizing:border-box;border:1px solid var(--el-border-color);cursor:pointer;border-radius:4px;justify-content:center;align-items:center;font-size:16px;display:flex;position:relative;overflow:hidden}.d-upload.is-card .card .card-item .card-cover[data-v-ddbeb9ca]{background:var(--el-overlay-color);opacity:0;justify-content:center;align-items:center;gap:12px;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.d-upload.is-card .card .card-item .card-cover .d-icon[data-v-ddbeb9ca]{color:var(--el-color-white)}.d-upload.is-card .card .card-item .card-cover[data-v-ddbeb9ca]:hover{opacity:1}.d-upload.is-card .card .el-image[data-v-ddbeb9ca]{width:100%;height:100%}.d-upload.is-card .card .el-image .el-image__error[data-v-ddbeb9ca]{font-size:16px}.d-upload .expand-toggle[data-v-ddbeb9ca]{width:100%;display:flex}.d-upload .expand-toggle[data-v-ddbeb9ca] .el-link__inner{gap:4px}.d-upload .tip[data-v-ddbeb9ca]{width:100%;color:var(--el-text-color-regular);margin:0;font-size:12px}
package/locale/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
1
  export { default as en } from './lang/en';
2
+ export { default as ja } from './lang/ja';
3
+ export { default as ko } from './lang/ko';
2
4
  export { default as zhCn } from './lang/zh-cn';
5
+ export { default as zhTw } from './lang/zh-tw';
3
6
  export * from './i18n.js';
package/locale/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  import e from "./lang/en.js";
2
- import t from "./lang/zh-cn.js";
3
- import { getLocale as n, initI18n as r, setLocale as i, t as a } from "./i18n.js";
4
- export { e as en, n as getLocale, r as initI18n, i as setLocale, a as t, t as zhCn };
2
+ import t from "./lang/ja.js";
3
+ import n from "./lang/ko.js";
4
+ import r from "./lang/zh-cn.js";
5
+ import i from "./lang/zh-tw.js";
6
+ import { getLocale as a, initI18n as o, setLocale as s, t as c } from "./i18n.js";
7
+ export { e as en, a as getLocale, o as initI18n, t as ja, n as ko, s as setLocale, c as t, r as zhCn, i as zhTw };
@@ -0,0 +1,40 @@
1
+ declare namespace _default {
2
+ let name: string;
3
+ namespace d {
4
+ namespace copy {
5
+ let success: string;
6
+ }
7
+ namespace editor {
8
+ let expand: string;
9
+ let collapse: string;
10
+ let placeholder: string;
11
+ }
12
+ namespace foldText {
13
+ let expand_1: string;
14
+ export { expand_1 as expand };
15
+ let collapse_1: string;
16
+ export { collapse_1 as collapse };
17
+ }
18
+ namespace upload {
19
+ export let lessThan: string;
20
+ export let format: string;
21
+ export let pasteable: string;
22
+ export let tip: string;
23
+ export let deleteConfirm: string;
24
+ export let fileLessThan: string;
25
+ export let fileFormat: string;
26
+ export let fileSuccess: string;
27
+ export let comma: string;
28
+ export let preview: string;
29
+ export let close: string;
30
+ let expand_2: string;
31
+ export { expand_2 as expand };
32
+ let collapse_2: string;
33
+ export { collapse_2 as collapse };
34
+ let upload_1: string;
35
+ export { upload_1 as upload };
36
+ export let downloadAll: string;
37
+ }
38
+ }
39
+ }
40
+ export default _default;
@@ -0,0 +1,35 @@
1
+ //#region packages/locale/lang/ja.js
2
+ var e = {
3
+ name: "ja",
4
+ d: {
5
+ copy: { success: "コピーしました" },
6
+ editor: {
7
+ expand: "展開",
8
+ collapse: "折りたたむ",
9
+ placeholder: "入力してください"
10
+ },
11
+ foldText: {
12
+ expand: "展開",
13
+ collapse: "折りたたむ"
14
+ },
15
+ upload: {
16
+ lessThan: "{size}MB 未満",
17
+ format: "形式 {format}",
18
+ pasteable: "貼り付け可能",
19
+ tip: "ヒント",
20
+ deleteConfirm: "削除してもよろしいですか?",
21
+ fileLessThan: "{file} は {size}MB 未満である必要があります",
22
+ fileFormat: "{file} の形式は {format} である必要があります",
23
+ fileSuccess: "{file} のアップロードに成功しました",
24
+ comma: "、",
25
+ preview: "プレビュー",
26
+ close: "閉じる",
27
+ expand: "展開",
28
+ collapse: "折りたたむ",
29
+ upload: "アップロード",
30
+ downloadAll: "すべてダウンロード"
31
+ }
32
+ }
33
+ };
34
+ //#endregion
35
+ export { e as default };
@@ -0,0 +1,40 @@
1
+ declare namespace _default {
2
+ let name: string;
3
+ namespace d {
4
+ namespace copy {
5
+ let success: string;
6
+ }
7
+ namespace editor {
8
+ let expand: string;
9
+ let collapse: string;
10
+ let placeholder: string;
11
+ }
12
+ namespace foldText {
13
+ let expand_1: string;
14
+ export { expand_1 as expand };
15
+ let collapse_1: string;
16
+ export { collapse_1 as collapse };
17
+ }
18
+ namespace upload {
19
+ export let lessThan: string;
20
+ export let format: string;
21
+ export let pasteable: string;
22
+ export let tip: string;
23
+ export let deleteConfirm: string;
24
+ export let fileLessThan: string;
25
+ export let fileFormat: string;
26
+ export let fileSuccess: string;
27
+ export let comma: string;
28
+ export let preview: string;
29
+ export let close: string;
30
+ let expand_2: string;
31
+ export { expand_2 as expand };
32
+ let collapse_2: string;
33
+ export { collapse_2 as collapse };
34
+ let upload_1: string;
35
+ export { upload_1 as upload };
36
+ export let downloadAll: string;
37
+ }
38
+ }
39
+ }
40
+ export default _default;
@@ -0,0 +1,35 @@
1
+ //#region packages/locale/lang/ko.js
2
+ var e = {
3
+ name: "ko",
4
+ d: {
5
+ copy: { success: "복사되었습니다" },
6
+ editor: {
7
+ expand: "펼치기",
8
+ collapse: "접기",
9
+ placeholder: "입력하세요"
10
+ },
11
+ foldText: {
12
+ expand: "펼치기",
13
+ collapse: "접기"
14
+ },
15
+ upload: {
16
+ lessThan: "{size}MB 이하",
17
+ format: "형식 {format}",
18
+ pasteable: "붙여넣기 가능",
19
+ tip: "안내",
20
+ deleteConfirm: "삭제하시겠습니까?",
21
+ fileLessThan: "{file}은(는) {size}MB 이하여야 합니다",
22
+ fileFormat: "{file} 형식은 {format}이어야 합니다",
23
+ fileSuccess: "{file} 업로드 성공",
24
+ comma: ", ",
25
+ preview: "미리보기",
26
+ close: "닫기",
27
+ expand: "펼치기",
28
+ collapse: "접기",
29
+ upload: "업로드",
30
+ downloadAll: "모두 다운로드"
31
+ }
32
+ }
33
+ };
34
+ //#endregion
35
+ export { e as default };
@@ -0,0 +1,40 @@
1
+ declare namespace _default {
2
+ let name: string;
3
+ namespace d {
4
+ namespace copy {
5
+ let success: string;
6
+ }
7
+ namespace editor {
8
+ let expand: string;
9
+ let collapse: string;
10
+ let placeholder: string;
11
+ }
12
+ namespace foldText {
13
+ let expand_1: string;
14
+ export { expand_1 as expand };
15
+ let collapse_1: string;
16
+ export { collapse_1 as collapse };
17
+ }
18
+ namespace upload {
19
+ export let lessThan: string;
20
+ export let format: string;
21
+ export let pasteable: string;
22
+ export let tip: string;
23
+ export let deleteConfirm: string;
24
+ export let fileLessThan: string;
25
+ export let fileFormat: string;
26
+ export let fileSuccess: string;
27
+ export let comma: string;
28
+ export let preview: string;
29
+ export let close: string;
30
+ let expand_2: string;
31
+ export { expand_2 as expand };
32
+ let collapse_2: string;
33
+ export { collapse_2 as collapse };
34
+ let upload_1: string;
35
+ export { upload_1 as upload };
36
+ export let downloadAll: string;
37
+ }
38
+ }
39
+ }
40
+ export default _default;
@@ -0,0 +1,35 @@
1
+ //#region packages/locale/lang/zh-tw.js
2
+ var e = {
3
+ name: "zh-tw",
4
+ d: {
5
+ copy: { success: "複製成功" },
6
+ editor: {
7
+ expand: "展開",
8
+ collapse: "收起",
9
+ placeholder: "請輸入"
10
+ },
11
+ foldText: {
12
+ expand: "展開",
13
+ collapse: "收起"
14
+ },
15
+ upload: {
16
+ lessThan: "小於 {size}MB",
17
+ format: "格式 {format}",
18
+ pasteable: "可貼上",
19
+ tip: "提示",
20
+ deleteConfirm: "是否確定刪除?",
21
+ fileLessThan: "{file} 需小於 {size}MB",
22
+ fileFormat: "{file} 格式需要是 {format}",
23
+ fileSuccess: "{file} 上傳成功",
24
+ comma: ",",
25
+ preview: "預覽",
26
+ close: "關閉",
27
+ expand: "展開",
28
+ collapse: "收起",
29
+ upload: "上傳",
30
+ downloadAll: "全部下載"
31
+ }
32
+ }
33
+ };
34
+ //#endregion
35
+ export { e as default };
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
- {
2
- "name": "geekplus-digital-ui",
3
- "version": "0.1.33",
4
- "homepage": "https://ui.geekplus.cc/static/ui/",
5
- "type": "module",
6
- "main": "index.js",
7
- "module": "index.js",
8
- "types": "index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./index.d.ts",
12
- "import": "./index.js"
13
- },
14
- "./*": {
15
- "types": "./*.d.ts",
16
- "import": "./*.js"
17
- }
18
- },
19
- "sideEffects": [
20
- "**/*.css"
21
- ],
22
- "dependencies": {
23
- "@vueuse/core": "^14.2.1",
24
- "@wangeditor-next/editor": "^5.6.50",
25
- "@wangeditor-next/editor-for-vue": "^5.1.14",
26
- "file-saver": "^2.0.5",
27
- "lodash-es": "^4.17.23",
28
- "vue-i18n": "^11.3.0"
29
- },
30
- "peerDependencies": {
31
- "element-plus": "^2.13.0",
32
- "vue": "^3.5.0"
33
- }
34
- }
1
+ {
2
+ "name": "geekplus-digital-ui",
3
+ "version": "0.1.35",
4
+ "homepage": "https://ui.geekplus.cc/static/ui/",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "module": "index.js",
8
+ "types": "index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./index.d.ts",
12
+ "import": "./index.js"
13
+ },
14
+ "./*": {
15
+ "types": "./*.d.ts",
16
+ "import": "./*.js"
17
+ }
18
+ },
19
+ "sideEffects": [
20
+ "**/*.css"
21
+ ],
22
+ "dependencies": {
23
+ "@vueuse/core": "^14.2.1",
24
+ "@wangeditor-next/editor": "^5.6.50",
25
+ "@wangeditor-next/editor-for-vue": "^5.1.14",
26
+ "file-saver": "^2.0.5",
27
+ "lodash-es": "^4.17.23",
28
+ "vue-i18n": "^11.3.0"
29
+ },
30
+ "peerDependencies": {
31
+ "element-plus": "^2.13.0",
32
+ "vue": "^3.5.0"
33
+ }
34
+ }
@@ -1 +0,0 @@
1
- .d-copy[data-v-5cfb3191] .el-link__inner{gap:4px}
@@ -1 +0,0 @@
1
- .d-editor[data-v-4d9761f4]{width:100%}.d-editor.w-e-full-screen-container[data-v-4d9761f4]{z-index:1000}.d-editor .toolbar-container[data-v-4d9761f4]{border-bottom:1px solid var(--el-border-color)}.d-editor .toolbar-container[data-v-4d9761f4] .w-e-toolbar{border-radius:4px}.d-editor .toolbar-container[data-v-4d9761f4] .w-e-drop-panel{z-index:100}.d-editor .editor-container[data-v-4d9761f4]{min-height:var(--minHeight);background:var(--el-fill-color-blank);border-radius:4px}.d-editor .editor-container[data-v-4d9761f4] p[id^=w-e-element-paragraph-]{margin:10px 0}.d-editor .editor-container[data-v-4d9761f4] .w-e-text-placeholder{font-size:14px;font-style:normal;line-height:normal;top:11px}.d-editor .editor-container[data-v-4d9761f4] .w-e-image-container{width:500px}.d-editor .editor-container[data-v-4d9761f4] pre code{text-shadow:none}.d-editor.editor-disabled[data-v-4d9761f4]:not(.editor-border) div[id^=w-e-textarea-]{padding:0}.d-editor.editor-disabled[data-v-4d9761f4]:not(.editor-border) p[id^=w-e-element-paragraph-]:first-child{margin-top:0}.d-editor.editor-disabled[data-v-4d9761f4]:not(.editor-border) p[id^=w-e-element-paragraph-]:last-child{margin-bottom:0}.editor-border[data-v-4d9761f4]{border:1px solid var(--el-border-color);background:var(--el-bg-color);border-radius:4px;transition:border-color .2s cubic-bezier(.645,.045,.355,1)}.editor-border[data-v-4d9761f4]:hover{border-color:var(--el-text-color-disabled)}.editor-disabled .editor-container[data-v-4d9761f4] img{cursor:zoom-in}.el-form-item.is-error .editor-border[data-v-4d9761f4]{border:1px solid var(--el-color-danger)}
@@ -1 +0,0 @@
1
- .d-upload[data-v-0552ceda]{line-height:normal}.d-upload .header[data-v-0552ceda]{align-items:center;gap:8px;width:100%;display:flex}.d-upload .header .el-button[data-v-0552ceda]{margin:0}.d-upload.is-list[data-v-0552ceda],.d-upload.is-list .list[data-v-0552ceda]{flex-direction:column;gap:8px;display:flex}.d-upload.is-list .list .list-item .file-row[data-v-0552ceda]{align-items:center;gap:4px;display:flex;position:relative}.d-upload.is-list .list .list-item .file-row[data-v-0552ceda] .el-link{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.d-upload.is-list .list .list-item .file-row[data-v-0552ceda] .el-link .el-link__inner{display:inline}.d-upload.is-list .list .list-item .file-row .remove-icon[data-v-0552ceda]{cursor:pointer;color:var(--el-text-color-secondary);display:none}.d-upload.is-list .list .list-item .file-row:hover .remove-icon[data-v-0552ceda]{display:block}.d-upload.is-card[data-v-0552ceda],.d-upload.is-card .card[data-v-0552ceda]{flex-wrap:wrap;gap:8px;display:flex}.d-upload.is-card .card .card-item[data-v-0552ceda]{box-sizing:border-box;border:1px solid var(--el-border-color);cursor:pointer;border-radius:4px;justify-content:center;align-items:center;font-size:16px;display:flex;position:relative;overflow:hidden}.d-upload.is-card .card .card-item .card-cover[data-v-0552ceda]{background:var(--el-overlay-color);opacity:0;justify-content:center;align-items:center;gap:12px;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.d-upload.is-card .card .card-item .card-cover .d-icon[data-v-0552ceda]{color:var(--el-color-white)}.d-upload.is-card .card .card-item .card-cover[data-v-0552ceda]:hover{opacity:1}.d-upload.is-card .card .el-image[data-v-0552ceda]{width:100%;height:100%}.d-upload.is-card .card .el-image .el-image__error[data-v-0552ceda]{font-size:16px}.d-upload .expand-toggle[data-v-0552ceda]{width:100%;display:flex}.d-upload .expand-toggle[data-v-0552ceda] .el-link__inner{gap:4px}.d-upload .tip[data-v-0552ceda]{width:100%;color:var(--el-text-color-regular);margin:0;font-size:12px}