@solar-taro/ui-sun 1.1.0 → 1.1.2
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.
- package/CHANGELOG.md +15 -0
- package/chip/index.vue.d.ts +4 -2
- package/circular-progress/index.d.ts +1 -0
- package/circular-progress/index.scss +47 -0
- package/circular-progress/index.vue.d.ts +37 -0
- package/icon/_ionicon.scss +2811 -0
- package/icon/index.d.ts +1 -0
- package/icon/index.scss +9 -0
- package/icon/index.vue.d.ts +24 -0
- package/index.d.ts +3 -0
- package/index.js +33 -27
- package/index10.js +53 -26
- package/index11.js +19 -21
- package/index12.js +47 -19
- package/index13.js +29 -12
- package/index14.js +18 -26
- package/index15.js +21 -94
- package/index16.js +15 -9
- package/index17.js +33 -10
- package/index18.js +118 -2
- package/index19.js +10 -7
- package/index2.js +12 -32
- package/index20.js +10 -2
- package/index21.js +1 -1
- package/index22.js +1 -1
- package/index23.js +1 -1
- package/index24.js +1 -1
- package/index25.js +1 -1
- package/index26.js +1 -1
- package/index27.js +1 -1
- package/index3.js +27 -16
- package/index30.js +7 -2
- package/index31.js +1 -1
- package/index32.js +1 -1
- package/index33.js +2 -3
- package/index34.js +4 -0
- package/index35.js +4 -0
- package/index36.js +4 -0
- package/index37.js +4 -0
- package/index38.js +5 -0
- package/index4.js +18 -15
- package/index5.js +18 -17
- package/index6.js +17 -26
- package/index7.js +8 -52
- package/index8.js +19 -19
- package/index9.js +25 -51
- package/package.json +1 -1
- package/plugin.d.ts +6 -0
- package/typing.d.ts +1 -0
- package/virtual-scroll/index.vue.d.ts +8 -0
package/icon/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SunIcon } from './index.vue';
|
package/icon/index.scss
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
name: string;
|
|
6
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
+
name: string;
|
|
8
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
9
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
13
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
|
+
} : {
|
|
16
|
+
type: import('vue').PropType<T[K]>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
package/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export * from './accordion';
|
|
2
2
|
export * from './chip';
|
|
3
|
+
export * from './circular-progress';
|
|
3
4
|
export * from './fab';
|
|
5
|
+
export * from './icon';
|
|
4
6
|
export * from './lazy-render';
|
|
5
7
|
export * from './navbar';
|
|
8
|
+
export * from './plugin';
|
|
6
9
|
export * from './popover';
|
|
7
10
|
export * from './segment';
|
|
8
11
|
export * from './spinner';
|
package/index.js
CHANGED
|
@@ -1,34 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SolarSun as e } from "./index2.js";
|
|
2
2
|
import { default as u } from "./index3.js";
|
|
3
3
|
import { default as f } from "./index4.js";
|
|
4
4
|
import { default as S } from "./index5.js";
|
|
5
|
-
import { default as
|
|
5
|
+
import { default as p } from "./index6.js";
|
|
6
6
|
import { default as m } from "./index7.js";
|
|
7
7
|
import { default as x } from "./index8.js";
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
8
|
+
import { default as c } from "./index9.js";
|
|
9
|
+
import { default as g } from "./index10.js";
|
|
10
|
+
import { default as T } from "./index11.js";
|
|
11
|
+
import { default as v } from "./index12.js";
|
|
12
|
+
import { default as I } from "./index13.js";
|
|
13
|
+
import { default as R } from "./index14.js";
|
|
14
|
+
import { default as w } from "./index15.js";
|
|
15
|
+
import { default as z } from "./index16.js";
|
|
16
|
+
import { default as B } from "./index17.js";
|
|
17
|
+
import { default as L } from "./index18.js";
|
|
18
|
+
import { default as V } from "./index19.js";
|
|
19
|
+
import { default as q } from "./index20.js";
|
|
17
20
|
export {
|
|
18
|
-
|
|
19
|
-
u as
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
m as
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
e as SolarSun,
|
|
22
|
+
u as SunAccordion,
|
|
23
|
+
f as SunChip,
|
|
24
|
+
S as SunCircularProgress,
|
|
25
|
+
V as SunFab,
|
|
26
|
+
p as SunFabGroup,
|
|
27
|
+
m as SunIcon,
|
|
28
|
+
x as SunLazyRender,
|
|
29
|
+
c as SunNavbar,
|
|
30
|
+
g as SunPopover,
|
|
31
|
+
v as SunSegment,
|
|
32
|
+
T as SunSegmentBtn,
|
|
33
|
+
I as SunSpinner,
|
|
34
|
+
R as SunSudoku,
|
|
35
|
+
q as SunSudokuItem,
|
|
36
|
+
B as SunTb,
|
|
37
|
+
w as SunTbCell,
|
|
38
|
+
z as SunTbRow,
|
|
39
|
+
L as SunVirtualScroll
|
|
34
40
|
};
|
package/index10.js
CHANGED
|
@@ -1,35 +1,62 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
key: 0,
|
|
4
|
-
class: "sun-spinner-desc"
|
|
5
|
-
}, y = /* @__PURE__ */ a({
|
|
1
|
+
import { defineComponent as l, renderSlot as s, createElementVNode as a, mergeProps as f, withModifiers as p, normalizeClass as i, normalizeStyle as u, openBlock as d, createElementBlock as c } from "vue";
|
|
2
|
+
const n = s, t = a, v = f, m = p, y = i, g = u, w = d, S = c, x = { class: "sun-popover-trigger" }, k = /* @__PURE__ */ l({
|
|
6
3
|
__name: "index",
|
|
7
4
|
props: {
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
/** 是否显示 */
|
|
6
|
+
show: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: void 0
|
|
9
|
+
},
|
|
10
|
+
/** popover的横轴位置:left,right,start,end,center */
|
|
11
|
+
x: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "left"
|
|
14
|
+
},
|
|
15
|
+
/** popover的纵轴位置:top,bottom,start,end,center */
|
|
16
|
+
y: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "center"
|
|
19
|
+
},
|
|
20
|
+
/** 横轴偏移度 */
|
|
21
|
+
offsetX: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "7.5rpx"
|
|
24
|
+
},
|
|
25
|
+
/** 纵轴偏移度 */
|
|
26
|
+
offsetY: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "7.5rpx"
|
|
29
|
+
},
|
|
30
|
+
/** popover背景 */
|
|
31
|
+
bg: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "#fff"
|
|
34
|
+
},
|
|
35
|
+
/** popover文字颜色 */
|
|
36
|
+
color: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "#000"
|
|
39
|
+
}
|
|
10
40
|
},
|
|
11
|
-
setup(
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`sun-spinner-${s.size}`
|
|
17
|
-
]);
|
|
18
|
-
return (t, V) => (e(), n("view", {
|
|
19
|
-
class: w(["sun-spinner", i.value])
|
|
41
|
+
setup(e) {
|
|
42
|
+
return (o, r) => (w(), S("view", {
|
|
43
|
+
class: y(["sun-popover", [{ "sun-popover-show": e.show }, `sun-popover-x-${e.x}`, `sun-popover-y-${e.y}`]]),
|
|
44
|
+
style: g({ "--popover-x-offset": e.offsetX, "--popover-y-offset": e.offsetY, "--popover-background": e.bg }),
|
|
45
|
+
onTap: m(($) => !1, ["stop"])
|
|
20
46
|
}, [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
key: l,
|
|
24
|
-
class: "sun-spinner-dot-item"
|
|
25
|
-
})), 64))
|
|
47
|
+
t("view", x, [
|
|
48
|
+
n(o.$slots, "default")
|
|
26
49
|
]),
|
|
27
|
-
t
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
50
|
+
t("view", v(o.$attrs, {
|
|
51
|
+
class: "sun-popover-container",
|
|
52
|
+
style: { color: e.color }
|
|
53
|
+
}), [
|
|
54
|
+
r[0] || (r[0] = t("view", { class: "sun-popover-arrow" }, null, -1)),
|
|
55
|
+
n(o.$slots, "content")
|
|
56
|
+
], 16)
|
|
57
|
+
], 38));
|
|
31
58
|
}
|
|
32
59
|
});
|
|
33
60
|
export {
|
|
34
|
-
|
|
61
|
+
k as default
|
|
35
62
|
};
|
package/index11.js
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
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 "./index38.js";
|
|
3
|
+
const o = u, k = i, C = _, B = f, E = v, $ = /* @__PURE__ */ p({
|
|
4
|
+
__name: "segment-btn",
|
|
4
5
|
props: {
|
|
5
|
-
|
|
6
|
-
count: {
|
|
7
|
-
type: Number,
|
|
8
|
-
default: 9
|
|
9
|
-
}
|
|
6
|
+
value: {}
|
|
10
7
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
+
};
|
|
23
21
|
}
|
|
24
22
|
});
|
|
25
23
|
export {
|
|
26
|
-
|
|
24
|
+
$ as default
|
|
27
25
|
};
|
package/index12.js
CHANGED
|
@@ -1,28 +1,56 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { defineComponent as x, getCurrentInstance as V, shallowRef as E, shallowReactive as k, computed as c, provide as m, 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 "./index38.js";
|
|
3
|
+
const R = y, T = B, b = I, L = O, S = A, $ = { class: "sun-segment-inner" }, M = /* @__PURE__ */ x({
|
|
4
|
+
__name: "segment",
|
|
4
5
|
props: {
|
|
5
|
-
|
|
6
|
-
width: {},
|
|
7
|
-
maxWidth: {},
|
|
8
|
-
ellipsis: { type: Boolean },
|
|
9
|
-
breakWord: { type: Boolean }
|
|
6
|
+
modelValue: {}
|
|
10
7
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"sun-tb-cell-break-word": t.breakWord
|
|
8
|
+
emits: ["update:modelValue", "change"],
|
|
9
|
+
setup(v, { emit: f }) {
|
|
10
|
+
const d = f, u = v, g = V(), o = E(null), t = k([]), i = c(() => t.indexOf(o.value)), h = c(() => t.length), _ = c(() => ({
|
|
11
|
+
"--segment-length": h.value,
|
|
12
|
+
"--segment-active-index": i.value
|
|
17
13
|
}));
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
m(N, o), m(P, {
|
|
15
|
+
link: (e) => {
|
|
16
|
+
const n = p();
|
|
17
|
+
t.push(e), t.sort((a, s) => {
|
|
18
|
+
const l = n.indexOf(a.vnode), r = n.indexOf(s.vnode);
|
|
19
|
+
return l - r;
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
unlink: (e) => {
|
|
23
|
+
t.slice(t.indexOf(e), 1);
|
|
24
|
+
},
|
|
25
|
+
active: (e) => {
|
|
26
|
+
d("change", {
|
|
27
|
+
value: e.props.value,
|
|
28
|
+
index: i.value
|
|
29
|
+
}), d("update:modelValue", e.props.value), o.value = e;
|
|
30
|
+
}
|
|
31
|
+
}), C(() => u.modelValue, (e) => {
|
|
32
|
+
o.value = t.find((n) => n.props.value === e);
|
|
33
|
+
});
|
|
34
|
+
function p() {
|
|
35
|
+
return g.subTree.children[0].children[0].children.filter((e) => typeof e.type != "symbol");
|
|
36
|
+
}
|
|
37
|
+
return w(() => {
|
|
38
|
+
const e = p();
|
|
39
|
+
t.forEach((n) => {
|
|
40
|
+
var s, l;
|
|
41
|
+
const a = e.findIndex((r) => r === n.vnode);
|
|
42
|
+
(l = (s = n.props).value) != null || (s.value = a), n.props.value === u.modelValue && (o.value = n);
|
|
43
|
+
});
|
|
44
|
+
}), (e, n) => (L(), S("view", b(e.$attrs, {
|
|
45
|
+
class: "sun-segment",
|
|
46
|
+
style: _.value
|
|
21
47
|
}), [
|
|
22
|
-
|
|
48
|
+
T("view", $, [
|
|
49
|
+
R(e.$slots, "default")
|
|
50
|
+
])
|
|
23
51
|
], 16));
|
|
24
52
|
}
|
|
25
53
|
});
|
|
26
54
|
export {
|
|
27
|
-
|
|
55
|
+
M as default
|
|
28
56
|
};
|
package/index13.js
CHANGED
|
@@ -1,18 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
|
|
1
|
+
import { defineComponent as a, computed as c, renderList as p, Fragment as m, openBlock as d, createElementBlock as u, createElementVNode as _, renderSlot as f, createCommentVNode as k, normalizeClass as g } from "vue";
|
|
2
|
+
const v = p, B = m, e = d, 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
|
-
|
|
6
|
-
|
|
8
|
+
size: {},
|
|
9
|
+
spinning: { type: Boolean }
|
|
7
10
|
},
|
|
8
|
-
setup(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
setup(r) {
|
|
12
|
+
const s = r, i = 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", i.value])
|
|
20
|
+
}, [
|
|
21
|
+
o("view", z, [
|
|
22
|
+
(e(), n(B, null, v(4, (l) => o("view", {
|
|
23
|
+
key: l,
|
|
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));
|
|
14
31
|
}
|
|
15
32
|
});
|
|
16
33
|
export {
|
|
17
|
-
|
|
34
|
+
y as default
|
|
18
35
|
};
|
package/index14.js
CHANGED
|
@@ -1,35 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
__name: "
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
layout: {}
|
|
5
|
+
size: String,
|
|
6
|
+
count: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: 9
|
|
9
|
+
}
|
|
11
10
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const e =
|
|
14
|
-
"sun-
|
|
15
|
-
"sun-
|
|
16
|
-
"sun-
|
|
17
|
-
[`sun-tb-size-${e.size}`]: e.size
|
|
18
|
-
})), s = t(() => ({
|
|
19
|
-
"sun-tb-zebra": e.zebra,
|
|
20
|
-
[`sun-tb-layout-${e.layout}`]: e.layout
|
|
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
|
|
21
16
|
}));
|
|
22
|
-
return (
|
|
23
|
-
class: ["sun-
|
|
17
|
+
return (s, i) => (p(), k("view", m(s.$attrs, {
|
|
18
|
+
class: ["sun-sudoku", t.value],
|
|
19
|
+
style: { "--sudoku-width": o.size }
|
|
24
20
|
}), [
|
|
25
|
-
|
|
26
|
-
class: i(["sun-tb-inner", s.value])
|
|
27
|
-
}, [
|
|
28
|
-
m(o.$slots, "default")
|
|
29
|
-
], 2)
|
|
21
|
+
a(s.$slots, "default")
|
|
30
22
|
], 16));
|
|
31
23
|
}
|
|
32
24
|
});
|
|
33
25
|
export {
|
|
34
|
-
|
|
26
|
+
_ as default
|
|
35
27
|
};
|
package/index15.js
CHANGED
|
@@ -1,101 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { createSelectorQuery as D } from "@tarojs/taro";
|
|
5
|
-
const O = E, Q = V, f = _, d = L, W = M, p = T, w = A, X = K, Y = N, j = ["id", "refresher-enabled", "refresher-triggered", "refresher-background", "scroll-x", "scroll-y"];
|
|
6
|
-
let G = 1;
|
|
7
|
-
const ee = /* @__PURE__ */ I({
|
|
8
|
-
__name: "index",
|
|
1
|
+
import { defineComponent as o, computed as r, renderSlot as i, mergeProps as n, openBlock as c, createElementBlock as a } from "vue";
|
|
2
|
+
const p = i, d = n, m = c, k = a, b = /* @__PURE__ */ o({
|
|
3
|
+
__name: "table-cell",
|
|
9
4
|
props: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
itemSize: {},
|
|
16
|
-
itemKey: {},
|
|
17
|
-
id: { default: () => `sun-virtual-scroll-${G++}` },
|
|
18
|
-
bottomSpace: { default: 0 }
|
|
5
|
+
sticky: {},
|
|
6
|
+
width: {},
|
|
7
|
+
maxWidth: {},
|
|
8
|
+
ellipsis: { type: Boolean },
|
|
9
|
+
breakWord: { type: Boolean }
|
|
19
10
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})), x = s(() => ({
|
|
31
|
-
display: l.value ? "block" : "inline-block",
|
|
32
|
-
[l.value ? "height" : "width"]: y(n.value)
|
|
33
|
-
})), F = s(
|
|
34
|
-
() => t.items.slice(
|
|
35
|
-
Math.max(u.value - i.value, 0),
|
|
36
|
-
u.value + i.value * 2
|
|
37
|
-
)
|
|
38
|
-
);
|
|
39
|
-
function P({ detail: r }) {
|
|
40
|
-
a && cancelAnimationFrame(a), a = requestAnimationFrame(() => {
|
|
41
|
-
const e = l.value ? r.scrollTop : r.scrollLeft;
|
|
42
|
-
u.value = ~~(e / n.value), u.value > i.value - 1 ? v.value = e - n.value * i.value - e % n.value : v.value = e - e % (n.value * i.value), a = 0;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function S() {
|
|
46
|
-
setTimeout(() => {
|
|
47
|
-
D().select(`#${t.id}`).boundingClientRect((r) => {
|
|
48
|
-
if (!r)
|
|
49
|
-
return S();
|
|
50
|
-
const { height: e, width: o } = r, c = l.value ? e : o;
|
|
51
|
-
i.value = Math.ceil(c / n.value);
|
|
52
|
-
}).exec();
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
return C(() => {
|
|
56
|
-
S();
|
|
57
|
-
}), (r, e) => (f(), d("scroll-view", Y(r.$attrs, {
|
|
58
|
-
id: r.id,
|
|
59
|
-
class: "sun-virtual-scroll",
|
|
60
|
-
"refresher-enabled": r.refresher,
|
|
61
|
-
"refresher-triggered": r.refreshing,
|
|
62
|
-
"refresher-background": r.refresherBg,
|
|
63
|
-
"scroll-x": !l.value,
|
|
64
|
-
"scroll-y": l.value,
|
|
65
|
-
enhanced: !0,
|
|
66
|
-
"enable-passive": !0,
|
|
67
|
-
"lower-threshold": 300,
|
|
68
|
-
onScrollPassive: e[0] || (e[0] = (o) => P(o)),
|
|
69
|
-
onRefresherrefresh: e[1] || (e[1] = (o) => {
|
|
70
|
-
X(q).short("light"), h("refresh");
|
|
71
|
-
}),
|
|
72
|
-
onScrolltolower: e[2] || (e[2] = (o) => h("lower"))
|
|
11
|
+
setup(l) {
|
|
12
|
+
const t = l, s = r(() => ({
|
|
13
|
+
"sun-tb-cell-sticky-left": t.sticky === "left",
|
|
14
|
+
"sun-tb-cell-sticky-right": t.sticky === "right",
|
|
15
|
+
"sun-tb-cell-ellipsis": t.ellipsis,
|
|
16
|
+
"sun-tb-cell-break-word": t.breakWord
|
|
17
|
+
}));
|
|
18
|
+
return (e, u) => (m(), k("view", d(e.$attrs, {
|
|
19
|
+
class: ["sun-tb-cell", s.value],
|
|
20
|
+
style: { width: e.width, "min-width": e.width, "max-width": e.maxWidth }
|
|
73
21
|
}), [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
style: p(k.value)
|
|
77
|
-
}, [
|
|
78
|
-
(f(!0), d(Q, null, O(F.value, (o, c) => {
|
|
79
|
-
var g;
|
|
80
|
-
return f(), d("view", {
|
|
81
|
-
key: (g = o[r.itemKey]) != null ? g : c,
|
|
82
|
-
class: "sun-virtual-scroll-item",
|
|
83
|
-
style: p(x.value)
|
|
84
|
-
}, [
|
|
85
|
-
W(r.$slots, "default", {
|
|
86
|
-
item: o,
|
|
87
|
-
index: c
|
|
88
|
-
})
|
|
89
|
-
], 4);
|
|
90
|
-
}), 128))
|
|
91
|
-
], 4),
|
|
92
|
-
w("view", {
|
|
93
|
-
class: "sun-virtual-scroll-spacer",
|
|
94
|
-
style: p($.value)
|
|
95
|
-
}, null, 4)
|
|
96
|
-
], 16, j));
|
|
22
|
+
p(e.$slots, "default")
|
|
23
|
+
], 16));
|
|
97
24
|
}
|
|
98
25
|
});
|
|
99
26
|
export {
|
|
100
|
-
|
|
27
|
+
b as default
|
|
101
28
|
};
|
package/index16.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { renderSlot as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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",
|
|
4
|
+
props: {
|
|
5
|
+
head: { type: Boolean },
|
|
6
|
+
foot: { type: Boolean }
|
|
7
|
+
},
|
|
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
|
+
}), [
|
|
12
|
+
a(e.$slots, "default")
|
|
13
|
+
], 16));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
10
16
|
export {
|
|
11
17
|
u as default
|
|
12
18
|
};
|
package/index17.js
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
import { renderSlot as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
1
|
+
import { defineComponent as a, computed as t, 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, z = c, y = p, k = /* @__PURE__ */ a({
|
|
3
|
+
__name: "table",
|
|
4
|
+
props: {
|
|
5
|
+
rounded: { type: Boolean, default: !0 },
|
|
6
|
+
bordered: { type: Boolean },
|
|
7
|
+
outerBordered: { type: Boolean, default: !0 },
|
|
8
|
+
zebra: { type: Boolean },
|
|
9
|
+
size: {},
|
|
10
|
+
layout: {}
|
|
11
|
+
},
|
|
12
|
+
setup(r) {
|
|
13
|
+
const e = r, n = t(() => ({
|
|
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
|
+
})), s = t(() => ({
|
|
19
|
+
"sun-tb-zebra": e.zebra,
|
|
20
|
+
[`sun-tb-layout-${e.layout}`]: e.layout
|
|
21
|
+
}));
|
|
22
|
+
return (o, f) => (z(), y("view", _(o.$attrs, {
|
|
23
|
+
class: ["sun-tb", n.value]
|
|
24
|
+
}), [
|
|
25
|
+
B("view", {
|
|
26
|
+
class: i(["sun-tb-inner", s.value])
|
|
27
|
+
}, [
|
|
28
|
+
m(o.$slots, "default")
|
|
29
|
+
], 2)
|
|
30
|
+
], 16));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
10
33
|
export {
|
|
11
|
-
|
|
34
|
+
k as default
|
|
12
35
|
};
|