geekplus-digital-ui 0.1.5 → 0.1.6

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,5 +1,6 @@
1
1
  import o from "./src/copy.vue.js";
2
- const r = o;
2
+ const t = o;
3
3
  export {
4
- r as DCopy
4
+ t as DCopy,
5
+ t as default
5
6
  };
@@ -1,10 +1,11 @@
1
1
  import { ref as p, toRef as d, computed as f, onMounted as x, onBeforeUnmount as L, openBlock as s, createBlock as v, unref as y, withModifiers as S, normalizeStyle as M, withCtx as g, createElementBlock as N, normalizeClass as B, createVNode as b, renderSlot as w, createCommentVNode as I } from "vue";
2
2
  import { useClipboard as R } from "@vueuse/core";
3
- import { ElLink as $, ElIcon as z, ElMessage as V } from "element-plus";
4
- import { useLocale as j } from "../../../hooks/use-locale/index.js";
5
- import D from "./copy-icon.vue.js";
3
+ import { ElMessage as $, ElLink as z, ElIcon as V } from "element-plus";
4
+ import "../../../hooks/index.js";
5
+ import j from "./copy-icon.vue.js";
6
6
  import './copy.css';/* empty css */
7
- import H from "../../../_virtual/_plugin-vue_export-helper.js";
7
+ import D from "../../../_virtual/_plugin-vue_export-helper.js";
8
+ import { useLocale as H } from "../../../hooks/use-locale/index.js";
8
9
  const O = /* @__PURE__ */ Object.assign({
9
10
  name: "DCopy"
10
11
  }, {
@@ -22,7 +23,7 @@ const O = /* @__PURE__ */ Object.assign({
22
23
  setup(a, { expose: E }) {
23
24
  const o = a, r = p(null), l = p(!1), h = d(o, "text"), u = d(o, "icon"), { copy: k } = R({
24
25
  source: h
25
- }), { t: C } = j(), e = f(() => {
26
+ }), { t: C } = H(), e = f(() => {
26
27
  const n = r.value?.$el ?? r.value;
27
28
  if (!o.triggerElement || !n)
28
29
  return null;
@@ -37,7 +38,7 @@ const O = /* @__PURE__ */ Object.assign({
37
38
  display: o.triggerElement && !l.value ? "none" : ""
38
39
  })), c = () => {
39
40
  k().then(() => {
40
- V.success(C("d.copy.success"));
41
+ $.success(C("d.copy.success"));
41
42
  });
42
43
  }, i = () => {
43
44
  l.value = !0;
@@ -51,7 +52,7 @@ const O = /* @__PURE__ */ Object.assign({
51
52
  }), E({
52
53
  rootRef: r,
53
54
  handleCopy: c
54
- }), (n, t) => (s(), v(y($), {
55
+ }), (n, t) => (s(), v(y(z), {
55
56
  ref_key: "rootRef",
56
57
  ref: r,
57
58
  class: "d-copy",
@@ -64,9 +65,9 @@ const O = /* @__PURE__ */ Object.assign({
64
65
  u.value ? (s(), N("i", {
65
66
  key: 0,
66
67
  class: B(u.value)
67
- }, null, 2)) : (s(), v(y(z), { key: 1 }, {
68
+ }, null, 2)) : (s(), v(y(V), { key: 1 }, {
68
69
  default: g(() => [
69
- b(D)
70
+ b(j)
70
71
  ]),
71
72
  _: 1
72
73
  })),
@@ -75,7 +76,7 @@ const O = /* @__PURE__ */ Object.assign({
75
76
  _: 3
76
77
  }, 8, ["type", "style"]));
77
78
  }
78
- }), P = /* @__PURE__ */ H(O, [["__scopeId", "data-v-cad5f2ba"]]);
79
+ }), Q = /* @__PURE__ */ D(O, [["__scopeId", "data-v-cad5f2ba"]]);
79
80
  export {
80
- P as default
81
+ Q as default
81
82
  };
package/hooks/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { useLocale as r } from "./use-locale/index.js";
2
+ export {
3
+ r as useLocale
4
+ };
@@ -1,8 +1,9 @@
1
- import { setLocale as e, getLocale as o, t } from "../../locale/i18n.js";
1
+ import "../../locale/index.js";
2
+ import { setLocale as o, getLocale as e, t } from "../../locale/i18n.js";
2
3
  const a = () => ({
3
4
  t,
4
- getLocale: o,
5
- setLocale: e
5
+ getLocale: e,
6
+ setLocale: o
6
7
  });
7
8
  export {
8
9
  a as useLocale
package/index.js CHANGED
@@ -1,19 +1,12 @@
1
1
  import { install as o } from "./install.js";
2
- import { DCopy as f } from "./components/copy/index.js";
3
- import { useLocale as p } from "./hooks/use-locale/index.js";
4
- import { default as n } from "./locale/lang/en.js";
5
- import { default as x } from "./locale/lang/zh-cn.js";
6
- import { getLocale as c, initI18n as d, setLocale as u, t as L } from "./locale/i18n.js";
7
- const t = { install: o };
2
+ import "./components/index.js";
3
+ import "./hooks/index.js";
4
+ import { DCopy as a } from "./components/copy/index.js";
5
+ import { useLocale as l } from "./hooks/use-locale/index.js";
6
+ const p = { install: o };
8
7
  export {
9
- f as DCopy,
10
- t as default,
11
- n as en,
12
- c as getLocale,
13
- d as initI18n,
8
+ a as DCopy,
9
+ p as default,
14
10
  o as install,
15
- u as setLocale,
16
- L as t,
17
- p as useLocale,
18
- x as zhCn
11
+ l as useLocale
19
12
  };
package/install.js CHANGED
@@ -1,9 +1,10 @@
1
+ import "./locale/index.js";
2
+ import * as r from "./components/index.js";
1
3
  import { initI18n as s } from "./locale/i18n.js";
2
- import * as a from "./components/index.js";
3
- const c = (n, o = {}) => {
4
- const { locale: t } = o, e = s(t);
5
- n.use(e), Object.values(a).forEach((i) => {
6
- i?.name && n.component(i.name, i);
4
+ const c = (o, t = {}) => {
5
+ const { locale: n } = t, e = s(n);
6
+ o.use(e), Object.values(r).forEach((i) => {
7
+ i?.name && o.component(i.name, i);
7
8
  });
8
9
  };
9
10
  export {
@@ -0,0 +1,11 @@
1
+ import { default as o } from "./lang/en.js";
2
+ import { default as r } from "./lang/zh-cn.js";
3
+ import { getLocale as l, initI18n as n, setLocale as m, t as p } from "./i18n.js";
4
+ export {
5
+ o as en,
6
+ l as getLocale,
7
+ n as initI18n,
8
+ m as setLocale,
9
+ p as t,
10
+ r as zhCn
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geekplus-digital-ui",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",