@solar-taro/ui-sun 1.6.4 → 2.0.0

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 (105) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/accordion/index.vue.d.ts +22 -16
  3. package/chip/index.vue.d.ts +15 -36
  4. package/circular-progress/index.vue.d.ts +4 -30
  5. package/fab/fab-group.vue.d.ts +9 -3
  6. package/fab/fab.vue.d.ts +9 -3
  7. package/fab/index.scss +11 -3
  8. package/icon/index.scss +4 -3
  9. package/icon/index.vue.d.ts +3 -22
  10. package/index.d.ts +3 -0
  11. package/index.js +28 -22
  12. package/index10.js +24 -33
  13. package/index11.js +34 -20
  14. package/index12.js +72 -46
  15. package/index13.js +19 -144
  16. package/index14.js +48 -28
  17. package/index15.js +144 -21
  18. package/index16.js +29 -24
  19. package/index17.js +19 -10
  20. package/index18.js +41 -27
  21. package/index19.js +23 -118
  22. package/index20.js +15 -9
  23. package/index21.js +33 -10
  24. package/index22.js +123 -10
  25. package/index23.js +14 -2
  26. package/index24.js +10 -2
  27. package/index25.js +10 -2
  28. package/index26.js +1 -1
  29. package/index27.js +2 -7
  30. package/index28.js +1 -1
  31. package/index29.js +7 -2
  32. package/index30.js +1 -1
  33. package/index31.js +1 -1
  34. package/index32.js +1 -1
  35. package/index33.js +1 -1
  36. package/index34.js +1 -1
  37. package/index35.js +1 -1
  38. package/index37.js +1 -1
  39. package/index38.js +1 -1
  40. package/index39.js +1 -1
  41. package/index40.js +1 -1
  42. package/index41.js +2 -66
  43. package/index42.js +2 -12
  44. package/index43.js +2 -25
  45. package/index44.js +2 -14
  46. package/index45.js +2 -5
  47. package/index46.js +2 -3
  48. package/index47.js +3 -26
  49. package/index48.js +66 -2
  50. package/index49.js +12 -506
  51. package/index50.js +24 -78
  52. package/index51.js +14 -70
  53. package/index52.js +4 -68
  54. package/index53.js +525 -542
  55. package/index54.js +26 -2
  56. package/index56.js +506 -2
  57. package/index57.js +78 -3
  58. package/index58.js +70 -2
  59. package/index59.js +69 -4
  60. package/index60.js +543 -2
  61. package/index63.js +2 -48
  62. package/index64.js +3 -81
  63. package/index66.js +4 -2
  64. package/index67.js +2 -2
  65. package/index68.js +2 -2
  66. package/index69.js +4 -0
  67. package/index7.js +7 -9
  68. package/index70.js +4 -0
  69. package/index71.js +50 -0
  70. package/index72.js +84 -0
  71. package/index73.js +4 -0
  72. package/index74.js +4 -0
  73. package/index75.js +4 -0
  74. package/index8.js +29 -17
  75. package/index9.js +19 -25
  76. package/item/index.d.ts +1 -0
  77. package/item/index.scss +40 -0
  78. package/item/index.vue.d.ts +26 -0
  79. package/lazy-render/index.vue.d.ts +13 -29
  80. package/list-header/index.scss +1 -1
  81. package/list-header/index.vue.d.ts +9 -3
  82. package/navbar/index.vue.d.ts +10 -4
  83. package/package.json +2 -2
  84. package/plugin.d.ts +0 -1
  85. package/popover/index.vue.d.ts +24 -41
  86. package/qrcode/index.d.ts +1 -0
  87. package/qrcode/index.scss +9 -0
  88. package/qrcode/index.vue.d.ts +22 -0
  89. package/qrcode/qrcodegen.d.ts +83 -0
  90. package/segment/injection.d.ts +0 -1
  91. package/segment/segment-btn.vue.d.ts +12 -16
  92. package/segment/segment.vue.d.ts +16 -20
  93. package/slider-captcha/index.vue.d.ts +7 -36
  94. package/spinner/index.scss +1 -0
  95. package/spinner/index.vue.d.ts +14 -33
  96. package/sudoku/sudoku-item.vue.d.ts +9 -3
  97. package/sudoku/sudoku.vue.d.ts +9 -3
  98. package/tabbar/index.d.ts +1 -0
  99. package/tabbar/index.scss +74 -0
  100. package/tabbar/index.vue.d.ts +38 -0
  101. package/table/_table.scss +1 -1
  102. package/table/table-cell.vue.d.ts +13 -24
  103. package/table/table-row.vue.d.ts +12 -17
  104. package/table/table.vue.d.ts +17 -43
  105. package/virtual-scroll/index.vue.d.ts +35 -74
