@nutui/nutui-react 3.0.13 → 3.0.14

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 (74) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  3. package/dist/cjs/packages/datepicker/utils.js +1 -1
  4. package/dist/cjs/packages/elevator/elevator.d.ts +3 -20
  5. package/dist/cjs/packages/elevator/elevator.js +35 -22
  6. package/dist/cjs/packages/elevator/index.d.ts +1 -1
  7. package/dist/cjs/packages/elevator/style/elevator.scss +61 -33
  8. package/dist/cjs/packages/elevator/style/style.css +65 -40
  9. package/dist/cjs/packages/elevator/style-jmapp/elevator.scss +61 -33
  10. package/dist/cjs/packages/elevator/style-jmapp/style.css +56 -31
  11. package/dist/cjs/packages/elevator/style-jrkf/elevator.scss +61 -33
  12. package/dist/cjs/packages/elevator/style-jrkf/style.css +56 -31
  13. package/dist/cjs/packages/image/image.js +11 -15
  14. package/dist/cjs/packages/navbar/style/navbar.scss +2 -0
  15. package/dist/cjs/packages/navbar/style/style.css +2 -0
  16. package/dist/cjs/packages/navbar/style-jmapp/navbar.scss +2 -0
  17. package/dist/cjs/packages/navbar/style-jmapp/style.css +2 -0
  18. package/dist/cjs/packages/navbar/style-jrkf/navbar.scss +2 -0
  19. package/dist/cjs/packages/navbar/style-jrkf/style.css +2 -0
  20. package/dist/cjs/packages/price/style/price.scss +9 -0
  21. package/dist/cjs/packages/price/style/style.css +9 -0
  22. package/dist/cjs/packages/price/style-jmapp/price.scss +9 -0
  23. package/dist/cjs/packages/price/style-jmapp/style.css +9 -0
  24. package/dist/cjs/packages/price/style-jrkf/price.scss +9 -0
  25. package/dist/cjs/packages/price/style-jrkf/style.css +9 -0
  26. package/dist/cjs/packages/tabpane/style/style.css +1 -1
  27. package/dist/cjs/packages/tabpane/style/tabpane.scss +1 -1
  28. package/dist/cjs/packages/tabpane/style-jmapp/style.css +1 -1
  29. package/dist/cjs/packages/tabpane/style-jmapp/tabpane.scss +1 -1
  30. package/dist/cjs/packages/tabpane/style-jrkf/style.css +1 -1
  31. package/dist/cjs/packages/tabpane/style-jrkf/tabpane.scss +1 -1
  32. package/dist/cjs/types/spec/elevator/base.d.ts +5 -2
  33. package/dist/es/packages/configprovider/types.d.ts +1 -1
  34. package/dist/es/packages/datepicker/utils.js +1 -1
  35. package/dist/es/packages/elevator/elevator.d.ts +3 -20
  36. package/dist/es/packages/elevator/elevator.js +35 -22
  37. package/dist/es/packages/elevator/index.d.ts +1 -1
  38. package/dist/es/packages/elevator/style/elevator.scss +61 -33
  39. package/dist/es/packages/elevator/style/style.css +65 -40
  40. package/dist/es/packages/elevator/style-jmapp/elevator.scss +61 -33
  41. package/dist/es/packages/elevator/style-jmapp/style.css +56 -31
  42. package/dist/es/packages/elevator/style-jrkf/elevator.scss +61 -33
  43. package/dist/es/packages/elevator/style-jrkf/style.css +56 -31
  44. package/dist/es/packages/image/image.js +11 -15
  45. package/dist/es/packages/navbar/style/navbar.scss +2 -0
  46. package/dist/es/packages/navbar/style/style.css +2 -0
  47. package/dist/es/packages/navbar/style-jmapp/navbar.scss +2 -0
  48. package/dist/es/packages/navbar/style-jmapp/style.css +2 -0
  49. package/dist/es/packages/navbar/style-jrkf/navbar.scss +2 -0
  50. package/dist/es/packages/navbar/style-jrkf/style.css +2 -0
  51. package/dist/es/packages/price/style/price.scss +9 -0
  52. package/dist/es/packages/price/style/style.css +9 -0
  53. package/dist/es/packages/price/style-jmapp/price.scss +9 -0
  54. package/dist/es/packages/price/style-jmapp/style.css +9 -0
  55. package/dist/es/packages/price/style-jrkf/price.scss +9 -0
  56. package/dist/es/packages/price/style-jrkf/style.css +9 -0
  57. package/dist/es/packages/tabpane/style/style.css +1 -1
  58. package/dist/es/packages/tabpane/style/tabpane.scss +1 -1
  59. package/dist/es/packages/tabpane/style-jmapp/style.css +1 -1
  60. package/dist/es/packages/tabpane/style-jmapp/tabpane.scss +1 -1
  61. package/dist/es/packages/tabpane/style-jrkf/style.css +1 -1
  62. package/dist/es/packages/tabpane/style-jrkf/tabpane.scss +1 -1
  63. package/dist/es/types/spec/elevator/base.d.ts +15 -6
  64. package/dist/nutui.react.umd.js +240 -233
  65. package/dist/style-jmapp.css +1 -1
  66. package/dist/style-jmapp.scss +31 -31
  67. package/dist/style-jrkf.css +1 -1
  68. package/dist/style-jrkf.scss +40 -40
  69. package/dist/style.css +1 -1
  70. package/dist/style.scss +32 -32
  71. package/dist/styles/variables-jmapp.scss +14 -2
  72. package/dist/styles/variables-jrkf.scss +14 -2
  73. package/dist/styles/variables.scss +24 -43
  74. package/package.json +1 -1
