btt-ui 1.0.17 → 1.0.24

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.
Files changed (39) hide show
  1. package/es/index.mjs +28 -26
  2. package/es/src/button/src/button.mjs +29 -29
  3. package/es/src/card/src/card.mjs +15 -15
  4. package/es/src/dialog/src/dialog.mjs +49 -49
  5. package/es/src/drag/src/drag.mjs +15 -15
  6. package/es/src/echarts/src/index.mjs +20 -20
  7. package/es/src/index.mjs +69 -66
  8. package/es/src/input/src/input.mjs +60 -60
  9. package/es/src/overlay/src/overlay.mjs +15 -15
  10. package/es/src/sign/src/sign.mjs +24 -24
  11. package/es/src/switch/src/switch.mjs +29 -29
  12. package/es/src/textButton/src/button.mjs +24 -24
  13. package/es/src/upload/dragger.mjs +23 -23
  14. package/es/src/upload/upload.mjs +18 -18
  15. package/es/src/uploadFile/src/style/index.css +14 -1
  16. package/es/src/uploadFile/src/uploadFile.mjs +89 -77
  17. package/es/src/xgplay/index.mjs +6 -0
  18. package/es/src/xgplay/src/index.mjs +81 -0
  19. package/lib/index.js +1 -1
  20. package/lib/src/button/src/button.js +1 -1
  21. package/lib/src/card/src/card.js +1 -1
  22. package/lib/src/dialog/src/dialog.js +1 -1
  23. package/lib/src/drag/src/drag.js +1 -1
  24. package/lib/src/echarts/src/index.js +1 -1
  25. package/lib/src/index.js +1 -1
  26. package/lib/src/input/src/input.js +1 -1
  27. package/lib/src/overlay/src/overlay.js +1 -1
  28. package/lib/src/sign/src/sign.js +1 -1
  29. package/lib/src/switch/src/switch.js +1 -1
  30. package/lib/src/textButton/src/button.js +1 -1
  31. package/lib/src/upload/dragger.js +1 -1
  32. package/lib/src/upload/upload.js +1 -1
  33. package/lib/src/uploadFile/src/style/index.css +14 -1
  34. package/lib/src/uploadFile/src/uploadFile.js +1 -1
  35. package/lib/src/xgplay/index.js +1 -0
  36. package/lib/src/xgplay/src/index.js +1 -0
  37. package/package.json +2 -2
  38. /package/es/src/{xgplayer → xgplay}/src/style/index.css +0 -0
  39. /package/lib/src/{xgplayer → xgplay}/src/style/index.css +0 -0
package/es/src/index.mjs CHANGED
@@ -1,83 +1,86 @@
1
1
  import "./style/common.css";
2
2
  import { Button as o } from "./button/index.mjs";
3
- import { Button as mo } from "./button/index.mjs";
3
+ import { Button as po } from "./button/index.mjs";
4
4
  import { TextButton as r } from "./textButton/index.mjs";
5
- import { TextButton as po } from "./textButton/index.mjs";
5
+ import { TextButton as io } from "./textButton/index.mjs";
6
6
  import { Tooltip as t } from "./tooltip/index.mjs";
7
- import { Tooltip as io } from "./tooltip/index.mjs";
7
+ import { Tooltip as lo } from "./tooltip/index.mjs";
8
8
  import { Icon as m } from "./icon/index.mjs";
9
- import { Icon as lo } from "./icon/index.mjs";
9
+ import { Icon as so } from "./icon/index.mjs";
10
10
  import { KInput as e } from "./input/index.mjs";
11
- import { KInput as so } from "./input/index.mjs";
11
+ import { KInput as uo } from "./input/index.mjs";
12
12
  import p from "./link/index.mjs";
13
- import { default as uo } from "./link/index.mjs";
13
+ import { default as co } from "./link/index.mjs";
14
14
  import f from "./upload/index.mjs";
15
- import { default as Ko } from "./upload/index.mjs";
15
+ import { default as ho } from "./upload/index.mjs";
16
16
  import i from "./shake/index.mjs";
