@@ -17,7 +17,7 @@ By default the minimum value of the slider is `0`, the maximum value is `100`, a
17
17
in increments of ` 1 ` . These values can be changed by setting the ` min ` , ` max ` , and ` step ` attributes
18
18
respectively. The initial value is set to the minimum value unless otherwise specified.
19
19
20
- 默认情况下,滑竿 (slider)的最小值是 ` 0 ` ,最大值是 ` 100 ` ,滑块(thumb)移动时的增量是 ` 1 ` 。
20
+ 默认情况下,滑杆 (slider)的最小值是 ` 0 ` ,最大值是 ` 100 ` ,滑块(thumb)移动时的增量是 ` 1 ` 。
21
21
这些值可以通过设置 ` min ` 、` max ` 和 ` step ` 属性进行修改。除非另行指定,否则其初始值就等于最小值。
22
22
23
23
``` html
@@ -32,7 +32,7 @@ By default sliders are horizontal with the minimum value on the left and the max
32
32
right. The ` vertical ` attribute can be added to a slider to make it vertical with the minimum value
33
33
on bottom and the maximum value on top.
34
34
35
- 默认情况下,滑竿是水平放置的 ,其最小值在左侧,最大值在右侧。可以给滑竿添加 ` vertical ` 属性,来让它变成垂直的,其最小值在底部,而最大值在顶部。
35
+ 默认情况下,滑杆是水平放置的 ,其最小值在左侧,最大值在右侧。可以给滑杆添加 ` vertical ` 属性,来让它变成垂直的,其最小值在底部,而最大值在顶部。
36
36
37
37
``` html
38
38
<mat-slider vertical ></mat-slider >
@@ -44,7 +44,7 @@ on the left, while an inverted vertical slider will have the minimum value on to
44
44
value on bottom.
45
45
46
46
还可以指定 ` invert ` 属性,来翻转坐标轴(滑块会沿着它移动)。
47
- 翻转后的水平滑竿 ,其最小值在右侧,而最大值在左侧;翻转后的垂直滑竿 ,其最小值在上部,而最大值在底部。
47
+ 翻转后的水平滑杆 ,其最小值在右侧,而最大值在左侧;翻转后的垂直滑杆 ,其最小值在上部,而最大值在底部。
48
48
49
49
``` html
50
50
<mat-slider invert ></mat-slider >
@@ -57,13 +57,13 @@ value on bottom.
57
57
By default, the exact selected value of a slider is not visible to the user. However, this value can
58
58
be added to the thumb by adding the ` thumbLabel ` attribute.
59
59
60
- 默认情况下,滑竿所选的精确值不会显示给用户 。不过,可以通过 ` thumbLabel ` 属性来把这个值显示在滑块上。
60
+ 默认情况下,滑杆所选的精确值不会显示给用户 。不过,可以通过 ` thumbLabel ` 属性来把这个值显示在滑块上。
61
61
62
62
The [ Material Design spec] ( https://material.io/design/components/sliders.html#discrete-slider ) recommends using the
63
63
` thumbLabel ` attribute (along with ` tickInterval="1" ` ) only for sliders that are used to display a
64
64
discrete value (such as a 1-5 rating).
65
65
66
- [ Material Design 规范] ( https://material.io/design/components/sliders.html#discrete-slider ) 建议只为那些用来显示离散值(比如 1~ 5 的打分值)的滑竿使用 ` thumbLabel ` 属性(同时设置 ` tickInterval="1" ` )。
66
+ [ Material Design 规范] ( https://material.io/design/components/sliders.html#discrete-slider ) 建议只为那些用来显示离散值(比如 1~ 5 的打分值)的滑杆使用 ` thumbLabel ` 属性(同时设置 ` tickInterval="1" ` )。
67
67
68
68
``` html
69
69
<mat-slider thumbLabel tickInterval =" 1" ></mat-slider >
@@ -91,7 +91,7 @@ By default, sliders do not show tick marks along the thumb track. This can be en
91
91
of steps between ticks. For example a ` tickInterval ` of ` 3 ` with a ` step ` of ` 4 ` will draw
92
92
tick marks at every ` 3 ` steps, which is the same as every ` 12 ` values.
93
93
94
- 默认情况下,滑竿不会在滑块的导轨 (track)上显示刻度标记,不过可以使用 ` tickInterval ` 属性来启用它。` tickInterval ` 的值应该是一个表示刻度之间步长的数字。比如 ` tickInterval ` 为 ` 3 ` 而 ` step ` 为 ` 4 ` 时,将会每隔 ` 3 ` 步画出一个标记,每 ` 12 ` 个值重复一轮。
94
+ 默认情况下,滑杆不会在滑块的导轨 (track)上显示刻度标记,不过可以使用 ` tickInterval ` 属性来启用它。` tickInterval ` 的值应该是一个表示刻度之间步长的数字。比如 ` tickInterval ` 为 ` 3 ` 而 ` step ` 为 ` 4 ` 时,将会每隔 ` 3 ` 步画出一个标记,每 ` 12 ` 个值重复一轮。
95
95
96
96
``` html
97
97
<mat-slider step =" 4" tickInterval =" 3" ></mat-slider >
@@ -110,37 +110,37 @@ The slider will always show a tick at the beginning and end of the track. If the
110
110
doesn't add up perfectly the last interval will be shortened or lengthened so that the tick can be
111
111
shown at the end of the track.
112
112
113
- 滑竿始终会在导轨的起点和终点显示一个刻度 。如果剩下的控件不够添加了,那么最后一个间距可能被缩短或拉长,以便让刻度显示在导轨的末尾。
113
+ 滑杆始终会在导轨的起点和终点显示一个刻度 。如果剩下的控件不够添加了,那么最后一个间距可能被缩短或拉长,以便让刻度显示在导轨的末尾。
114
114
115
115
The [ Material Design spec] ( https://material.io/design/components/sliders.html#discrete-slider ) recommends using the
116
116
` tickInterval ` attribute (set to ` 1 ` along with the ` thumbLabel ` attribute) only for sliders that
117
117
are used to display a discrete value (such as a 1-5 rating).
118
118
119
- [ Material Design 规范] ( https://material.io/design/components/sliders.html#discrete-slider ) 建议只为那些用来显示离散值(比如 1~ 5 的打分值)的滑竿设置 ` tickInterval ` 属性(同时把 ` thumbLabel ` 属性设置为 ` 1 ` )。
119
+ [ Material Design 规范] ( https://material.io/design/components/sliders.html#discrete-slider ) 建议只为那些用来显示离散值(比如 1~ 5 的打分值)的滑杆设置 ` tickInterval ` 属性(同时把 ` thumbLabel ` 属性设置为 ` 1 ` )。
120
120
121
121
### Keyboard interaction
122
122
123
123
### 键盘交互
124
124
125
125
The slider has the following keyboard bindings:
126
126
127
- 滑竿具有下列键盘绑定 :
127
+ 滑杆具有下列键盘绑定 :
128
128
129
129
| Key | Action |
130
130
| -------------| ------------------------------------------------------------------------------------|
131
131
| 按键 | 操作 |
132
132
| Right arrow | Increment the slider value by one step (decrements in RTL). |
133
- | 右方向键 | 滑竿的值增加一步 (在 RTL 下则减小)。 |
133
+ | 右方向键 | 滑杆的值增加一步 (在 RTL 下则减小)。 |
134
134
| Up arrow | Increment the slider value by one step. |
135
- | 上方向键 | 滑竿的值增加一步 。 |
135
+ | 上方向键 | 滑杆的值增加一步 。 |
136
136
| Left arrow | Decrement the slider value by one step (increments in RTL). |
137
- | 左方向键 | 滑竿的值减小一步 (在 RTL 下则增加)。 |
137
+ | 左方向键 | 滑杆的值减小一步 (在 RTL 下则增加)。 |
138
138
| Down arrow | Decrement the slider value by one step. |
139
- | 下方向键 | 滑竿的值减小一步 。 |
139
+ | 下方向键 | 滑杆的值减小一步 。 |
140
140
| Page up | Increment the slider value by 10 steps. |
141
- | 上翻页 | 滑竿的值增加 10 步。 |
141
+ | 上翻页 | 滑杆的值增加 10 步。 |
142
142
| Page down | Decrement the slider value by 10 steps. |
143
- | 下翻页 | 滑竿的值减小 10 步。 |
143
+ | 下翻页 | 滑杆的值减小 10 步。 |
144
144
| End | Set the value to the maximum possible. |
145
145
| End | 设置为可能的最大值。 |
146
146
| Home | Set the value to the minimum possible. |
@@ -153,4 +153,4 @@ The slider has the following keyboard bindings:
153
153
Sliders without text or labels should be given a meaningful label via ` aria-label ` or
154
154
` aria-labelledby ` .
155
155
156
- 没有文本或标签的滑竿应该通过 ` aria-label ` 或 ` aria-labelledby ` 给出一个有意义的标签。
156
+ 没有文本或标签的滑杆应该通过 ` aria-label ` 或 ` aria-labelledby ` 给出一个有意义的标签。
0 commit comments