package/index13.js CHANGED
@@ -1,150 +1,25 @@
1
- import { defineComponent as J, ref as d, computed as M, onMounted as q, onUnmounted as F, unref as K, normalizeStyle as O, createElementVNode as Q, openBlock as X, createBlock as Y, createCommentVNode as ee, toDisplayString as te, normalizeClass as ae, createElementBlock as ne } from "vue";
2
- import { HttpClient as se, withInterceptors as oe } from "@ngify/http";
3
- import { withPixel as B } from "@solar-kit/core";
4
- import { CaptchaType as S } from "@solar-kit/planets/mercury";
5
- import { filterResult as ie } from "@solar-kit/planets/sun";
6
- import { useCommonInterceptor as re } from "@solar-taro/http";
7
- import { SunSpinner as ce } from "@solar-taro/ui-sun";
8
- import { createSelectorQuery as le, getWindowInfo as pe } from "@tarojs/taro";
9
- import { a as ue } from "./index41.js";
10
- import { e as D } from "./index42.js";
11
- import de from "./index43.js";
12
- import me from "./index44.js";
13
- import { attachLoading as ve } from "./index45.js";
14
- const g = K, H = O, o = Q, w = X, fe = Y, N = ee, he = te, U = ae, $ = ne, ye = { class: "sun-slider-captcha" }, ge = { class: "sun-slider-captcha-container" }, we = { class: "sun-slider-captcha-mask" }, ke = { class: "sun-slider-captcha-track" }, _e = ["x", "disabled"], V = "sun-slider-captcha", be = 155, Ie = 310, ze = 155, xe = 50, Le = /* @__PURE__ */ J({
15
- __name: "index",
1
+ import { defineComponent as p, inject as a, getCurrentInstance as c, onUnmounted as m, unref as u, renderSlot as i, mergeProps as _, openBlock as f, createElementBlock as v } from "vue";
2
+ import { ACTIVE_CHILD as d, PARENT as g } from "./index47.js";
3
+ const o = u, k = i, C = _, B = f, E = v, $ = /* @__PURE__ */ p({
4
+ __name: "segment-btn",
16
5
  props: {
17
- height: { default: 187.5 },
18
- width: { default: 375 },
19
- url: {},
20
- verifyUrl: {},
21
- verifyData: {}
6
+ value: {}
22
7
  },
23
- emits: ["verified"],
24
- setup(Z, { emit: L }) {
25
- let c, p, m, v, k, _ = !1;
26
- const i = Z, R = L, l = d(0), f = d(!1), b = d(!1), y = M(() => ({
27
- width: i.width / Ie,
28
- height: i.height / be
29
- })), I = new se(
30
- oe([
31
- re()
32
- ])
33
- ), n = d({
34
- visible: !1,
35
- type: "success",
36
- content: ""
37
- }), h = d({ type: "primary" }), r = { key: "", token: "" };
38
- function z() {
39
- f.value = !0, I.post(i.url, { captchaType: S.BlockPuzzle }).pipe(
40
- ie()
41
- ).subscribe(async ({ data: t }) => {
42
- r.key = t.secretKey, r.token = t.token, m = c.createImage(), v = c.createImage(), m.src = `data:image/png;base64,${t.originalImageBase64}`, v.src = `data:image/png;base64,${t.jigsawImageBase64}`, await Promise.all([
43
- new Promise((e) => m.onload = () => e()),
44
- new Promise((e) => v.onload = () => e())
45
- ]), k = Date.now(), x(), f.value = !1;
46
- });
47
- }
48
- function x(t = 0) {
49
- const e = i.width, a = i.height;
50
- p.clearRect(0, 0, e, a), p.drawImage(m, 0, 0, e, a), p.drawImage(v, t, 0, y.value.width * xe, y.value.height * ze), l.value = t;
51
- }
52
- function W(t) {
53
- t = t / y.value.width;
54
- const e = Date.now(), a = JSON.stringify({ x: t, y: 5 }), s = r.key ? E(a, r.key) : a, C = {
55
- captchaType: S.BlockPuzzle,
56
- pointJson: s,
57
- token: r.token,
58
- ...i.verifyData
59
- };
60
- I.post(i.verifyUrl, C).pipe(
61
- ve(b)
62
- ).subscribe({
63
- next: (u) => {
64
- if (u.code !== 0)
65
- n.value.type = "danger", n.value.content = u.msg, n.value.visible = !0, h.value.type = "danger", setTimeout(() => {
66
- n.value.visible = !1, z();
67
- }, 1e3);
68
- else {
69
- const G = ((e - k) / 1e3).toFixed(2);
70
- n.value.type = "success", n.value.content = `验证成功,耗时 ${G} 秒`, n.value.visible = !0, h.value.type = "primary";
71
- const P = u.data.token + "---" + a;
72
- u.data.captcha = r.key ? E(P, r.key) : P;
73
- }
74
- R("verified", u);
75
- }
76
- });
77
- }
78
- function E(t, e) {
79
- const a = D.parse(e), s = D.parse(t);
80
- return ue.encrypt(s, a, { mode: de, padding: me }).toString();
81
- }
82
- function j(t) {
83
- l.value = t.x, x(l.value);
84
- }
85
- function A() {
86
- W(l.value);
87
- }
88
- function T() {
89
- setTimeout(() => {
90
- le().select(`#${V}`).fields({ node: !0, size: !0 }).exec(([{ node: t, width: e, height: a }]) => {
91
- if (_) return;
92
- if (!a || !e)
93
- return T();
94
- const s = pe().pixelRatio;
95
- c = t, p = c.getContext("2d"), c.width = e * s, c.height = a * s, p.scale(s, s), z();
96
- });
97
- }, 50);
98
- }
99
- return q(() => {
100
- T();
101
- }), F(() => {
102
- _ = !0;
103
- }), (t, e) => (w(), $("view", ye, [
104
- o("view", ge, [
105
- o("canvas", {
106
- id: V,
107
- type: "2d",
108
- class: "sun-slider-captcha-canvas",
109
- style: H({ height: g(B)(t.height), width: g(B)(t.width) })
110
- }, null, 4),
111
- o("view", we, [
112
- f.value ? (w(), fe(g(ce), { key: 0 })) : N("", !0),
113
- n.value.visible ? (w(), $("view", {
114
- key: 1,
115
- class: U(["sun-slider-captcha-alert", {
116
- "sun-slider-captcha-alert-success": n.value.type === "success",
117
- "sun-slider-captcha-alert-danger": n.value.type === "danger"
118
- }])
119
- }, he(n.value.content), 3)) : N("", !0)
120
- ])
121
- ]),
122
- o("movable-area", ke, [
123
- e[3] || (e[3] = o("view", { class: "sun-slider-captcha-hint" }, "拖动滑块以完成拼图", -1)),
124
- o("view", {
125
- class: U(["sun-slider-captcha-indicator", {
126
- "sun-slider-captcha-indicator-primary": h.value.type === "primary",
127
- "sun-slider-captcha-indicator-danger": h.value.type === "danger"
128
- }]),
129
- style: H({ transform: `translateX(calc(-100% + ${l.value}px))` })
130
- }, null, 6),
131
- o("movable-view", {
132
- class: "sun-slider-captcha-handler",
133
- x: l.value,
134
- direction: "horizontal",
135
- disabled: f.value || b.value,
136
- onChangePassive: e[0] || (e[0] = (a) => j(a.detail)),
137
- onTouchendPassive: e[1] || (e[1] = (a) => A())
138
- }, e[2] || (e[2] = [
139
- o("van-icon", {
140
- name: "wap-nav",
141
- style: { transform: "rotate(90deg)" }
142
- }, null, -1)
143
- ]), 40, _e)
144
- ])
145
- ]));
8
+ setup(b) {
9
+ const l = a(d), e = a(g), n = c();
10
+ return m(() => {
11
+ e.unlink(n);
12
+ }), e.link(n), (t, r) => {
13
+ var s;
14
+ return B(), E("view", C(t.$attrs, {
15
+ class: ["sun-segment-btn", { "sun-segment-btn-active": ((s = o(l)) == null ? void 0 : s.props.value) === t.value }],
16
+ onTap: r[0] || (r[0] = (I) => o(e).active(o(n)))
17
+ }), [
18
+ k(t.$slots, "default")
19
+ ], 16);
20
+ };
146
21
  }
147
22
  });
148
23
  export {
149
- Le as default
24
+ $ as default
150
25
  };
package/index14.js CHANGED
@@ -1,35 +1,55 @@
1
- import { defineComponent as a, computed as c, renderList as d, Fragment as m, openBlock as p, createElementBlock as u, createElementVNode as _, renderSlot as f, createCommentVNode as k, normalizeClass as g } from "vue";
2
- const v = d, B = m, e = p, n = u, o = _, C = f, N = k, w = g, z = { class: "sun-spinner-dot" }, E = {
3
- key: 0,
4
- class: "sun-spinner-desc"
5
- }, y = /* @__PURE__ */ a({
6
- __name: "index",
1
+ import { defineComponent as x, getCurrentInstance as V, shallowRef as E, shallowReactive as k, computed as a, provide as i, watch as C, onMounted as w, renderSlot as y, createElementVNode as B, mergeProps as I, openBlock as O, createElementBlock as A } from "vue";
2
+ import { ACTIVE_CHILD as N, PARENT as P } from "./index47.js";
3
+ const R = y, T = B, b = I, L = O, S = A, $ = { class: "sun-segment-inner" }, M = /* @__PURE__ */ x({
4
+ __name: "segment",
7
5
  props: {
8
- size: { default: "middle" },
9
- spinning: { type: Boolean, default: !0 }
6
+ modelValue: {}
10
7
  },
11
- setup(r) {
12
- const s = r, l = c(() => [
13
- {
14
- "sun-spinner-spinning": s.spinning
8
+ emits: ["update:modelValue", "change"],
9
+ setup(p, { emit: v }) {
10
+ const r = v, c = p, m = V(), o = E(null), t = k([]), d = a(() => t.indexOf(o.value)), f = a(() => t.length), g = a(() => ({
11
+ "--segment-length": f.value,
12
+ "--segment-active-index": d.value
13
+ }));
14
+ i(N, o), i(P, {
15
+ link: (e) => {
16
+ const n = u();
17
+ t.push(e), t.sort((s, l) => {
18
+ const h = n.indexOf(s.vnode), _ = n.indexOf(l.vnode);
19
+ return h - _;
20
+ });
15
21
  },
16
- `sun-spinner-${s.size}`
17
- ]);
18
- return (t, V) => (e(), n("view", {
19
- class: w(["sun-spinner", l.value])
20
- }, [
21
- o("view", z, [
22
- (e(), n(B, null, v(4, (i) => o("view", {
23
- key: i,
24
- class: "sun-spinner-dot-item"
25
- })), 64))
26
- ]),
27
- t.$slots.default ? (e(), n("view", E, [
28
- C(t.$slots, "default")
29
- ])) : N("", !0)
30
- ], 2));
22
+ unlink: (e) => {
23
+ t.slice(t.indexOf(e), 1);
24
+ },
25
+ active: (e) => {
26
+ r("change", {
27
+ value: e.props.value,
28
+ index: d.value
29
+ }), r("update:modelValue", e.props.value), o.value = e;
30
+ }
31
+ }), C(() => c.modelValue, (e) => {
32
+ o.value = t.find((n) => n.props.value === e);
33
+ });
34
+ function u() {
35
+ return m.subTree.children[0].children[0].children.filter((e) => typeof e.type != "symbol");
36
+ }
37
+ return w(() => {
38
+ const e = u();
39
+ t.forEach((n) => {
40
+ const s = e.findIndex((l) => l === n.vnode);
41
+ n.props.value === void 0 && (n.props.value = s), n.props.value === c.modelValue && (o.value = n);
42
+ });
43
+ }), (e, n) => (L(), S("view", b(e.$attrs, {
44
+ class: "sun-segment",
45
+ style: g.value
46
+ }), [
47
+ T("view", $, [
48
+ R(e.$slots, "default")
49
+ ])
50
+ ], 16));
31
51
  }
32
52
  });
33
53
  export {
34
- y as default
54
+ M as default
35
55
  };
package/index15.js CHANGED
@@ -1,27 +1,150 @@
1
- import { defineComponent as u, computed as n, renderSlot as c, mergeProps as r, openBlock as l, createElementBlock as d } from "vue";
2
- const a = c, m = r, p = l, k = d, _ = /* @__PURE__ */ u({
3
- __name: "sudoku",
1
+ import { defineComponent as J, ref as d, computed as M, onMounted as q, onUnmounted as F, unref as K, normalizeStyle as O, createElementVNode as Q, openBlock as X, createBlock as Y, createCommentVNode as ee, toDisplayString as te, normalizeClass as ae, createElementBlock as ne } from "vue";
2
+ import { HttpClient as se, withInterceptors as oe } from "@ngify/http";
3
+ import { withPixel as B } from "@solar-kit/core";
4
+ import { CaptchaType as S } from "@solar-kit/planets/mercury";
5
+ import { filterResult as ie } from "@solar-kit/planets/sun";
6
+ import { useCommonInterceptor as re } from "@solar-taro/http";
7
+ import { SunSpinner as ce } from "@solar-taro/ui-sun";
8
+ import { createSelectorQuery as le, getWindowInfo as pe } from "@tarojs/taro";
9
+ import { a as ue } from "./index48.js";
10
+ import { e as D } from "./index49.js";
11
+ import de from "./index50.js";
12
+ import me from "./index51.js";
13
+ import { attachLoading as ve } from "./index52.js";
14
+ const g = K, H = O, o = Q, w = X, fe = Y, N = ee, he = te, U = ae, $ = ne, ye = { class: "sun-slider-captcha" }, ge = { class: "sun-slider-captcha-container" }, we = { class: "sun-slider-captcha-mask" }, ke = { class: "sun-slider-captcha-track" }, _e = ["x", "disabled"], V = "sun-slider-captcha", be = 155, Ie = 310, ze = 155, xe = 50, Le = /* @__PURE__ */ J({
15
+ __name: "index",
4
16
  props: {
5
- size: String,
6
- count: {
7
- type: Number,
8
- default: 9
9
- }
17
+ height: { default: 187.5 },
18
+ width: { default: 375 },
19
+ url: {},
20
+ verifyUrl: {},
21
+ verifyData: {}
10
22
  },
11
- setup(o) {
12
- const e = o, t = n(() => ({
13
- "sun-sudoku-sm": e.count === 1,
14
- "sun-sudoku-md": e.count === 2 || e.count === 4,
15
- "sun-sudoku-lg": e.count === 3 || e.count > 4
16
- }));
17
- return (s, i) => (p(), k("view", m(s.$attrs, {
18
- class: ["sun-sudoku", t.value],
19
- style: { "--sudoku-width": o.size }
20
- }), [
21
- a(s.$slots, "default")
22
- ], 16));
23
+ emits: ["verified"],
24
+ setup(Z, { emit: L }) {
25
+ let c, p, m, v, k, _ = !1;
26
+ const i = Z, R = L, l = d(0), f = d(!1), b = d(!1), y = M(() => ({
27
+ width: i.width / Ie,
28
+ height: i.height / be
29
+ })), I = new se(
30
+ oe([
31
+ re()
32
+ ])
33
+ ), n = d({
34
+ visible: !1,
35
+ type: "success",
36
+ content: ""
37
+ }), h = d({ type: "primary" }), r = { key: "", token: "" };
38
+ function z() {
39
+ f.value = !0, I.post(i.url, { captchaType: S.BlockPuzzle }).pipe(
40
+ ie()
41
+ ).subscribe(async ({ data: t }) => {
42
+ r.key = t.secretKey, r.token = t.token, m = c.createImage(), v = c.createImage(), m.src = `data:image/png;base64,${t.originalImageBase64}`, v.src = `data:image/png;base64,${t.jigsawImageBase64}`, await Promise.all([
43
+ new Promise((e) => m.onload = () => e()),
44
+ new Promise((e) => v.onload = () => e())
45
+ ]), k = Date.now(), x(), f.value = !1;
46
+ });
47
+ }
48
+ function x(t = 0) {
49
+ const e = i.width, a = i.height;
50
+ p.clearRect(0, 0, e, a), p.drawImage(m, 0, 0, e, a), p.drawImage(v, t, 0, y.value.width * xe, y.value.height * ze), l.value = t;
51
+ }
52
+ function W(t) {
53
+ t = t / y.value.width;
54
+ const e = Date.now(), a = JSON.stringify({ x: t, y: 5 }), s = r.key ? E(a, r.key) : a, C = {
55
+ captchaType: S.BlockPuzzle,
56
+ pointJson: s,
57
+ token: r.token,
58
+ ...i.verifyData
59
+ };
60
+ I.post(i.verifyUrl, C).pipe(
61
+ ve(b)
62
+ ).subscribe({
63
+ next: (u) => {
64
+ if (u.code !== 0)
65
+ n.value.type = "danger", n.value.content = u.msg, n.value.visible = !0, h.value.type = "danger", setTimeout(() => {
66
+ n.value.visible = !1, z();
67
+ }, 1e3);
68
+ else {
69
+ const G = ((e - k) / 1e3).toFixed(2);
70
+ n.value.type = "success", n.value.content = `验证成功,耗时 ${G} 秒`, n.value.visible = !0, h.value.type = "primary";
71
+ const P = u.data.token + "---" + a;
72
+ u.data.captcha = r.key ? E(P, r.key) : P;
73
+ }
74
+ R("verified", u);
75
+ }
76
+ });
77
+ }
78
+ function E(t, e) {
79
+ const a = D.parse(e), s = D.parse(t);
80
+ return ue.encrypt(s, a, { mode: de, padding: me }).toString();
81
+ }
82
+ function j(t) {
83
+ l.value = t.x, x(l.value);
84
+ }
85
+ function A() {
86
+ W(l.value);
87
+ }
88
+ function T() {
89
+ setTimeout(() => {
90
+ le().select(`#${V}`).fields({ node: !0, size: !0 }).exec(([{ node: t, width: e, height: a }]) => {
91
+ if (_) return;
92
+ if (!a || !e)
93
+ return T();
94
+ const s = pe().pixelRatio;
95
+ c = t, p = c.getContext("2d"), c.width = e * s, c.height = a * s, p.scale(s, s), z();
96
+ });
97
+ }, 50);
98
+ }
99
+ return q(() => {
100
+ T();
101
+ }), F(() => {
102
+ _ = !0;
103
+ }), (t, e) => (w(), $("view", ye, [
104
+ o("view", ge, [
105
+ o("canvas", {
106
+ id: V,
107
+ type: "2d",
108
+ class: "sun-slider-captcha-canvas",
109
+ style: H({ height: g(B)(t.height), width: g(B)(t.width) })
110
+ }, null, 4),
111
+ o("view", we, [
112
+ f.value ? (w(), fe(g(ce), { key: 0 })) : N("", !0),
113
+ n.value.visible ? (w(), $("view", {
114
+ key: 1,
115
+ class: U(["sun-slider-captcha-alert", {
116
+ "sun-slider-captcha-alert-success": n.value.type === "success",
117
+ "sun-slider-captcha-alert-danger": n.value.type === "danger"
118
+ }])
119
+ }, he(n.value.content), 3)) : N("", !0)
120
+ ])
121
+ ]),
122
+ o("movable-area", ke, [
123
+ e[3] || (e[3] = o("view", { class: "sun-slider-captcha-hint" }, "拖动滑块以完成拼图", -1)),
124
+ o("view", {
125
+ class: U(["sun-slider-captcha-indicator", {
126
+ "sun-slider-captcha-indicator-primary": h.value.type === "primary",
127
+ "sun-slider-captcha-indicator-danger": h.value.type === "danger"
128
+ }]),
129
+ style: H({ transform: `translateX(calc(-100% + ${l.value}px))` })
130
+ }, null, 6),
131
+ o("movable-view", {
132
+ class: "sun-slider-captcha-handler",
133
+ x: l.value,
134
+ direction: "horizontal",
135
+ disabled: f.value || b.value,
136
+ onChangePassive: e[0] || (e[0] = (a) => j(a.detail)),
137
+ onTouchendPassive: e[1] || (e[1] = (a) => A())
138
+ }, e[2] || (e[2] = [
139
+ o("van-icon", {
140
+ name: "wap-nav",
141
+ style: { transform: "rotate(90deg)" }
142
+ }, null, -1)
143
+ ]), 40, _e)
144
+ ])
145
+ ]));
23
146
  }
24
147
  });
25
148
  export {
26
- _ as default
149
+ Le as default
27
150
  };
package/index16.js CHANGED
@@ -1,30 +1,35 @@
1
- import { defineComponent as o, computed as i, renderSlot as r, mergeProps as n, openBlock as c, createElementBlock as a } from "vue";
2
- const p = r, d = n, m = c, h = a, b = /* @__PURE__ */ o({
3
- __name: "table-cell",
1
+ import { defineComponent as a, computed as c, renderList as d, Fragment as m, openBlock as p, createElementBlock as u, createElementVNode as _, renderSlot as f, createCommentVNode as k, normalizeClass as g } from "vue";
2
+ const v = d, B = m, e = p, n = u, o = _, C = f, N = k, w = g, z = { class: "sun-spinner-dot" }, E = {
3
+ key: 0,
4
+ class: "sun-spinner-desc"
5
+ }, y = /* @__PURE__ */ a({
6
+ __name: "index",
4
7
  props: {
5
- sticky: {},
6
- head: { type: Boolean },
7
- width: {},
8
- maxWidth: {},
9
- ellipsis: { type: Boolean },
10
- breakWord: { type: Boolean }
8
+ size: { default: "middle" },
9
+ spinning: { type: Boolean, default: !0 }
11
10
  },
12
- setup(l) {
13
- const e = l, s = i(() => ({
14
- "sun-tb-cell-sticky-left": e.sticky === "left",
15
- "sun-tb-cell-sticky-right": e.sticky === "right",
16
- "sun-tb-cell-ellipsis": e.ellipsis,
17
- "sun-tb-cell-head": e.ellipsis,
18
- "sun-tb-cell-break-word": e.breakWord
19
- }));
20
- return (t, u) => (m(), h("view", d(t.$attrs, {
21
- class: ["sun-tb-cell", s.value],
22
- style: { width: t.width, "min-width": t.width, "max-width": t.maxWidth }
23
- }), [
24
- p(t.$slots, "default")
25
- ], 16));
11
+ setup(r) {
12
+ const s = r, l = c(() => [
13
+ {
14
+ "sun-spinner-spinning": s.spinning
15
+ },
16
+ `sun-spinner-${s.size}`
17
+ ]);
18
+ return (t, V) => (e(), n("view", {
19
+ class: w(["sun-spinner", l.value])
20
+ }, [
21
+ o("view", z, [
22
+ (e(), n(B, null, v(4, (i) => o("view", {
23
+ key: i,
24
+ class: "sun-spinner-dot-item"
25
+ })), 64))
26
+ ]),
27
+ t.$slots.default ? (e(), n("view", E, [
28
+ C(t.$slots, "default")
29
+ ])) : N("", !0)
30
+ ], 2));
26
31
  }
27
32
  });
28
33
  export {
29
- b as default
34
+ y as default
30
35
  };
package/index17.js CHANGED
@@ -1,18 +1,27 @@
1
- import { defineComponent as o, renderSlot as t, mergeProps as r, openBlock as n, createElementBlock as s } from "vue";
2
- const a = t, l = r, p = n, c = s, u = /* @__PURE__ */ o({
3
- __name: "table-row",
1
+ import { defineComponent as u, computed as n, renderSlot as c, mergeProps as r, openBlock as l, createElementBlock as d } from "vue";
2
+ const a = c, m = r, p = l, k = d, _ = /* @__PURE__ */ u({
3
+ __name: "sudoku",
4
4
  props: {
5
- head: { type: Boolean },
6
- foot: { type: Boolean }
5
+ size: String,
6
+ count: {
7
+ type: Number,
8
+ default: 9
9
+ }
7
10
  },
8
- setup(m) {
9
- return (e, d) => (p(), c("view", l(e.$attrs, {
10
- class: ["sun-tb-row", { "sun-tb-head": e.head, "sun-tb-foot": e.foot }]
11
+ setup(o) {
12
+ const e = o, t = n(() => ({
13
+ "sun-sudoku-sm": e.count === 1,
14
+ "sun-sudoku-md": e.count === 2 || e.count === 4,
15
+ "sun-sudoku-lg": e.count === 3 || e.count > 4
16
+ }));
17
+ return (s, i) => (p(), k("view", m(s.$attrs, {
18
+ class: ["sun-sudoku", t.value],
19
+ style: { "--sudoku-width": o.size }
11
20
  }), [
12
- a(e.$slots, "default")
21
+ a(s.$slots, "default")
13
22
  ], 16));
14
23
  }
15
24
  });
16
25
  export {
17
- u as default
26
+ _ as default
18
27
  };
package/index18.js CHANGED
@@ -1,35 +1,49 @@
1
- import { defineComponent as s, computed as o, renderSlot as l, normalizeClass as u, createElementVNode as d, mergeProps as b, openBlock as c, createElementBlock as p } from "vue";
2
- const m = l, i = u, B = d, _ = b, f = c, z = p, k = /* @__PURE__ */ s({
3
- __name: "table",
1
+ import { defineComponent as u, computed as p, renderList as _, Fragment as f, openBlock as d, createElementBlock as g, renderSlot as v, unref as b, createBlock as k, createCommentVNode as h, toDisplayString as B, createTextVNode as y, normalizeClass as C, mergeProps as $ } from "vue";
2
+ import w from "./index7.js";
3
+ const N = _, S = f, r = d, n = g, T = v, V = b, L = k, z = h, D = B, E = y, F = C, P = $, j = ["scroll-left"], q = ["onTap"], I = /* @__PURE__ */ u({
4
+ __name: "index",
4
5
  props: {
5
- rounded: { type: Boolean, default: !0 },
6
- bordered: { type: Boolean },
7
- outerBordered: { type: Boolean, default: !0 },
8
- zebra: { type: Boolean },
9
- size: { default: "default" },
10
- layout: {}
6
+ tabs: {},
7
+ active: { default: 0 }
11
8
  },
12
- setup(r) {
13
- const e = r, n = o(() => ({
14
- "sun-tb-rounded": e.rounded,
15
- "sun-tb-bordered": e.bordered,
16
- "sun-tb-outer-bordered": e.outerBordered,
17
- [`sun-tb-size-${e.size}`]: e.size
18
- })), a = o(() => ({
19
- "sun-tb-zebra": e.zebra,
20
- [`sun-tb-layout-${e.layout}`]: e.layout
21
- }));
22
- return (t, y) => (f(), z("view", _(t.$attrs, {
23
- class: ["sun-tb", n.value]
9
+ emits: ["update:active", "toggle"],
10
+ setup(s, { emit: c }) {
11
+ const a = c, l = s, i = p(() => l.active > 2 ? (l.active - 2) * 150 + "rpx" : 0);
12
+ function m(e) {
13
+ a("toggle", e), a("update:active", e);
14
+ }
15
+ return (e, x) => (r(), n("scroll-view", P(e.$attrs, {
16
+ class: "sun-tabbar",
17
+ "scroll-x": !0,
18
+ "enable-flex": !0,
19
+ enhanced: !0,
20
+ "show-scrollbar": !1,
21
+ "scroll-with-animation": !0,
22
+ "scroll-left": i.value
24
23
  }), [
25
- B("view", {
26
- class: i(["sun-tb-inner", a.value])
24
+ (r(!0), n(S, null, N(e.tabs, (t, o) => (r(), n("view", {
25
+ key: o,
26
+ class: F(["sun-tabbar-item", {
27
+ "sun-tabbar-item-active": e.active === o,
28
+ "sun-tabbar-item-icon-only": !t.text
29
+ }]),
30
+ onTap: (A) => m(o)
27
31
  }, [
28
- m(t.$slots, "default")
29
- ], 2)
30
- ], 16));
32
+ T(e.$slots, "default", {
33
+ tab: t,
34
+ index: o
35
+ }, () => [
36
+ t.icon ? (r(), L(V(w), {
37
+ key: 0,
38
+ class: "sun-tabbar-item-icon",
39
+ name: e.active === o ? t.icon[0] : t.icon[1] || `${t.icon[0]}-outline`
40
+ }, null, 8, ["name"])) : z("", !0),
41
+ E(" " + D(t.text), 1)
42
+ ])
43
+ ], 42, q))), 128))
44
+ ], 16, j));
31
45
  }
32
46
  });
33
47
  export {
34
- k as default
48
+ I as default
35
49
  };