@@ -45,7 +45,7 @@ import { isDate } from "../../utils/is-date";
45
45
  * 根据选中的日期和类型,生成日期选择器的范围配置
46
46
  * @returns {Array} 返回日期选择器的范围配置数组
47
47
  */ export var generateDatePickerRanges = function(type, selectedDate, startDate, endDate) {
48
- var selected = new Date(selectedDate);
48
+ var selected = selectedDate ? new Date(selectedDate) : new Date(startDate);
49
49
  if (!selected) return [];
50
50
  // 获取最大和最小边界值
51
51
  var _calculateDateBoundary = calculateDateBoundary('max', selected, startDate, endDate), maxYear = _calculateDateBoundary.maxYear, maxDate = _calculateDateBoundary.maxDate, maxMonth = _calculateDateBoundary.maxMonth, maxHour = _calculateDateBoundary.maxHour, maxMinute = _calculateDateBoundary.maxMinute, maxSeconds = _calculateDateBoundary.maxSeconds;
@@ -1,23 +1,6 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- import { BasicComponent } from "../../utils/typings";
3
- export declare const elevatorContext: React.Context<ElevatorData>;
4
- export interface ElevatorProps extends BasicComponent {
5
- height: number | string;
6
- floorKey: string;
7
- list: any[];
8
- sticky: boolean;
9
- spaceHeight: number;
10
- titleHeight: number;
11
- showKeys: boolean;
12
- onItemClick: (key: string, item: ElevatorData) => void;
13
- onIndexClick: (key: string) => void;
14
- }
15
- interface ElevatorData {
16
- name: string;
17
- id: number | string;
18
- [key: string]: string | number;
19
- }
20
- export declare const Elevator: FunctionComponent<Partial<ElevatorProps> & React.HTMLAttributes<HTMLDivElement>> & {
2
+ import { ElevatorItem, WebElevatorProps } from "../../types";
3
+ export declare const elevatorContext: React.Context<ElevatorItem>;
4
+ export declare const Elevator: FunctionComponent<Partial<WebElevatorProps> & React.HTMLAttributes<HTMLDivElement>> & {
21
5
  Context: typeof elevatorContext;
22
6
  };
23
- export {};
@@ -8,24 +8,29 @@ import { useGesture } from "@use-gesture/react";
8
8
  import { animated } from "@react-spring/web";
9
9
  import classNames from "classnames";
10
10
  import { ComponentDefaults } from "../../utils/typings";
11
+ import { usePropsValue } from "../../hooks";
11
12
  export var elevatorContext = /*#__PURE__*/ createContext({});
12
13
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
14
+ mode: 'horizontal',
13
15
  height: '200px',
14
16
  floorKey: 'title',
15
17
  list: [],
16
18
  sticky: false,
17
- spaceHeight: 23,
18
- titleHeight: 35,
19
- showKeys: true
19
+ spaceHeight: 18,
20
+ showKeys: true,
21
+ defaultValue: undefined,
22
+ value: undefined
20
23
  });
