@autobest-ui/components 1.1.5 → 1.2.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.
- package/README.md +10 -10
- package/esm/accordion/__stories__/style.scss +58 -58
- package/esm/affix/__stories__/style.scss +13 -13
- package/esm/affix/style/index.scss +34 -34
- package/esm/base.scss +42 -42
- package/esm/carousel/__stories__/style.scss +41 -41
- package/esm/carousel/index.d.ts +21 -13
- package/esm/carousel/index.js +77 -44
- package/esm/carousel/style/index.css +1 -1
- package/esm/carousel/style/index.scss +43 -37
- package/esm/checkbox/style/index.scss +117 -117
- package/esm/collapse/__stories__/style.scss +18 -18
- package/esm/collapse/style/index.scss +42 -42
- package/esm/confirm/style/index.scss +44 -44
- package/esm/date-picker/calendar/grid/index.scss +85 -85
- package/esm/date-picker/calendar/index.scss +57 -57
- package/esm/date-picker/style/index.scss +18 -18
- package/esm/drawer/style/index.scss +44 -44
- package/esm/ellipsis/style/index.scss +35 -35
- package/esm/guide/__stories__/style.scss +13 -13
- package/esm/guide/style/index.scss +17 -17
- package/esm/icon/__stories__/style.scss +39 -39
- package/esm/icon/style/index.scss +6 -6
- package/esm/index.d.ts +1 -1
- package/esm/input-number/style/index.scss +86 -86
- package/esm/lazy-image/__stories__/style.scss +9 -9
- package/esm/lazy-image/style/index.scss +24 -24
- package/esm/link-list/style/index.scss +125 -125
- package/esm/loading/style/index.scss +30 -30
- package/esm/loading-bar/style/index.scss +62 -62
- package/esm/loading-container/__stories__/style.scss +5 -5
- package/esm/loading-container/style/index.scss +27 -27
- package/esm/loading-icon/style/index.scss +23 -23
- package/esm/mask/style/index.scss +34 -34
- package/esm/message/style/index.scss +70 -70
- package/esm/modal/style/index.scss +112 -112
- package/esm/move/__stories__/style.scss +6 -6
- package/esm/move/style/index.scss +7 -7
- package/esm/popover/__stories__/style.scss +15 -15
- package/esm/popover/style/index.scss +59 -59
- package/esm/select/__stories__/style.scss +8 -8
- package/esm/select/style/index.scss +126 -126
- package/esm/show-more/style/index.scss +22 -22
- package/esm/skeleton/__stories__/style.scss +2 -2
- package/esm/skeleton/style/index.scss +26 -26
- package/esm/style.css +15 -15
- package/esm/table/__stories__/style.scss +33 -33
- package/esm/table/style/index.scss +51 -51
- package/esm/tabs/__stories__/style.scss +8 -8
- package/esm/tabs/style/index.scss +62 -62
- package/esm/tooltip/style/index.scss +61 -61
- package/esm/trigger/style/index.scss +79 -79
- package/lib/accordion/__stories__/style.scss +58 -58
- package/lib/affix/__stories__/style.scss +13 -13
- package/lib/affix/style/index.scss +34 -34
- package/lib/base.scss +42 -42
- package/lib/carousel/__stories__/style.scss +41 -41
- package/lib/carousel/index.d.ts +21 -13
- package/lib/carousel/index.js +80 -45
- package/lib/carousel/style/index.css +1 -1
- package/lib/carousel/style/index.scss +43 -37
- package/lib/checkbox/style/index.scss +117 -117
- package/lib/collapse/__stories__/style.scss +18 -18
- package/lib/collapse/style/index.scss +42 -42
- package/lib/confirm/style/index.scss +44 -44
- package/lib/date-picker/calendar/grid/index.scss +85 -85
- package/lib/date-picker/calendar/index.scss +57 -57
- package/lib/date-picker/style/index.scss +18 -18
- package/lib/drawer/style/index.scss +44 -44
- package/lib/ellipsis/style/index.scss +35 -35
- package/lib/guide/__stories__/style.scss +13 -13
- package/lib/guide/style/index.scss +17 -17
- package/lib/icon/__stories__/style.scss +39 -39
- package/lib/icon/style/index.scss +6 -6
- package/lib/index.d.ts +1 -1
- package/lib/input-number/style/index.scss +86 -86
- package/lib/lazy-image/__stories__/style.scss +9 -9
- package/lib/lazy-image/style/index.scss +24 -24
- package/lib/link-list/style/index.scss +125 -125
- package/lib/loading/style/index.scss +30 -30
- package/lib/loading-bar/style/index.scss +62 -62
- package/lib/loading-container/__stories__/style.scss +5 -5
- package/lib/loading-container/style/index.scss +27 -27
- package/lib/loading-icon/style/index.scss +23 -23
- package/lib/mask/style/index.scss +34 -34
- package/lib/message/style/index.scss +70 -70
- package/lib/modal/style/index.scss +112 -112
- package/lib/move/__stories__/style.scss +6 -6
- package/lib/move/style/index.scss +7 -7
- package/lib/popover/__stories__/style.scss +15 -15
- package/lib/popover/style/index.scss +59 -59
- package/lib/select/__stories__/style.scss +8 -8
- package/lib/select/style/index.scss +126 -126
- package/lib/show-more/style/index.scss +22 -22
- package/lib/skeleton/__stories__/style.scss +2 -2
- package/lib/skeleton/style/index.scss +26 -26
- package/lib/style.css +15 -15
- package/lib/table/__stories__/style.scss +33 -33
- package/lib/table/style/index.scss +51 -51
- package/lib/tabs/__stories__/style.scss +8 -8
- package/lib/tabs/style/index.scss +62 -62
- package/lib/tooltip/style/index.scss +61 -61
- package/lib/trigger/style/index.scss +79 -79
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# @autobest-ui/components 文档
|
|
2
|
-
|
|
3
|
-
## 介绍
|
|
4
|
-
|
|
5
|
-
该项目为基础组件,主要依赖
|
|
6
|
-
1. `@autobest-ui/utils`
|
|
7
|
-
|
|
8
|
-
## 打包方式
|
|
9
|
-
|
|
10
|
-
`yarn build:components`
|
|
1
|
+
# @autobest-ui/components 文档
|
|
2
|
+
|
|
3
|
+
## 介绍
|
|
4
|
+
|
|
5
|
+
该项目为基础组件,主要依赖
|
|
6
|
+
1. `@autobest-ui/utils`
|
|
7
|
+
|
|
8
|
+
## 打包方式
|
|
9
|
+
|
|
10
|
+
`yarn build:components`
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
$namespace: accordion-demo;
|
|
2
|
-
|
|
3
|
-
.demo-accordion {
|
|
4
|
-
margin: .5rem auto;
|
|
5
|
-
width: 5rem;
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.#{$namespace} {
|
|
12
|
-
&-wrap {
|
|
13
|
-
width: 3rem;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&-text {
|
|
17
|
-
height: .3rem;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&-title {
|
|
21
|
-
display: block;
|
|
22
|
-
padding: .1rem 0;
|
|
23
|
-
background-color: #b0b0b0;
|
|
24
|
-
color: #f7f7f7;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&-a-content {
|
|
29
|
-
> li {
|
|
30
|
-
padding: .1rem 0;
|
|
31
|
-
border-top: dotted 1px #808080;
|
|
32
|
-
|
|
33
|
-
&:first-child {
|
|
34
|
-
border: none;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
> a {
|
|
39
|
-
color: #333;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&-d-content {
|
|
45
|
-
padding-left: .1rem;
|
|
46
|
-
|
|
47
|
-
.ab-collapse {
|
|
48
|
-
padding-left: .2rem;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&-d-title {
|
|
53
|
-
background-color: #808080;
|
|
54
|
-
display: block;
|
|
55
|
-
padding: .1rem 0;
|
|
56
|
-
color: #f7f7f7;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
}
|
|
1
|
+
$namespace: accordion-demo;
|
|
2
|
+
|
|
3
|
+
.demo-accordion {
|
|
4
|
+
margin: .5rem auto;
|
|
5
|
+
width: 5rem;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.#{$namespace} {
|
|
12
|
+
&-wrap {
|
|
13
|
+
width: 3rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-text {
|
|
17
|
+
height: .3rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&-title {
|
|
21
|
+
display: block;
|
|
22
|
+
padding: .1rem 0;
|
|
23
|
+
background-color: #b0b0b0;
|
|
24
|
+
color: #f7f7f7;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-a-content {
|
|
29
|
+
> li {
|
|
30
|
+
padding: .1rem 0;
|
|
31
|
+
border-top: dotted 1px #808080;
|
|
32
|
+
|
|
33
|
+
&:first-child {
|
|
34
|
+
border: none;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
> a {
|
|
39
|
+
color: #333;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-d-content {
|
|
45
|
+
padding-left: .1rem;
|
|
46
|
+
|
|
47
|
+
.ab-collapse {
|
|
48
|
+
padding-left: .2rem;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&-d-title {
|
|
53
|
+
background-color: #808080;
|
|
54
|
+
display: block;
|
|
55
|
+
padding: .1rem 0;
|
|
56
|
+
color: #f7f7f7;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
}
|
|
59
59
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.affix-demo {
|
|
2
|
-
height: 200vh;
|
|
3
|
-
overflow: auto;
|
|
4
|
-
width: 1000px;
|
|
5
|
-
max-width: 100%;
|
|
6
|
-
margin: auto;
|
|
7
|
-
|
|
8
|
-
.affix-wrap {
|
|
9
|
-
height: 500px;
|
|
10
|
-
width: 100%;
|
|
11
|
-
background-color: #D1D5DB;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
.affix-demo {
|
|
2
|
+
height: 200vh;
|
|
3
|
+
overflow: auto;
|
|
4
|
+
width: 1000px;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
margin: auto;
|
|
7
|
+
|
|
8
|
+
.affix-wrap {
|
|
9
|
+
height: 500px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
background-color: #D1D5DB;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
$namespace: ab-affix;
|
|
2
|
-
$customFade: #{$namespace}-fade;
|
|
3
|
-
|
|
4
|
-
.#{$namespace} {
|
|
5
|
-
&, &-custom {
|
|
6
|
-
z-index: 100;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
&-custom {
|
|
10
|
-
position: fixed;
|
|
11
|
-
transition: transform 200ms cubic-bezier(.7, .3, .1, 1);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.#{$customFade} {
|
|
16
|
-
&-enter, &-appear {
|
|
17
|
-
transform: translate(0, -100%)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&-enter-active, &-appear-active {
|
|
21
|
-
transform: translate(0, 0);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&-exit {
|
|
25
|
-
transform: translate(0, 0);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&-exit-active {
|
|
29
|
-
transform: translate(0, -100%)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&-exit-done {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
1
|
+
$namespace: ab-affix;
|
|
2
|
+
$customFade: #{$namespace}-fade;
|
|
3
|
+
|
|
4
|
+
.#{$namespace} {
|
|
5
|
+
&, &-custom {
|
|
6
|
+
z-index: 100;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&-custom {
|
|
10
|
+
position: fixed;
|
|
11
|
+
transition: transform 200ms cubic-bezier(.7, .3, .1, 1);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.#{$customFade} {
|
|
16
|
+
&-enter, &-appear {
|
|
17
|
+
transform: translate(0, -100%)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&-enter-active, &-appear-active {
|
|
21
|
+
transform: translate(0, 0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-exit {
|
|
25
|
+
transform: translate(0, 0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-exit-active {
|
|
29
|
+
transform: translate(0, -100%)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-exit-done {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
35
|
}
|
package/esm/base.scss
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
/* reset css */
|
|
2
|
-
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video, input, a, textarea {
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
html {
|
|
7
|
-
font-size: 100px;
|
|
8
|
-
font-family: Arial, sans-serif;
|
|
9
|
-
touch-action: manipulation;
|
|
10
|
-
-ms-touch-action: manipulation;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@media only screen and (max-width: 767px) {
|
|
14
|
-
html {
|
|
15
|
-
//font-size: 24.15459vw;
|
|
16
|
-
// 暂时取消对UI自适应,而是统一成一种
|
|
17
|
-
font-size: 100px;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
body {
|
|
22
|
-
font-size: .12rem;
|
|
23
|
-
color: #333;
|
|
24
|
-
margin: 0;
|
|
25
|
-
padding: 0;
|
|
26
|
-
-webkit-font-smoothing: antialiased;
|
|
27
|
-
-moz-osx-font-smoothing: grayscale;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
a {
|
|
31
|
-
text-decoration: none;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
input {
|
|
35
|
-
outline: none;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
ul, li {
|
|
39
|
-
padding: 0;
|
|
40
|
-
margin: 0;
|
|
41
|
-
list-style: none;
|
|
42
|
-
}
|
|
1
|
+
/* reset css */
|
|
2
|
+
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video, input, a, textarea {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
html {
|
|
7
|
+
font-size: 100px;
|
|
8
|
+
font-family: Arial, sans-serif;
|
|
9
|
+
touch-action: manipulation;
|
|
10
|
+
-ms-touch-action: manipulation;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@media only screen and (max-width: 767px) {
|
|
14
|
+
html {
|
|
15
|
+
//font-size: 24.15459vw;
|
|
16
|
+
// 暂时取消对UI自适应,而是统一成一种
|
|
17
|
+
font-size: 100px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
body {
|
|
22
|
+
font-size: .12rem;
|
|
23
|
+
color: #333;
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding: 0;
|
|
26
|
+
-webkit-font-smoothing: antialiased;
|
|
27
|
+
-moz-osx-font-smoothing: grayscale;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
a {
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
input {
|
|
35
|
+
outline: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
ul, li {
|
|
39
|
+
padding: 0;
|
|
40
|
+
margin: 0;
|
|
41
|
+
list-style: none;
|
|
42
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
.demo-carousel {
|
|
2
|
-
margin: auto;
|
|
3
|
-
position: relative;
|
|
4
|
-
|
|
5
|
-
p {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
font-size: 32px;
|
|
10
|
-
margin: 0;
|
|
11
|
-
color: #F3F4F6;
|
|
12
|
-
height: 225px;
|
|
13
|
-
border-radius: 3px;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.ab-carousel {
|
|
18
|
-
position: relative;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.button-prev, .button-next {
|
|
22
|
-
position: absolute;
|
|
23
|
-
box-sizing: border-box;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
font-size: 32px;
|
|
26
|
-
top: 50%;
|
|
27
|
-
margin-top: -15px;
|
|
28
|
-
width: 30px;
|
|
29
|
-
height: 30px;
|
|
30
|
-
color: #F3F4F6;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.button-prev {
|
|
34
|
-
left: 5px;
|
|
35
|
-
top: 50%;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.button-next {
|
|
39
|
-
right: 5px;
|
|
40
|
-
top: 50%;
|
|
41
|
-
}
|
|
1
|
+
.demo-carousel {
|
|
2
|
+
margin: auto;
|
|
3
|
+
position: relative;
|
|
4
|
+
|
|
5
|
+
p {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
font-size: 32px;
|
|
10
|
+
margin: 0;
|
|
11
|
+
color: #F3F4F6;
|
|
12
|
+
height: 225px;
|
|
13
|
+
border-radius: 3px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ab-carousel {
|
|
18
|
+
position: relative;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.button-prev, .button-next {
|
|
22
|
+
position: absolute;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
font-size: 32px;
|
|
26
|
+
top: 50%;
|
|
27
|
+
margin-top: -15px;
|
|
28
|
+
width: 30px;
|
|
29
|
+
height: 30px;
|
|
30
|
+
color: #F3F4F6;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.button-prev {
|
|
34
|
+
left: 5px;
|
|
35
|
+
top: 50%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.button-next {
|
|
39
|
+
right: 5px;
|
|
40
|
+
top: 50%;
|
|
41
|
+
}
|
package/esm/carousel/index.d.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AddListenerEventHandler } from '@autobest-ui/utils';
|
|
3
|
+
export declare enum CarouselDirection {
|
|
4
|
+
vertical = "vertical",
|
|
5
|
+
horizontal = "horizontal"
|
|
6
|
+
}
|
|
3
7
|
export interface CarouselProps {
|
|
4
8
|
children: React.ReactElement[] | React.ReactElement;
|
|
5
9
|
/**
|
|
6
10
|
* 一行显示的数量
|
|
7
11
|
*/
|
|
8
12
|
slidesPerView?: number;
|
|
13
|
+
/**
|
|
14
|
+
* 滚动方向
|
|
15
|
+
*/
|
|
16
|
+
direction?: CarouselDirection;
|
|
9
17
|
/**
|
|
10
18
|
* 监听resize
|
|
11
19
|
*/
|
|
@@ -14,10 +22,6 @@ export interface CarouselProps {
|
|
|
14
22
|
* 是否可以手动控制 只支持移动端
|
|
15
23
|
*/
|
|
16
24
|
controllable?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* 组件高度,可以不写,不写情况下,自动获取高度
|
|
19
|
-
*/
|
|
20
|
-
height?: string;
|
|
21
25
|
/**
|
|
22
26
|
* 敏感值,设置多少后可以进行切换, 只有在 controllable = true时生效
|
|
23
27
|
*/
|
|
@@ -53,17 +57,18 @@ interface CarouselStates {
|
|
|
53
57
|
declare class Carousel extends React.Component<CarouselProps, CarouselStates> {
|
|
54
58
|
readonly prefixCls = "ab-carousel";
|
|
55
59
|
listRef: React.RefObject<HTMLDivElement>;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
sliderSize: number;
|
|
61
|
+
contentSize: number;
|
|
62
|
+
isDirectionLeftOrTop: boolean;
|
|
59
63
|
intersectionObserver: IntersectionObserver;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
startSize: number;
|
|
65
|
+
prevSize: number;
|
|
66
|
+
moveSize: number;
|
|
67
|
+
endSize: number;
|
|
64
68
|
autoplayTimer: any;
|
|
65
69
|
fadeEffectTimer: any;
|
|
66
70
|
static defaultProps: {
|
|
71
|
+
direction: CarouselDirection;
|
|
67
72
|
slidesPerView: number;
|
|
68
73
|
defaultValue: number;
|
|
69
74
|
className: string;
|
|
@@ -82,6 +87,8 @@ declare class Carousel extends React.Component<CarouselProps, CarouselStates> {
|
|
|
82
87
|
next: (transition?: string) => void;
|
|
83
88
|
prev: (transition?: string) => void;
|
|
84
89
|
goTo: (nextIndex: number, transition?: string) => void;
|
|
90
|
+
isHorizontalDirection: () => boolean;
|
|
91
|
+
setElementSizeByDirection: (element: HTMLElement, value: string) => void;
|
|
85
92
|
/**
|
|
86
93
|
* 获取滚动元素数量
|
|
87
94
|
*/
|
|
@@ -103,10 +110,11 @@ declare class Carousel extends React.Component<CarouselProps, CarouselStates> {
|
|
|
103
110
|
/**
|
|
104
111
|
* 设置容器元素样式,分别是:透明度渐变与位置偏移
|
|
105
112
|
* @param element
|
|
106
|
-
* @param
|
|
113
|
+
* @param translateSize
|
|
107
114
|
* @param transition
|
|
108
115
|
*/
|
|
109
|
-
setListStyles: (element: HTMLElement,
|
|
116
|
+
setListStyles: (element: HTMLElement, translateSize: number, transition?: string) => void;
|
|
117
|
+
getTouchSize: (event: any) => any;
|
|
110
118
|
/**
|
|
111
119
|
* 开启自动偏移或者渐变,当元素少于2时,将不会开启
|
|
112
120
|
*/
|