17
- import { default as ho } from "./shake/index.mjs";
17
+ import { default as So } from "./shake/index.mjs";
18
18
  import a from "./dialog/index.mjs";
19
- import { default as So } from "./dialog/index.mjs";
19
+ import { default as bo } from "./dialog/index.mjs";
20
20
  import l from "./scroll/index.mjs";
21
- import { default as bo } from "./scroll/index.mjs";
21
+ import { default as Io } from "./scroll/index.mjs";
22
22
  import x from "./toast/index.mjs";
23
- import { default as Io } from "./toast/index.mjs";
23
+ import { default as Do } from "./toast/index.mjs";
24
24
  import s from "./wheel/index.mjs";
25
- import { default as Do } from "./wheel/index.mjs";
25
+ import { default as wo } from "./wheel/index.mjs";
26
26
  import n from "./uploadFile/index.mjs";
27
- import { default as wo } from "./uploadFile/index.mjs";
27
+ import { default as Fo } from "./uploadFile/index.mjs";
28
28
  import { Card as u } from "./card/index.mjs";
29
- import { Card as Fo } from "./card/index.mjs";
30
- import { ECharts as c } from "./echarts/index.mjs";
31
- import { ECharts as Ho } from "./echarts/index.mjs";
32
- import { HotMap as K } from "./hotmap/index.mjs";
33
- import { HotMap as Mo } from "./hotmap/index.mjs";
34
- import { KTree as d } from "./tree/index.mjs";
35
- import { KTree as Wo } from "./tree/index.mjs";
36
- import { TableScroll as T } from "./tableScroll/index.mjs";
37
- import { TableScroll as jo } from "./tableScroll/index.mjs";
38
- import { KSelect as h, KOption as C } from "./select/index.mjs";
39
- import { KOption as vo, KSelect as yo } from "./select/index.mjs";
40
- import { KCheckbox as S, KCheckboxGroup as k } from "./checkbox/index.mjs";
41
- import { KCheckbox as Ao, KCheckboxGroup as Jo } from "./checkbox/index.mjs";
42
- import { KCollapse as b, KCollapseItem as g } from "./collapse/index.mjs";
43
- import { KCollapse as Qo, KCollapseItem as Ro } from "./collapse/index.mjs";
44
- import { Switch as I } from "./switch/index.mjs";
45
- import { Switch as Xo } from "./switch/index.mjs";
46
- import { Timeline as B } from "./timeline/index.mjs";
47
- import { Timeline as Zo } from "./timeline/index.mjs";
48
- import { Drag as D } from "./drag/index.mjs";
49
- import { Drag as $o } from "./drag/index.mjs";
50
- import { Sign as U } from "./sign/index.mjs";
51
- import { Sign as rr } from "./sign/index.mjs";
52
- const oo = [o, r, m, p, f, i, a, l, x, s, t, e, I, B, D, n, u, K, d, S, k, b, g, U, c, h, C, T];
29
+ import { Card as Ho } from "./card/index.mjs";
30
+ import d from "./xgplay/index.mjs";
31
+ import { default as Mo } from "./xgplay/index.mjs";
32
+ import { ECharts as K } from "./echarts/index.mjs";
33
+ import { ECharts as Vo } from "./echarts/index.mjs";
34
+ import { HotMap as c } from "./hotmap/index.mjs";
35
+ import { HotMap as Po } from "./hotmap/index.mjs";
36
+ import { KTree as T } from "./tree/index.mjs";
37
+ import { KTree as qo } from "./tree/index.mjs";
38
+ import { TableScroll as h } from "./tableScroll/index.mjs";
39
+ import { TableScroll as yo } from "./tableScroll/index.mjs";
40
+ import { KSelect as C, KOption as S } from "./select/index.mjs";
41
+ import { KOption as Ao, KSelect as Jo } from "./select/index.mjs";
42
+ import { KCheckbox as k, KCheckboxGroup as b } from "./checkbox/index.mjs";
43
+ import { KCheckbox as Qo, KCheckboxGroup as Ro } from "./checkbox/index.mjs";
44
+ import { KCollapse as g, KCollapseItem as I } from "./collapse/index.mjs";
45
+ import { KCollapse as Yo, KCollapseItem as Zo } from "./collapse/index.mjs";
46
+ import { Switch as B } from "./switch/index.mjs";
47
+ import { Switch as $o } from "./switch/index.mjs";
48
+ import { Timeline as D } from "./timeline/index.mjs";
49
+ import { Timeline as rr } from "./timeline/index.mjs";
50
+ import { Drag as U } from "./drag/index.mjs";
51
+ import { Drag as mr } from "./drag/index.mjs";
52
+ import { Sign as w } from "./sign/index.mjs";
53
+ import { Sign as pr } from "./sign/index.mjs";
54
+ const to = [o, r, m, p, f, i, a, l, x, s, t, e, B, D, U, n, u, c, T, k, b, g, I, w, K, C, S, h, d];
53
55
  export {
54
- mo as Button,
55
- Fo as Card,
56
- So as Dialog,
57
- $o as Drag,
58
- Ho as ECharts,
59
- Mo as HotMap,
60
- lo as Icon,
61
- Ao as KCheckbox,
62
- Jo as KCheckboxGroup,
63
- Qo as KCollapse,
64
- Ro as KCollapseItem,
65
- so as KInput,
66
- vo as KOption,
67
- yo as KSelect,
68
- uo as Link,
69
- bo as Scroll,
70
- ho as Shake,
71
- rr as Sign,
72
- Xo as Switch,
73
- jo as TableScroll,
74
- po as TextButton,
75
- Zo as Timeline,
76
- Io as Toast,
77
- io as Tooltip,
78
- Wo as Tree,
79
- Ko as Upload,
80
- wo as UploadFile,
81
- Do as Wheel,
82
- oo as default
56
+ po as Button,
57
+ Ho as Card,
58
+ bo as Dialog,
59
+ mr as Drag,
60
+ Vo as ECharts,
61
+ Po as HotMap,
62
+ so as Icon,
63
+ Qo as KCheckbox,
64
+ Ro as KCheckboxGroup,
65
+ Yo as KCollapse,
66
+ Zo as KCollapseItem,
67
+ uo as KInput,
68
+ Ao as KOption,
69
+ Jo as KSelect,
70
+ Mo as KVideo,
71
+ co as Link,
72
+ Io as Scroll,
73
+ So as Shake,
74
+ pr as Sign,
75
+ $o as Switch,
76
+ yo as TableScroll,
77
+ io as TextButton,
78
+ rr as Timeline,
79
+ Do as Toast,
80
+ lo as Tooltip,
81
+ qo as Tree,
82
+ ho as Upload,
83
+ Fo as UploadFile,
84
+ wo as Wheel,
85
+ to as default
83
86
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as I, ref as n, computed as R, openBlock as a, createElementBlock as p, normalizeClass as t, unref as l, createElementVNode as k, renderSlot as B, createBlock as w, createCommentVNode as u, withDirectives as V, mergeProps as j, vModelDynamic as x, createVNode as z, withModifiers as F, vShow as L } from "vue";
2
- import { Icon as c } from "../../icon/index.mjs";
1
+ import { defineComponent as I, ref as n, computed as D, openBlock as o, createElementBlock as m, normalizeClass as c, unref as a, createElementVNode as k, renderSlot as B, createBlock as b, createCommentVNode as s, withDirectives as V, mergeProps as R, vModelDynamic as j, createVNode as z, withModifiers as F, vShow as L } from "vue";
2
+ import { Icon as p } from "../../icon/index.mjs";
3
3
  import { createNamespace as O } from "../../../assets/ts/utils.mjs";