21
24
  export var Elevator = function(props) {
22
- var _ref = _object_spread({}, defaultProps, props), height = _ref.height, floorKey = _ref.floorKey, list = _ref.list, sticky = _ref.sticky, spaceHeight = _ref.spaceHeight, titleHeight = _ref.titleHeight, showKeys = _ref.showKeys, className = _ref.className, style = _ref.style, onItemClick = _ref.onItemClick, onIndexClick = _ref.onIndexClick, children = _ref.children, rest = _object_without_properties(_ref, [
25
+ var _ref = _object_spread({}, defaultProps, props), value = _ref.value, defaultValue = _ref.defaultValue, mode = _ref.mode, height = _ref.height, floorKey = _ref.floorKey, list = _ref.list, sticky = _ref.sticky, spaceHeight = _ref.spaceHeight, showKeys = _ref.showKeys, className = _ref.className, style = _ref.style, onItemClick = _ref.onItemClick, onIndexClick = _ref.onIndexClick, children = _ref.children, rest = _object_without_properties(_ref, [
26
+ "value",
27
+ "defaultValue",
28
+ "mode",
23
29
  "height",
24
30
  "floorKey",
25
31
  "list",
26
32
  "sticky",
27
33
  "spaceHeight",
28
- "titleHeight",
29
34
  "showKeys",
30
35
  "className",
31
36
  "style",
@@ -46,21 +51,24 @@ export var Elevator = function(props) {
46
51
  y2: 0
47
52
  });
48
53
  var _useState = _sliced_to_array(useState(0), 2), scrollY = _useState[0], setScrollY = _useState[1];
49
- var _useState1 = _sliced_to_array(useState({}), 2), currentData = _useState1[0], setCurrentData = _useState1[1];
50
- var _useState2 = _sliced_to_array(useState(''), 2), currentKey = _useState2[0], setCurrentKey = _useState2[1];
51
- var _useState3 = _sliced_to_array(useState(0), 2), currentIndex = _useState3[0], setCurrentIndex = _useState3[1];
52
- var _useState4 = _sliced_to_array(useState(0), 2), codeIndex = _useState4[0], setCodeIndex = _useState4[1];
53
- var _useState5 = _sliced_to_array(useState(false), 2), scrollStart = _useState5[0], setScrollStart = _useState5[1];
54
+ var _usePropsValue = _sliced_to_array(usePropsValue({
55
+ value: value,
56
+ defaultValue: defaultValue || {}
57
+ }), 2), currentData = _usePropsValue[0], setCurrentData = _usePropsValue[1];
58
+ var _useState1 = _sliced_to_array(useState(0), 2), currentIndex = _useState1[0], setCurrentIndex = _useState1[1];
59
+ var _useState2 = _sliced_to_array(useState(0), 2), codeIndex = _useState2[0], setCodeIndex = _useState2[1];
60
+ var _useState3 = _sliced_to_array(useState(false), 2), scrollStart = _useState3[0], setScrollStart = _useState3[1];
54
61
  var state = useRef(initData);
55
62
  var resetScrollState = function() {
56
63
  setScrollStart(false);
57
64
  };
58
- var clientHeight = function() {
59
- return listview.current ? listview.current.clientHeight : 0;
60
- };
61
65
  var getData = function(el, name) {
62
66
  var prefix = 'data-';
63
- return el.getAttribute(prefix + name);
67
+ // 检查点击的元素是否直接包含 data-index 属性
68
+ if (el.hasAttribute('data-index')) {
69
+ return el.getAttribute(prefix + name);
70
+ }
71
+ return '-1';
64
72
  };
65
73
  var calculateHeight = function() {
66
74
  var height = 0;
@@ -95,6 +103,10 @@ export var Elevator = function(props) {
95
103
  var target = param.target, offset = param.offset;
96
104
  setScrollStart(true);
97
105
  var index = Number(getData(target, 'index'));
106
+ if (index < 0) {
107
+ setScrollStart(false);
108
+ return;
109
+ }
98
110
  touchState.current.y1 = offset[1];
99
111
  state.current.anchorIndex = +index;
100
112
  setCodeIndex(function(codeIndex) {
@@ -116,7 +128,6 @@ export var Elevator = function(props) {
116
128
  var handleClickItem = function(key, item) {
117
129
  onItemClick && onItemClick(key, item);
118
130
  setCurrentData(item);
119
- setCurrentKey(key);
120
131
  };
121
132
  var handleClickIndex = function(key) {
122
133
  onIndexClick && onIndexClick(key);
@@ -161,13 +172,13 @@ export var Elevator = function(props) {
161
172
  ]);
162
173
  var _obj;
163
174
  return /*#__PURE__*/ React.createElement("div", _object_spread({
164
- className: "".concat(classPrefix, " ").concat(className),
175
+ className: "".concat(classPrefix, " ").concat(classPrefix, "-").concat(mode, " ").concat(className),
165
176
  style: style
166
- }, rest), sticky && scrollY > 0 ? /*#__PURE__*/ React.createElement("div", {
177
+ }, rest), mode === 'vertical' && sticky && scrollY > 0 ? /*#__PURE__*/ React.createElement("div", {
167
178
  className: "".concat(classPrefix, "-list-fixed")
168
179
  }, /*#__PURE__*/ React.createElement("span", {
169
180
  className: "".concat(classPrefix, "-list-fixed-title")
170
- }, list[currentIndex][floorKey])) : null, /*#__PURE__*/ React.createElement("div", {
181
+ }, list[currentIndex] && String(list[currentIndex][floorKey]))) : null, /*#__PURE__*/ React.createElement("div", {
171
182
  className: "".concat(classPrefix, "-list"),
172
183
  style: {
173
184
  height: Number.isNaN(+height) ? height : "".concat(height, "px")
@@ -181,10 +192,12 @@ export var Elevator = function(props) {
181
192
  key: idx
182
193
  }, /*#__PURE__*/ React.createElement("div", {
183
194
  className: "".concat(classPrefix, "-list-item-code")
184
- }, item[floorKey]), /*#__PURE__*/ React.createElement(React.Fragment, null, item.list.map(function(subitem) {
195
+ }, item[floorKey]), /*#__PURE__*/ React.createElement("div", {
196
+ className: "".concat(classPrefix, "-list-item-sublist")
197
+ }, item.list.map(function(subitem) {
185
198
  var _obj;
186
199
  return /*#__PURE__*/ React.createElement("div", {
187
- className: classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-list-item-name"), true), _define_property(_obj, "".concat(classPrefix, "-list-item-name-highcolor"), currentData.id === subitem.id && currentKey === item[floorKey]), _obj)),
200
+ className: classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-list-item-name"), true), _define_property(_obj, "".concat(classPrefix, "-list-item-name-highcolor"), currentData.id === subitem.id), _obj)),
188
201
  key: subitem.id,
189
202
  onClick: function() {
190
203
  return handleClickItem(item[floorKey], subitem);
@@ -195,7 +208,7 @@ export var Elevator = function(props) {
195
208
  })));
196
209
  }))), showKeys ? /*#__PURE__*/ React.createElement(React.Fragment, null, list.length && scrollStart ? /*#__PURE__*/ React.createElement("div", {
197
210
  className: classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-code-current"), true), _define_property(_obj, "".concat(classPrefix, "-code-current-current"), true), _obj))
198
- }, list[codeIndex][floorKey]) : null, /*#__PURE__*/ React.createElement("div", {
211
+ }, list[codeIndex] && String(list[codeIndex][floorKey])) : null, /*#__PURE__*/ React.createElement("div", {
199
212
  className: "".concat(classPrefix, "-bars")
200
213
  }, /*#__PURE__*/ React.createElement(animated.div, _object_spread_props(_object_spread({
201
214
  className: "".concat(classPrefix, "-bars-inner")
@@ -213,7 +226,7 @@ export var Elevator = function(props) {
213
226
  onClick: function() {
214
227
  return handleClickIndex(item[floorKey]);
215
228
  }
216
- }, item[floorKey]);
229
+ }, String(item[floorKey]));
217
230
  })))) : null);
218
231
  };
219
232
  Elevator.displayName = 'NutElevator';
@@ -1,3 +1,3 @@
1
1
  import { Elevator } from './elevator';
2
- export type { ElevatorProps } from './elevator';
2
+ export type { WebElevatorProps as ElevatorProps } from "../../types";
3
3
  export default Elevator;
@@ -1,68 +1,66 @@
1
1
  .nut-elevator {
2
- width: 100%;
3
- display: block;
4
2
  position: relative;
5
- overflow: hidden;
3
+ display: flex;
4
+ width: 100%;
6
5
 
7
6
  &-list {
8
- display: block;
9
7
  position: relative;
10
8
  top: 0;
9
+ display: flex;
10
+ width: 100%;
11
11
  overflow: hidden;
12
- font-size: $elevator-list-font-size;
13
- color: $elevator-list-color;
14
12
 
15
13
  &-inner {
16
- height: 100%;
14
+ display: flex;
15
+ flex-direction: column;
16
+ min-height: 100%;
17
17
  width: 100%;
18
- display: block;
19
18
  background-color: $elevator-list-bg-color;
20
19
  overflow: auto;
21
20
  }
22
21
 
23
22
  &-item {
24
- display: block;
25
-
23
+ display: flex;
24
+ &-sublist {
25
+ display: flex;
26
+ flex-direction: column;
27
+ }
26
28
  &-code {
27
29
  display: flex;
28
- position: relative;
30
+ align-items: center;
29
31
  height: $elevator-list-item-code-height;
30
- line-height: $elevator-list-item-code-line-height;
31
32
  font-size: $elevator-list-item-code-font-size;
32
33
  color: $elevator-list-item-code-color;
33
- padding: $elevator-list-item-padding;
34
34
  font-weight: $elevator-list-item-code-font-weight;
35
- box-sizing: border-box;
36
- border-bottom: $elevator-list-item-code-border-bottom;
37
- background-color: $elevator-list-item-code-background-color;
38
35
  }
39
36
 
40
37
  &-name {
41
38
  display: flex;
42
39
  align-items: center;
43
- padding: $elevator-list-item-padding;
44
40
  height: $elevator-list-item-name-height;
45
- line-height: $elevator-list-item-name-line-height;
41
+ font-size: $elevator-list-font-size;
42
+ color: $elevator-list-color;
46
43
 
47
44
  &-highcolor {
48
45
  color: $color-primary;
46
+ font-weight: 600;
49
47
  }
50
48
  }
51
49
  }
52
50
 
53
51
  &-fixed {
54
- display: flex;
55
- align-items: center;
56
- width: 100%;
57
52
  position: absolute;
58
53
  top: 0;
59
54
  left: 0;
60
55
  z-index: 1;
56
+ display: flex;
57
+ align-items: center;
58
+ width: 100%;
61
59
  padding: $elevator-list-item-padding;
62
60
  height: $elevator-list-item-code-height;
63
- background-color: $elevator-list-fixed-bg-color;
64
61
  box-sizing: border-box;
65
62
  box-shadow: $elevator-list-fixed-box-shadow;
63
+ background-color: $elevator-list-fixed-bg-color;
66
64
  &-title {
67
65
  font-size: $elevator-list-item-code-font-size;
68
66
  color: $elevator-list-fixed-color;
@@ -76,41 +74,71 @@
76
74
  right: $elevator-list-item-code-current-right;
77
75
  top: $elevator-list-item-code-current-top;
78
76
  transform: $elevator-bars-transform;
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: center;
79
80
  width: $elevator-list-item-code-current-width;
80
81
  height: $elevator-list-item-code-current-height;
81
- line-height: $elevator-list-item-code-current-line-height;
82
82
  border-radius: $elevator-list-item-code-current-border-radius;
83
83
  background: $elevator-list-item-code-current-bg-color;
84
84
  box-shadow: $elevator-list-item-code-current-box-shadow;
85
- text-align: $elevator-list-item-code-current-text-align;
85
+ color: $elevator-list-item-code-current-color;
86
86
  }
87
87
 
88
88
  &-bars {
89
89
  position: absolute;
90
90
  right: $elevator-bars-right;
91
91
  top: $elevator-bars-top;
92
- color: $color-text-help;
93
- font-size: $elevator-bars-font-size;
94
92
  transform: $elevator-bars-transform;
95
- padding: $elevator-bars-padding;
96
- background-color: $elevator-bars-background-color;
97
- border-radius: $elevator-bars-border-radius;
98
- text-align: center;
99
93
  z-index: $elevator-bars-z-index;
100
94
 
101
95
  &-inner {
96
+ display: flex;
97
+ flex-direction: column;
102
98
  &-item {
103
- display: block;
104
- padding: $elevator-bars-inner-item-padding;
99
+ display: inline-flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ height: 16px;
103
+ width: 16px;
104
+ border-radius: 50%;
105
+ margin: 1px 0;
106
+ color: $elevator-bars-color;
107
+ font-size: $elevator-bars-font-size;
105
108
  cursor: pointer;
106
-
107
109
  &-active {
108
110
  font-weight: $font-weight-bold;
109
111
  color: $elevator-bars-active-color;
112
+ /* #ifndef weapp jd*/
113
+ background: linear-gradient(to right, #ff475d, #ff0f23);
114
+ /* #endif */
115
+ /* #ifdef weapp jd*/
116
+ background: #ff0f23;
117
+ /* #endif */
110
118
  }
111
119
  }
112
120
  }
113
121
  }
122
+ &-horizontal {
123
+ .nut-elevator-list-item {
124
+ &-code {
125
+ width: $elevator-list-item-code-width;
126
+ justify-content: center;
127
+ }
128
+ }
129
+ }
130
+ &-vertical {
131
+ .nut-elevator-list-item {
132
+ flex-direction: column;
133
+ &-code {
134
+ border-bottom: $elevator-list-item-code-border-bottom;
135
+ }
136
+ &-name,
137
+ &-code {
138
+ padding: $elevator-list-item-padding;
139
+ }
140
+ }
141
+ }
114
142
  }
115
143
 
116
144
  [dir='rtl'] .nut-elevator,
@@ -3,65 +3,64 @@
3
3
  /* #ifndef harmony */
4
4
  /* #endif */
5
5
  .nut-elevator {
6
- width: 100%;
7
- display: block;
8
6
  position: relative;
9
- overflow: hidden;
7
+ display: flex;
8
+ width: 100%;
10
9
  }
11
10
  .nut-elevator-list {
12
- display: block;
13
11
  position: relative;
14
12
  top: 0;
13
+ display: flex;
14
+ width: 100%;
15
15
  overflow: hidden;
16
- font-size: var(--nutui-elevator-list-font-size, var(--nutui-font-size-s, 12px));
17
- color: var(--nutui-elevator-list-color, var(--nutui-color-title, #1a1a1a));
18
16
  }
19
17
  .nut-elevator-list-inner {
20
- height: 100%;
18
+ display: flex;
19
+ flex-direction: column;
20
+ min-height: 100%;
21
21
  width: 100%;
22
- display: block;
23
22
  background-color: var(--nutui-elevator-list-bg-color, #ffffff);
24
23
  overflow: auto;
25
24
  }
26
25
  .nut-elevator-list-item {
27
- display: block;
26
+ display: flex;
27
+ }
28
+ .nut-elevator-list-item-sublist {
29
+ display: flex;
30
+ flex-direction: column;
28
31
  }
29
32
  .nut-elevator-list-item-code {
30
33
  display: flex;
31
- position: relative;
32
- height: var(--nutui-elevator-list-item-code-height, 35px);
33
- line-height: var(--nutui-elevator-list-item-code-line-height, 35px);
34
+ align-items: center;
35
+ height: var(--nutui-elevator-list-item-code-height, 34px);
34
36
  font-size: var(--nutui-elevator-list-item-code-font-size, var(--nutui-font-size-base, 14px));
35
- color: var(--nutui-elevator-list-item-code-color, var(--nutui-color-title, #1a1a1a));
36
- padding: var(--nutui-elevator-list-item-padding, 0 20px);
37
+ color: var(--nutui-elevator-list-item-code-color, var(--nutui-color-text-help, #888b94));
37
38
  font-weight: var(--nutui-elevator-list-item-code-font-weight, var(--nutui-font-weight-bold, 600));
38
- box-sizing: border-box;
39
- border-bottom: var(--nutui-elevator-list-item-code-border-bottom, 1px solid var(--nutui-color-border, rgba(0, 0, 0, 0.06)));
40
- background-color: var(--nutui-elevator-list-item-code-background-color, inherit);
41
39
  }
42
40
  .nut-elevator-list-item-name {
43
41
  display: flex;
44
42
  align-items: center;
45
- padding: var(--nutui-elevator-list-item-padding, 0 20px);
46
- height: var(--nutui-elevator-list-item-name-height, 30px);
47
- line-height: var(--nutui-elevator-list-item-name-line-height, 30px);
43
+ height: var(--nutui-elevator-list-item-name-height, 34px);
44
+ font-size: var(--nutui-elevator-list-font-size, var(--nutui-font-size-base, 14px));
45
+ color: var(--nutui-elevator-list-color, var(--nutui-color-title, #1a1a1a));
48
46
  }
49
47
  .nut-elevator-list-item-name-highcolor {
50
48
  color: var(--nutui-color-primary, #ff0f23);
49
+ font-weight: 600;
51
50
  }
52
51
  .nut-elevator-list-fixed {
53
- display: flex;
54
- align-items: center;
55
- width: 100%;
56
52
  position: absolute;
57
53
  top: 0;
58
54
  left: 0;
59
55
  z-index: 1;
60
- padding: var(--nutui-elevator-list-item-padding, 0 20px);
61
- height: var(--nutui-elevator-list-item-code-height, 35px);
62
- background-color: var(--nutui-elevator-list-fixed-bg-color, #ffffff);
56
+ display: flex;
57
+ align-items: center;
58
+ width: 100%;
59
+ padding: var(--nutui-elevator-list-item-padding, 0 36px 0 20px);
60
+ height: var(--nutui-elevator-list-item-code-height, 34px);
63
61
  box-sizing: border-box;
64
62
  box-shadow: var(--nutui-elevator-list-fixed-box-shadow, 0 0 10px #eee);
63
+ background-color: var(--nutui-elevator-list-fixed-bg-color, #ffffff);
65
64
  }
66
65
  .nut-elevator-list-fixed-title {
67
66
  font-size: var(--nutui-elevator-list-item-code-font-size, var(--nutui-font-size-base, 14px));
@@ -73,35 +72,61 @@
73
72
  right: var(--nutui-elevator-list-item-code-current-right, 60px);
74
73
  top: var(--nutui-elevator-list-item-code-current-top, 50%);
75
74
  transform: var(--nutui-elevator-bars-transform, translateY(-50%));
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: center;
76
78
  width: var(--nutui-elevator-list-item-code-current-width, 45px);
77
79
  height: var(--nutui-elevator-list-item-code-current-height, 45px);
78
- line-height: var(--nutui-elevator-list-item-code-current-line-height, 45px);
79
80
  border-radius: var(--nutui-elevator-list-item-code-current-border-radius, 50%);
80
- background: var(--nutui-elevator-list-item-code-current-bg-color, #fff);
81
+ background: var(--nutui-elevator-list-item-code-current-bg-color, var(--nutui-color-text-disabled, #c2c4cc));
81
82
  box-shadow: 0 3px 3px 1px rgb(240, 240, 240);
82
- text-align: var(--nutui-elevator-list-item-code-current-text-align, center);
83
+ color: var(--nutui-elevator-list-item-code-current-color, #ffffff);
83
84
  }
84
85
  .nut-elevator-bars {
85
86
  position: absolute;
86
- right: var(--nutui-elevator-bars-right, 10px);
87
+ right: var(--nutui-elevator-bars-right, 16px);
87
88
  top: var(--nutui-elevator-bars-top, 50%);
88
- color: var(--nutui-color-text-help, #888b94);
89
- font-size: var(--nutui-elevator-bars-font-size, var(--nutui-font-size-s, 12px));
90
89
  transform: var(--nutui-elevator-bars-transform, translateY(-50%));
91
- padding: var(--nutui-elevator-bars-padding, 15px 0);
92
- background-color: var(--nutui-elevator-bars-background-color, var(--nutui-color-background, #f2f3f5));
93
- border-radius: var(--nutui-elevator-bars-border-radius, 6px);
94
- text-align: center;
95
90
  z-index: var(--nutui-elevator-bars-z-index, 1);
96
91
  }
92
+ .nut-elevator-bars-inner {
93
+ display: flex;
94
+ flex-direction: column;
95
+ }
97
96
  .nut-elevator-bars-inner-item {
98
- display: block;
99
- padding: var(--nutui-elevator-bars-inner-item-padding, 3px);
97
+ display: inline-flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ height: 16px;
101
+ width: 16px;
102
+ border-radius: 50%;
103
+ margin: 1px 0;
104
+ color: var(--nutui-elevator-bars-color, var(--nutui-color-text-help, #888b94));
105
+ font-size: var(--nutui-elevator-bars-font-size, var(--nutui-font-size-xxs, 10px));
100
106
  cursor: pointer;
101
107
  }
102
108
  .nut-elevator-bars-inner-item-active {
103
109
  font-weight: var(--nutui-font-weight-bold, 600);
104
- color: var(--nutui-elevator-bars-active-color, var(--nutui-color-primary, #ff0f23));
110
+ color: var(--nutui-elevator-bars-active-color, #ffffff);
111
+ /* #ifndef weapp jd*/
112
+ background: linear-gradient(to right, #ff475d, #ff0f23);
113
+ /* #endif */
114
+ /* #ifdef weapp jd*/
115
+ background: #ff0f23;
116
+ /* #endif */
117
+ }
118
+ .nut-elevator-horizontal .nut-elevator-list-item-code {
119
+ width: var(--nutui-elevator-list-item-code-width, 34px);
120
+ justify-content: center;
121
+ }
122
+ .nut-elevator-vertical .nut-elevator-list-item {
123
+ flex-direction: column;
124
+ }
125
+ .nut-elevator-vertical .nut-elevator-list-item-code {
126
+ border-bottom: var(--nutui-elevator-list-item-code-border-bottom, 1px solid var(--nutui-color-border, rgba(0, 0, 0, 0.06)));
127
+ }
128
+ .nut-elevator-vertical .nut-elevator-list-item-name, .nut-elevator-vertical .nut-elevator-list-item-code {
129
+ padding: var(--nutui-elevator-list-item-padding, 0 36px 0 20px);
105
130
  }
106
131
 
107
132
  [dir=rtl] .nut-elevator-list-fixed,
@@ -117,5 +142,5 @@
117
142
  [dir=rtl] .nut-elevator-bars,
118
143
  .nut-rtl .nut-elevator-bars {
119
144
  right: auto;
120
- left: var(--nutui-elevator-bars-right, 10px);
145
+ left: var(--nutui-elevator-bars-right, 16px);
121
146
  }