@trionesdev/antd-taro-react 0.0.2-beta.15 → 0.0.2-beta.17
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/LICENSE +21 -21
- package/dist/ActionSheet/style.scss +52 -52
- package/dist/Button/button.d.ts +2 -2
- package/dist/Button/button.js +2 -3
- package/dist/Button/style.scss +246 -235
- package/dist/Calendar/style.scss +88 -88
- package/dist/Calendar/touchable-calendar-grid.js +9 -9
- package/dist/CalendarDatetimePicker/style.scss +62 -62
- package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +2 -2
- package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +3 -3
- package/dist/CalendarPicker/style.scss +32 -32
- package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +2 -2
- package/dist/CalendarPickerCell/CalendarPickerCell.js +3 -3
- package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +2 -2
- package/dist/CalendarPickerCell/CalendarRangePickerCell.js +3 -3
- package/dist/CascaderPicker/style.scss +45 -45
- package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +2 -2
- package/dist/CascaderPickerCell/CascaderPickerCell.js +3 -3
- package/dist/DatePicker/style.scss +41 -41
- package/dist/FetchPicker/FetchPicker.d.ts +113 -0
- package/dist/FetchPicker/FetchPicker.js +322 -0
- package/dist/FetchPicker/index.d.ts +4 -0
- package/dist/FetchPicker/index.js +3 -0
- package/dist/FetchPicker/styles.scss +118 -0
- package/dist/FloatButton/style.scss +126 -126
- package/dist/Form/FormItem/{form-item-input.d.ts → form-item-content.d.ts} +3 -1
- package/dist/Form/FormItem/{form-item-input.js → form-item-content.js} +2 -2
- package/dist/Form/FormItem/form-item-label.js +2 -8
- package/dist/Form/FormItem/form-item.d.ts +3 -2
- package/dist/Form/FormItem/form-item.js +23 -19
- package/dist/Form/index.d.ts +2 -2
- package/dist/Form/style.scss +100 -78
- package/dist/FormCell/index.d.ts +3 -0
- package/dist/FormCell/index.js +2 -0
- package/dist/ImagesPreview/style.scss +34 -34
- package/dist/ImagesWall/style.scss +70 -70
- package/dist/Input/index.scss +282 -267
- package/dist/Input/input-affix-wrapper.js +1 -1
- package/dist/Input/taro-input.js +16 -3
- package/dist/Input/types.d.ts +3 -3
- package/dist/Loading/index.d.ts +4 -0
- package/dist/Loading/index.js +3 -0
- package/dist/Overlay/style.scss +20 -20
- package/dist/Picker/Picker.d.ts +8 -0
- package/dist/Picker/Picker.js +6 -7
- package/dist/Picker/style.scss +41 -41
- package/dist/PickerView/style.scss +13 -13
- package/dist/PickerView/types.d.ts +2 -2
- package/dist/Popup/style.scss +126 -124
- package/dist/SideBar/side-bar.js +6 -6
- package/dist/SideBar/style.scss +85 -85
- package/dist/Stepper/index.d.ts +3 -0
- package/dist/Stepper/index.js +2 -0
- package/dist/Toast/style.scss +63 -63
- package/dist/VerificationCodeInput/style.scss +20 -20
- package/dist/index.d.ts +10 -3
- package/dist/index.js +4 -1
- package/dist/style/variable.scss +34 -20
- package/package.json +20 -24
- package/readme.md +23 -23
- package/dist/SpinLoading/index.d.ts +0 -3
- package/dist/SpinLoading/index.js +0 -2
package/dist/Overlay/style.scss
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
@use "../style/variable" as variable;
|
|
2
|
-
|
|
3
|
-
$trionesOverlayCls: 'triones-antm-overlay';
|
|
4
|
-
|
|
5
|
-
.#{$trionesOverlayCls} {
|
|
6
|
-
position: fixed;
|
|
7
|
-
top: 0;
|
|
8
|
-
left: 0;
|
|
9
|
-
right: 0;
|
|
10
|
-
bottom: 0;
|
|
11
|
-
background-color: rgba(0, 0, 0, .55);
|
|
12
|
-
opacity: 0;
|
|
13
|
-
transition: opacity 0.3s ease;
|
|
14
|
-
pointer-events: none; // 初始状态不可点击
|
|
15
|
-
|
|
16
|
-
&-active {
|
|
17
|
-
opacity: 1;
|
|
18
|
-
pointer-events: auto;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
|
|
3
|
+
$trionesOverlayCls: 'triones-antm-overlay';
|
|
4
|
+
|
|
5
|
+
.#{$trionesOverlayCls} {
|
|
6
|
+
position: fixed;
|
|
7
|
+
top: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
right: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
background-color: rgba(0, 0, 0, .55);
|
|
12
|
+
opacity: 0;
|
|
13
|
+
transition: opacity 0.3s ease;
|
|
14
|
+
pointer-events: none; // 初始状态不可点击
|
|
15
|
+
|
|
16
|
+
&-active {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
pointer-events: auto;
|
|
19
|
+
}
|
|
20
|
+
}
|
package/dist/Picker/Picker.d.ts
CHANGED
|
@@ -12,8 +12,16 @@ export type PickerProps = {
|
|
|
12
12
|
*/
|
|
13
13
|
labelInValue?: boolean;
|
|
14
14
|
value?: any[];
|
|
15
|
+
round?: boolean;
|
|
15
16
|
onOk?: (value: any[]) => void;
|
|
16
17
|
onCancel?: () => void;
|
|
17
18
|
onClose?: () => void;
|
|
19
|
+
styles?: {
|
|
20
|
+
overlay?: React.CSSProperties;
|
|
21
|
+
container?: React.CSSProperties;
|
|
22
|
+
header?: React.CSSProperties;
|
|
23
|
+
title?: React.CSSProperties;
|
|
24
|
+
body?: React.CSSProperties;
|
|
25
|
+
};
|
|
18
26
|
};
|
|
19
27
|
export declare const Picker: FC<PickerProps>;
|
package/dist/Picker/Picker.js
CHANGED
|
@@ -21,9 +21,12 @@ export var Picker = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
21
21
|
_ref$labelInValue = _ref.labelInValue,
|
|
22
22
|
labelInValue = _ref$labelInValue === void 0 ? false : _ref$labelInValue,
|
|
23
23
|
value = _ref.value,
|
|
24
|
+
_ref$round = _ref.round,
|
|
25
|
+
round = _ref$round === void 0 ? true : _ref$round,
|
|
24
26
|
onOk = _ref.onOk,
|
|
25
27
|
onCancel = _ref.onCancel,
|
|
26
|
-
onClose = _ref.onClose
|
|
28
|
+
onClose = _ref.onClose,
|
|
29
|
+
styles = _ref.styles;
|
|
27
30
|
var _ConfigProvider$useCo = ConfigProvider.useConfig(),
|
|
28
31
|
locale = _ConfigProvider$useCo.locale;
|
|
29
32
|
var _useState = useState(value || []),
|
|
@@ -70,12 +73,8 @@ export var Picker = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
70
73
|
onClose: function onClose() {
|
|
71
74
|
afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(false);
|
|
72
75
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
borderTopLeftRadius: 6,
|
|
76
|
-
borderTopRightRadius: 6
|
|
77
|
-
}
|
|
78
|
-
}
|
|
76
|
+
round: round,
|
|
77
|
+
styles: styles
|
|
79
78
|
}, /*#__PURE__*/React.createElement("div", {
|
|
80
79
|
className: classNames(pickerCls)
|
|
81
80
|
}, /*#__PURE__*/React.createElement("div", {
|
package/dist/Picker/style.scss
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
@use "../style/variable" as variable;
|
|
2
|
-
$pickerCls: 'triones-antm-picker';
|
|
3
|
-
|
|
4
|
-
.#{$pickerCls} {
|
|
5
|
-
width: 100%;
|
|
6
|
-
height: 300Px;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
position: relative;
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
|
|
12
|
-
&-header {
|
|
13
|
-
display: flex;
|
|
14
|
-
justify-content: space-between;
|
|
15
|
-
align-items: center;
|
|
16
|
-
border-bottom: 1Px solid #eee;
|
|
17
|
-
padding: 4Px;
|
|
18
|
-
|
|
19
|
-
&-button {
|
|
20
|
-
padding: 8Px;
|
|
21
|
-
font-size: 12Px;
|
|
22
|
-
&-cancel{
|
|
23
|
-
color: variable.$trionesColorTextSecondary;
|
|
24
|
-
}
|
|
25
|
-
&-ok{
|
|
26
|
-
color: variable.$trionesColorPrimary;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&-title {
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&-body {
|
|
35
|
-
flex: 1 1;
|
|
36
|
-
width: 100%;
|
|
37
|
-
height: 100%;
|
|
38
|
-
pointer-events: unset;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
}
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
$pickerCls: 'triones-antm-picker';
|
|
3
|
+
|
|
4
|
+
.#{$pickerCls} {
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 300Px;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
position: relative;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
|
|
12
|
+
&-header {
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
align-items: center;
|
|
16
|
+
border-bottom: 1Px solid #eee;
|
|
17
|
+
padding: 4Px;
|
|
18
|
+
|
|
19
|
+
&-button {
|
|
20
|
+
padding: 8Px;
|
|
21
|
+
font-size: 12Px;
|
|
22
|
+
&-cancel{
|
|
23
|
+
color: variable.$trionesColorTextSecondary;
|
|
24
|
+
}
|
|
25
|
+
&-ok{
|
|
26
|
+
color: variable.$trionesColorPrimary;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-title {
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-body {
|
|
35
|
+
flex: 1 1;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
pointer-events: unset;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
$pickerViewCls: 'triones-antm-picker-view';
|
|
2
|
-
.#{$pickerViewCls}{
|
|
3
|
-
&-column{
|
|
4
|
-
&-item{
|
|
5
|
-
flex-shrink: 0;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
height: 32Px;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
$pickerViewCls: 'triones-antm-picker-view';
|
|
2
|
+
.#{$pickerViewCls}{
|
|
3
|
+
&-column{
|
|
4
|
+
&-item{
|
|
5
|
+
flex-shrink: 0;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
height: 32Px;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export declare const pickerViewCls = "triones-antm-picker-view";
|
|
3
3
|
export type PickerColumnOption = {
|
|
4
|
-
label?:
|
|
5
|
-
value?:
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
value?: any;
|
|
6
6
|
};
|
|
7
7
|
export type PickerViewProps = {
|
|
8
8
|
className?: string;
|
package/dist/Popup/style.scss
CHANGED
|
@@ -1,124 +1,126 @@
|
|
|
1
|
-
@use "../style/variable" as variable;
|
|
2
|
-
|
|
3
|
-
$trionesPopupCls: 'triones-antm-popup';
|
|
4
|
-
|
|
5
|
-
.#{$trionesPopupCls} {
|
|
6
|
-
position: fixed;
|
|
7
|
-
top: 0;
|
|
8
|
-
bottom: 0;
|
|
9
|
-
left: 0;
|
|
10
|
-
right: 0;
|
|
11
|
-
touch-action: none;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
opacity: 0;
|
|
14
|
-
transition: opacity 0.3s ease;
|
|
15
|
-
|
|
16
|
-
&-open {
|
|
17
|
-
pointer-events: auto;
|
|
18
|
-
opacity: 1;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&-overlay {
|
|
22
|
-
width: 100%;
|
|
23
|
-
height: 100%;
|
|
24
|
-
background-color: rgba(0, 0, 0, .55);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&-container {
|
|
28
|
-
position: fixed;
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
background-color: white;
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
&-header {
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
padding-block: variable.$trionesPaddingContentVertical;
|
|
40
|
-
padding-inline: variable.$trionesPaddingContentHorizontal;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
|
|
3
|
+
$trionesPopupCls: 'triones-antm-popup';
|
|
4
|
+
|
|
5
|
+
.#{$trionesPopupCls} {
|
|
6
|
+
position: fixed;
|
|
7
|
+
top: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
touch-action: none;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
opacity: 0;
|
|
14
|
+
transition: opacity 0.3s ease;
|
|
15
|
+
|
|
16
|
+
&-open {
|
|
17
|
+
pointer-events: auto;
|
|
18
|
+
opacity: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-overlay {
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
background-color: rgba(0, 0, 0, .55);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-container {
|
|
28
|
+
position: fixed;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
background-color: white;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
&-header {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
padding-block: variable.$trionesPaddingContentVertical;
|
|
40
|
+
padding-inline: variable.$trionesPaddingContentHorizontal;
|
|
41
|
+
border-bottom: 1px solid variable.$trionesBorderColor;
|
|
42
|
+
&-title{
|
|
43
|
+
flex: 1;
|
|
44
|
+
text-align: center;
|
|
45
|
+
font-size: variable.$trionesFontSizeLg;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-body{
|
|
50
|
+
min-height: 0;
|
|
51
|
+
flex: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&-top {
|
|
55
|
+
top: 0;
|
|
56
|
+
left: 0;
|
|
57
|
+
right: 0;
|
|
58
|
+
max-height: 100%;
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
&.#{$trionesPopupCls} {
|
|
62
|
+
&-round {
|
|
63
|
+
border-bottom-left-radius: variable.$trionesBorderRadius;
|
|
64
|
+
border-bottom-right-radius: variable.$trionesBorderRadius;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&-bottom {
|
|
70
|
+
bottom: 0;
|
|
71
|
+
left: 0;
|
|
72
|
+
right: 0;
|
|
73
|
+
max-height: 100%;
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
&.#{$trionesPopupCls} {
|
|
77
|
+
&-round {
|
|
78
|
+
border-top-left-radius: variable.$trionesBorderRadius;
|
|
79
|
+
border-top-right-radius: variable.$trionesBorderRadius;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&-left {
|
|
85
|
+
top: 0;
|
|
86
|
+
bottom: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
max-width: 100%;
|
|
89
|
+
|
|
90
|
+
&.#{$trionesPopupCls} {
|
|
91
|
+
&-round {
|
|
92
|
+
border-top-right-radius: variable.$trionesBorderRadius;
|
|
93
|
+
border-bottom-right-radius: variable.$trionesBorderRadius;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&-right {
|
|
99
|
+
top: 0;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
max-width: 100%;
|
|
103
|
+
|
|
104
|
+
&.#{$trionesPopupCls} {
|
|
105
|
+
&-round {
|
|
106
|
+
border-top-left-radius: variable.$trionesBorderRadius;
|
|
107
|
+
border-bottom-left-radius: variable.$trionesBorderRadius;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-center {
|
|
113
|
+
top: 50%;
|
|
114
|
+
left: 50%;
|
|
115
|
+
transform: translate(-50%, -50%);
|
|
116
|
+
max-width: 100%;
|
|
117
|
+
max-height: 100%;
|
|
118
|
+
|
|
119
|
+
&.#{$trionesPopupCls} {
|
|
120
|
+
&-round {
|
|
121
|
+
border-radius: variable.$trionesBorderRadius;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
}
|
package/dist/SideBar/side-bar.js
CHANGED
|
@@ -106,8 +106,8 @@ var SideBarContent = /*#__PURE__*/memo(function (_ref2) {
|
|
|
106
106
|
};
|
|
107
107
|
}();
|
|
108
108
|
|
|
109
|
-
/**
|
|
110
|
-
* 计算当前页顶部,距离可滚动区域顶部的距离
|
|
109
|
+
/**
|
|
110
|
+
* 计算当前页顶部,距离可滚动区域顶部的距离
|
|
111
111
|
*/
|
|
112
112
|
var computeReactiveOffsetTop = /*#__PURE__*/function () {
|
|
113
113
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
@@ -153,8 +153,8 @@ var SideBarContent = /*#__PURE__*/memo(function (_ref2) {
|
|
|
153
153
|
};
|
|
154
154
|
}();
|
|
155
155
|
|
|
156
|
-
/**
|
|
157
|
-
* 计算当前页底部,距离可滚动区域顶部的距离
|
|
156
|
+
/**
|
|
157
|
+
* 计算当前页底部,距离可滚动区域顶部的距离
|
|
158
158
|
*/
|
|
159
159
|
var computeReactiveOffsetBottom = /*#__PURE__*/function () {
|
|
160
160
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
@@ -232,8 +232,8 @@ var SideBarContent = /*#__PURE__*/memo(function (_ref2) {
|
|
|
232
232
|
}
|
|
233
233
|
}, [activeKey]);
|
|
234
234
|
|
|
235
|
-
/**
|
|
236
|
-
* 监听滚动变化,只有在人为操作的时候才监听滚动的位置是否需要切换tab,如果是切换tab 引发的滚动则不执行
|
|
235
|
+
/**
|
|
236
|
+
* 监听滚动变化,只有在人为操作的时候才监听滚动的位置是否需要切换tab,如果是切换tab 引发的滚动则不执行
|
|
237
237
|
*/
|
|
238
238
|
useEffect(function () {
|
|
239
239
|
if (mode === 'scroll' && manual && scrollDetail !== null && scrollDetail !== void 0 && scrollDetail.manual) {
|
package/dist/SideBar/style.scss
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
@use "../style/variable" as variable;
|
|
2
|
-
|
|
3
|
-
$trionesSideBarCls: 'triones-antm-sidebar';
|
|
4
|
-
|
|
5
|
-
.#{$trionesSideBarCls} {
|
|
6
|
-
display: flex;
|
|
7
|
-
height: 100%;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
&-tabs {
|
|
11
|
-
min-width: 0;
|
|
12
|
-
background-color: variable.$trionesColorFill;
|
|
13
|
-
overflow: auto;
|
|
14
|
-
scrollbar-width: thin;
|
|
15
|
-
flex-shrink: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&-tab {
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
padding: variable.$trionesPadding variable.$trionesPadding;
|
|
21
|
-
color: variable.$trionesColorTextSecondary;
|
|
22
|
-
|
|
23
|
-
&-active {
|
|
24
|
-
color: variable.$trionesColorPrimaryText;
|
|
25
|
-
background-color: variable.$trionesColorBgBase;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&-content {
|
|
31
|
-
flex: 1 auto;
|
|
32
|
-
min-width: 0;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
//overflow-y: auto;
|
|
35
|
-
//scrollbar-width: none;
|
|
36
|
-
position: relative;
|
|
37
|
-
user-select: none;
|
|
38
|
-
touch-action: none;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
&-wheel {
|
|
42
|
-
width: 100%;
|
|
43
|
-
cursor: grab;
|
|
44
|
-
position: absolute;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&-item {
|
|
48
|
-
|
|
49
|
-
&-active {
|
|
50
|
-
display: block;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&-switch-mode {
|
|
56
|
-
.#{$trionesSideBarCls} {
|
|
57
|
-
&-content {
|
|
58
|
-
|
|
59
|
-
&-item {
|
|
60
|
-
height: 100%;
|
|
61
|
-
display: none;
|
|
62
|
-
&-active {
|
|
63
|
-
display: block;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&-scroll-mode {
|
|
71
|
-
.#{$trionesSideBarCls} {
|
|
72
|
-
&-content {
|
|
73
|
-
|
|
74
|
-
&-item {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
&-active {
|
|
78
|
-
display: block;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
}
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
|
|
3
|
+
$trionesSideBarCls: 'triones-antm-sidebar';
|
|
4
|
+
|
|
5
|
+
.#{$trionesSideBarCls} {
|
|
6
|
+
display: flex;
|
|
7
|
+
height: 100%;
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
&-tabs {
|
|
11
|
+
min-width: 0;
|
|
12
|
+
background-color: variable.$trionesColorFill;
|
|
13
|
+
overflow: auto;
|
|
14
|
+
scrollbar-width: thin;
|
|
15
|
+
flex-shrink: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-tab {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
padding: variable.$trionesPadding variable.$trionesPadding;
|
|
21
|
+
color: variable.$trionesColorTextSecondary;
|
|
22
|
+
|
|
23
|
+
&-active {
|
|
24
|
+
color: variable.$trionesColorPrimaryText;
|
|
25
|
+
background-color: variable.$trionesColorBgBase;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-content {
|
|
31
|
+
flex: 1 auto;
|
|
32
|
+
min-width: 0;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
//overflow-y: auto;
|
|
35
|
+
//scrollbar-width: none;
|
|
36
|
+
position: relative;
|
|
37
|
+
user-select: none;
|
|
38
|
+
touch-action: none;
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
&-wheel {
|
|
42
|
+
width: 100%;
|
|
43
|
+
cursor: grab;
|
|
44
|
+
position: absolute;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&-item {
|
|
48
|
+
|
|
49
|
+
&-active {
|
|
50
|
+
display: block;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&-switch-mode {
|
|
56
|
+
.#{$trionesSideBarCls} {
|
|
57
|
+
&-content {
|
|
58
|
+
|
|
59
|
+
&-item {
|
|
60
|
+
height: 100%;
|
|
61
|
+
display: none;
|
|
62
|
+
&-active {
|
|
63
|
+
display: block;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&-scroll-mode {
|
|
71
|
+
.#{$trionesSideBarCls} {
|
|
72
|
+
&-content {
|
|
73
|
+
|
|
74
|
+
&-item {
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
&-active {
|
|
78
|
+
display: block;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
}
|