4
4
  import "./style/index.css";
5
5
  const T = ["type", "placeholder", "autofocus", "readonly", "disabled"], U = I({
@@ -19,97 +19,97 @@ const T = ["type", "placeholder", "autofocus", "readonly", "disabled"], U = I({
19
19
  autofocus: { type: Boolean, default: !1 }
20
20
  },
21
21
  emits: ["update:modelValue", "focus", "blur", "clear"],
22
- setup(C, { expose: M, emit: N }) {
23
- const o = C, r = N, { n: s } = O("input"), f = n(), m = n(o.autofocus), i = n(!0), v = n(o.type), y = n(!1), d = R({
24
- get: () => o.modelValue,
25
- set: (e) => {
26
- r("update:modelValue", e);
22
+ setup(e, { expose: C, emit: M }) {
23
+ const t = e, f = M, { n: u } = O("input"), r = n(), v = n(t.autofocus), i = n(!0), y = n(t.type), w = n(!1), d = D({
24
+ get: () => t.modelValue,
25
+ set: (l) => {
26
+ f("update:modelValue", l);
27
27
  }
28
- }), P = () => {
29
- m.value = !0, r("focus");
28
+ }), N = () => {
29
+ v.value = !0, f("focus");
30
+ }, P = () => {
31
+ v.value = !1, f("blur");
32
+ }, h = () => {
33
+ d.value = "", f("clear");
30
34
  }, $ = () => {
31
- m.value = !1, r("blur");
32
- }, b = () => {
33
- d.value = "", r("clear");
34
- }, g = () => {
35
- o.type === "password" && (i.value = !i.value, i.value ? v.value = o.type : v.value = "text");
35
+ t.type === "password" && (i.value = !i.value, i.value ? y.value = t.type : y.value = "text");
36
36
  };
37
- function E() {
38
- y.value = o.clearable && d.value;
37
+ function g() {
38
+ w.value = t.clearable && d.value;
39
39
  }
40
- function S() {
41
- y.value = !1;
40
+ function E() {
41
+ w.value = !1;
42
42
  }
43
- return M({
43
+ return C({
44
44
  blur: () => {
45
- var e;
46
- return (e = f.value) == null ? void 0 : e.blur();
45
+ var l;
46
+ return (l = r.value) == null ? void 0 : l.blur();
47
47
  },
48
48
  focus: () => {
49
- var e;
50
- return (e = f.value) == null ? void 0 : e.focus();
49
+ var l;
50
+ return (l = r.value) == null ? void 0 : l.focus();
51
51
  },
52
- clear: b,
53
- input: () => f.value
54
- }), (e, h) => (a(), p("div", {
55
- class: t([l(s)(), { "is-disabled": e.disabled }])
52
+ clear: h,
53
+ input: () => r.value
54
+ }), (l, x) => (o(), m("div", {
55
+ class: c([a(u)(), { "is-disabled": e.disabled }])
56
56
  }, [
57
57
  k("div", {
58
- class: t([l(s)("wrapper"), { "is-focus": m.value }]),
59
- onMouseenter: E,
60
- onMouseleave: S
58
+ class: c([a(u)("wrapper"), { "is-focus": v.value }]),
59
+ onMouseenter: g,
60
+ onMouseleave: E
61
61
  }, [
62
- e.$slots.prefix || e.prefixIcon ? (a(), p("span", {
62
+ l.$slots.prefix || e.prefixIcon ? (o(), m("span", {
63
63
  key: 0,
64
- class: t(l(s)("prefix"))
64
+ class: c(a(u)("prefix"))
65
65
  }, [
66
- B(e.$slots, "prefix"),
67
- e.prefixIcon ? (a(), w(l(c), {
66
+ B(l.$slots, "prefix"),
67
+ e.prefixIcon ? (o(), b(a(p), {
68
68
  key: 0,
69
69
  name: e.prefixIcon
70
- }, null, 8, ["name"])) : u("", !0)
71
- ], 2)) : u("", !0),
72
- V(k("input", j({
70
+ }, null, 8, ["name"])) : s("", !0)
71
+ ], 2)) : s("", !0),
72
+ V(k("input", R({
73
73
  ref_key: "inputRef",
74
- ref: f,
75
- "onUpdate:modelValue": h[0] || (h[0] = (D) => d.value = D),
76
- class: l(s)("inner"),
77
- type: v.value,
74
+ ref: r,
75
+ "onUpdate:modelValue": x[0] || (x[0] = (S) => d.value = S),
76
+ class: a(u)("inner"),
77
+ type: y.value,
78
78
  placeholder: e.placeholder,
79
79
  autofocus: e.autofocus,
80
80
  readonly: e.readonly,
81
81
  disabled: e.disabled,
82
- onFocus: P,
83
- onBlur: $
84
- }, e.$attrs), null, 16, T), [
85
- [x, d.value]
82
+ onFocus: N,
83
+ onBlur: P
84
+ }, l.$attrs), null, 16, T), [
85
+ [j, d.value]
86
86
  ]),
87
- e.showPassword || e.clearable ? (a(), p("span", {
87
+ e.showPassword || e.clearable ? (o(), m("span", {
88
88
  key: 1,
89
- class: t(l(s)("suffix"))
89
+ class: c(a(u)("suffix"))
90
90
  }, [
91
- e.showPassword ? (a(), w(l(c), {
91
+ e.showPassword ? (o(), b(a(p), {
92
92
  key: 0,
93
93
  name: i.value ? "view" : "hide",
94
- onClick: g
95
- }, null, 8, ["name"])) : u("", !0),
96
- V(z(l(c), {
94
+ onClick: $
95
+ }, null, 8, ["name"])) : s("", !0),
96
+ V(z(a(p), {
97
97
  name: "circle-close",
98
- onClick: F(b, ["stop"])
98
+ onClick: F(h, ["stop"])
99
99
  }, null, 512), [
100
- [L, y.value]
100
+ [L, w.value]
101
101
  ])
102
- ], 2)) : u("", !0),
103
- e.$slots.suffix || e.suffixIcon ? (a(), p("span", {
102
+ ], 2)) : s("", !0),
103
+ l.$slots.suffix || e.suffixIcon ? (o(), m("span", {
104
104
  key: 2,
105
- class: t(l(s)("suffix"))
105
+ class: c(a(u)("suffix"))
106
106
  }, [
107
- B(e.$slots, "suffix"),
108
- e.suffixIcon ? (a(), w(l(c), {
107
+ B(l.$slots, "suffix"),
108
+ e.suffixIcon ? (o(), b(a(p), {
109
109
  key: 0,
110
110
  name: e.suffixIcon
111
- }, null, 8, ["name"])) : u("", !0)
112
- ], 2)) : u("", !0)
111
+ }, null, 8, ["name"])) : s("", !0)
112
+ ], 2)) : s("", !0)
113
113
  ], 34)
114
114
  ], 2));
115
115
  }
@@ -1,10 +1,10 @@
1
- import { defineComponent as r, computed as p, openBlock as s, createElementBlock as l, normalizeClass as o, unref as c, normalizeStyle as t, renderSlot as n } from "vue";
2
- import { createNamespace as f } from "../../../assets/ts/utils.mjs";
1
+ import { defineComponent as m, computed as d, openBlock as l, createElementBlock as s, normalizeClass as o, unref as f, normalizeStyle as n, renderSlot as r } from "vue";
2
+ import { createNamespace as y } from "../../../assets/ts/utils.mjs";
3
3
  import "./style/index.css";
4
- const y = r({
4
+ const i = m({
5
5
  name: "k-overlay"
6
- }), C = r({
7
- ...y,
6
+ }), C = m({
7
+ ...i,
8
8
  props: {
9
9
  mask: { type: Boolean, default: !0 },
10
10
  customMaskEvent: { type: Boolean, default: !1 },
@@ -12,22 +12,22 @@ const y = r({
12
12
  zIndex: { default: 2e3 }
13
13
  },
14
14
  emits: [""],
15
- setup(m) {
16
- const u = m, { n: d } = f("overlay"), a = p(() => ({
17
- zIndex: u.zIndex
15
+ setup(e) {
16
+ const c = e, { n: u } = y("overlay"), a = d(() => ({
17
+ zIndex: c.zIndex
18
18
  }));
19
- return (e, i) => e.mask ? (s(), l("div", {
19
+ return (t, v) => e.mask ? (l(), s("div", {
20
20
  key: 0,
21
- class: o([c(d)(), e.overlayClass]),
22
- style: t(a.value)
21
+ class: o([f(u)(), e.overlayClass]),
22
+ style: n(a.value)
23
23
  }, [
24
- n(e.$slots, "default")
25
- ], 6)) : (s(), l("div", {
24
+ r(t.$slots, "default")
25
+ ], 6)) : (l(), s("div", {
26
26
  key: 1,
27
27
  class: o([e.overlayClass]),
28
- style: t(a.value)
28
+ style: n(a.value)
29
29
  }, [
30
- n(e.$slots, "default")
30
+ r(t.$slots, "default")
31
31
  ], 6));
32
32
  }
33
33
  });
@@ -1,7 +1,7 @@
1
- import { defineComponent as C, ref as Y, reactive as q, onMounted as L, openBlock as W, createElementBlock as F, normalizeStyle as E, withModifiers as p } from "vue";
2
- const O = C({
1
+ import { defineComponent as b, ref as Y, reactive as q, onMounted as L, openBlock as W, createElementBlock as F, normalizeStyle as E, withModifiers as m } from "vue";
2
+ const O = b({
3
3
  name: "k-sign"
4
- }), z = C({
4
+ }), z = b({
5
5
  ...O,
6
6
  props: {
7
7
  width: { default: 600 },
@@ -19,8 +19,8 @@ const O = C({
19
19
  isCrop: { type: Boolean, default: !0 }
20
20
  },
21
21
  emits: ["change"],
22
- setup(b, { expose: M, emit: I }) {
23
- const r = Y(), a = b, m = I, t = q({
22
+ setup(p, { expose: M, emit: I }) {
23
+ const r = Y(), a = p, x = I, t = q({
24
24
  sratio: 1,
25
25
  ctx: null,
26
26
  resImg: "",
@@ -39,23 +39,23 @@ const O = C({
39
39
  t.isMove = !0, f(o.pageX - t.offset.left, o.pageY - t.offset.top, !1);
40
40
  }, D = (o) => {
41
41
  t.isMove && f(o.pageX - t.offset.left, o.pageY - t.offset.top, !0);
42
- }, x = async () => {
42
+ }, v = async () => {
43
43
  t.isMove = !1;
44
- let o = await w();
45
- m("change", o);
46
- }, _ = (o) => {
44
+ let o = await y();
45
+ x("change", o);
46
+ }, R = (o) => {
47
47
  t.isMove = !0, f(
48
48
  o.changedTouches[0].clientX - t.offset.left,
49
49
  o.changedTouches[0].clientY - t.offset.top,
50
50
  !1
51
51
  );
52
- }, R = (o) => {
52
+ }, _ = (o) => {
53
53
  t.isMove && f(
54
54
  o.changedTouches[0].clientX - t.offset.left,
55
55
  o.changedTouches[0].clientY - t.offset.top,
56
56
  !0
57
57
  );
58
- }, v = () => {
58
+ }, w = () => {
59
59
  t.isMove = !1;
60
60
  }, B = (o) => {
61
61
  let c = r.value.width, u = r.value.height, h = 0, l = 0;
@@ -74,9 +74,9 @@ const O = C({
74
74
  const l = document.createElement("canvas"), g = l.getContext("2d");
75
75
  let i, n, e;
76
76
  c % 90 != 0 && console.error("\u65CB\u8F6C\u89D2\u5EA6\u5FC5\u987B\u662F90\u7684\u500D\u6570!");
77
- const y = c / 90 % 4, s = { sx: 0, sy: 0, ex: 0, ey: 0 }, d = new Image();
77
+ const C = c / 90 % 4, s = { sx: 0, sy: 0, ex: 0, ey: 0 }, d = new Image();
78
78
  d.crossOrigin = "anonymous", d.src = o, d.onload = function() {
79
- switch (i = d.width, n = d.height, e = i > n ? i : n, l.width = e * 2, l.height = e * 2, y) {
79
+ switch (i = d.width, n = d.height, e = i > n ? i : n, l.width = e * 2, l.height = e * 2, C) {
80
80
  case 0:
81
81
  s.sx = e, s.sy = e, s.ex = e + i, s.ey = e + n;
82
82
  break;
@@ -92,9 +92,9 @@ const O = C({
92
92
  }
93
93
  g.translate(e, e), g.rotate(c * Math.PI / 180), g.drawImage(d, 0, 0);
94
94
  var X = g.getImageData(s.sx, s.sy, s.ex, s.ey);
95
- y % 2 == 0 ? (l.width = i, l.height = n) : (l.width = n, l.height = i), g.putImageData(X, 0, 0), h(l.toDataURL(u, a.quality));
95
+ C % 2 == 0 ? (l.width = i, l.height = n) : (l.width = n, l.height = i), g.putImageData(X, 0, 0), h(l.toDataURL(u, a.quality));
96
96
  };
97
- }), w = () => new Promise((o) => {
97
+ }), y = () => new Promise((o) => {
98
98
  const c = t.ctx.getImageData(0, 0, r.value.width, r.value.height), u = B(c.data), h = document.createElement("canvas"), l = h.getContext("2d");
99
99
  h.width = u[2] - u[0], h.height = u[3] - u[1];
100
100
  const g = t.ctx.getImageData(...u);
@@ -109,26 +109,26 @@ const O = C({
109
109
  }) : o(n);
110
110
  }), S = () => {
111
111
  t.ctx.beginPath(), t.ctx.clearRect(0, 0, a.width, a.height), t.ctx.closePath(), setTimeout(() => {
112
- m("change", "");
112
+ x("change", "");
113
113
  }, 1e3);
114
114
  };
115
115
  return L(() => {
116
116
  setTimeout(T, 100);
117
117
  }), M({
118
118
  clearCanvas: S,
119
- createImg: w
119
+ createImg: y
120
120
  }), (o, c) => (W(), F("canvas", {
121
121
  ref_key: "vueSign",
122
122
  ref: r,
123
- style: E({ background: o.bgColor }),
123
+ style: E({ background: p.bgColor }),
124
124
  onMousedown: k,
125
125
  onMousemove: D,
126
- onMouseup: x,
127
- onMouseleave: x,
128
- onTouchstart: p(_, ["stop"]),
129
- onTouchmove: p(R, ["stop"]),
130
- onTouchend: p(v, ["stop"]),
131
- onTouchcancel: p(v, ["stop"])
126
+ onMouseup: v,
127
+ onMouseleave: v,
128
+ onTouchstart: m(R, ["stop"]),
129
+ onTouchmove: m(_, ["stop"]),
130
+ onTouchend: m(w, ["stop"]),
131
+ onTouchcancel: m(w, ["stop"])
132
132
  }, null, 36));
133
133
  }
134
134
  });
@@ -1,10 +1,10 @@
1
- import { defineComponent as f, computed as c, openBlock as o, createElementBlock as s, normalizeClass as a, unref as l, normalizeStyle as k, withDirectives as B, createElementVNode as d, vModelCheckbox as T, toDisplayString as r, createCommentVNode as u, createBlock as w } from "vue";
2
- import { addUnit as C, createNamespace as N } from "../../../assets/ts/utils.mjs";
3
- import { Icon as P } from "../../icon/index.mjs";
1
+ import { defineComponent as h, computed as r, openBlock as c, createElementBlock as o, normalizeClass as a, unref as l, normalizeStyle as V, withDirectives as k, createElementVNode as s, vModelCheckbox as B, toDisplayString as m, createCommentVNode as d, createBlock as T } from "vue";
2
+ import { addUnit as w, createNamespace as C } from "../../../assets/ts/utils.mjs";
3
+ import { Icon as N } from "../../icon/index.mjs";
4
4
  import "./style/index.css";
5
- const S = ["disabled"], x = { class: "is-text" }, z = f({
5
+ const P = ["disabled"], S = { class: "is-text" }, z = h({
6
6
  name: "k-switch"
7
- }), M = f({
7
+ }), M = h({
8
8
  ...z,
9
9
  props: {
10
10
  modelValue: { type: [Number, String, Boolean], default: !1 },
@@ -18,59 +18,59 @@ const S = ["disabled"], x = { class: "is-text" }, z = f({
18
18
  width: { default: "" }
19
19
  },
20
20
  emits: ["update:modelValue", "change"],
21
- setup(v, { emit: h }) {
22
- const t = v, p = h, { n: i } = N("switch"), n = c({
21
+ setup(e, { emit: p }) {
22
+ const t = e, f = p, { n: i } = C("switch"), n = r({
23
23
  get: () => t.modelValue === t.activeValue,
24
- set: (e) => {
25
- p("update:modelValue", e ? t.activeValue : t.inactiveValue), p("change", e ? t.activeValue : t.inactiveValue);
24
+ set: (u) => {
25
+ f("update:modelValue", u ? t.activeValue : t.inactiveValue), f("change", u ? t.activeValue : t.inactiveValue);
26
26
  }
27
- }), y = c(() => {
27
+ }), y = r(() => {
28
28
  if (t.width)
29
- return { width: C(t.width) };
30
- }), b = c(() => t.inlinePrompt ? n.value ? t.activeText : t.inactiveText : "");
29
+ return { width: w(t.width) };
30
+ }), b = r(() => t.inlinePrompt ? n.value ? t.activeText : t.inactiveText : "");
31
31
  function g() {
32
32
  t.disabled || (n.value = !n.value);
33
33
  }
34
- return (e, m) => (o(), s("div", {
34
+ return (u, v) => (c(), o("div", {
35
35
  class: a([l(i)(), { "is-checked": n.value, "is-disabled": e.disabled }]),
36
36
  onClick: g,
37
- style: k(y.value)
37
+ style: V(y.value)
38
38
  }, [
39
- B(d("input", {
40
- "onUpdate:modelValue": m[0] || (m[0] = (V) => n.value = V),
39
+ k(s("input", {
40
+ "onUpdate:modelValue": v[0] || (v[0] = (x) => n.value = x),
41
41
  class: a(l(i)("input")),
42
42
  type: "checkbox",
43
43
  disabled: e.disabled
44
- }, null, 10, S), [
45
- [T, n.value]
44
+ }, null, 10, P), [
45
+ [B, n.value]
46
46
  ]),
47
- !e.inlinePrompt && e.inactiveText ? (o(), s("span", {
47
+ !e.inlinePrompt && e.inactiveText ? (c(), o("span", {
48
48
  key: 0,
49
49
  class: a(l(i)("label--left"))
50
- }, r(e.inactiveText), 3)) : u("", !0),
51
- d("span", {
50
+ }, m(e.inactiveText), 3)) : d("", !0),
51
+ s("span", {
52
52
  class: a(l(i)("core"))
53
53
  }, [
54
- e.inlinePrompt ? (o(), s("span", {
54
+ e.inlinePrompt ? (c(), o("span", {
55
55
  key: 0,
56
56
  class: a(l(i)("inner"))
57
57
  }, [
58
- d("span", x, r(b.value), 1)
59
- ], 2)) : u("", !0),
60
- d("div", {
58
+ s("span", S, m(b.value), 1)
59
+ ], 2)) : d("", !0),
60
+ s("div", {
61
61
  class: a(l(i)("action"))
62
62
  }, [
63
- e.loading ? (o(), w(l(P), {
63
+ e.loading ? (c(), T(l(N), {
64
64
  key: 0,
65
65
  class: a({ "is-loading": e.loading }),
66
66
  name: "loading"
67
- }, null, 8, ["class"])) : u("", !0)
67
+ }, null, 8, ["class"])) : d("", !0)
68
68
  ], 2)
69
69
  ], 2),
70
- !e.inlinePrompt && e.activeText ? (o(), s("span", {
70
+ !e.inlinePrompt && e.activeText ? (c(), o("span", {
71
71
  key: 1,
72
72
  class: a(l(i)("label--right"))
73
- }, r(e.activeText), 3)) : u("", !0)
73
+ }, m(e.activeText), 3)) : d("", !0)
74
74
  ], 6));
75
75
  }
76
76
  });