Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
72b1bc3c
Commit
72b1bc3c
authored
May 02, 2017
by
杨奕
Committed by
baiyaaaaa
May 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Carousel: update doc and test for indicator labels (#4551)
parent
54e20478
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
examples/docs/en-US/carousel.md
examples/docs/en-US/carousel.md
+1
-0
examples/docs/zh-CN/carousel.md
examples/docs/zh-CN/carousel.md
+1
-0
test/unit/specs/carousel.spec.js
test/unit/specs/carousel.spec.js
+16
-0
No files found.
examples/docs/en-US/carousel.md
View file @
72b1bc3c
...
...
@@ -187,3 +187,4 @@ When a page is wide enough but has limited height, you can activate card mode fo
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| name | name of the item, can be used in
`setActiveItem`
| string | — | — |
| label | text content for the corresponding indicator | string | — | — |
examples/docs/zh-CN/carousel.md
View file @
72b1bc3c
...
...
@@ -236,3 +236,4 @@
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| name | 幻灯片的名字,可用作
`setActiveItem`
的参数 | string | — | — |
| label | 该幻灯片所对应指示器的文本 | string | — | — |
test/unit/specs/carousel.spec.js
View file @
72b1bc3c
...
...
@@ -113,6 +113,22 @@ describe('Carousel', () => {
},
60
);
});
it
(
'
label
'
,
done
=>
{
vm
=
createVue
({
template
:
`
<div>
<el-carousel>
<el-carousel-item v-for="item in 3" :key="item" :label="item"></el-carousel-item>
</el-carousel>
</div>
`
});
setTimeout
(
_
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.el-carousel__button
'
).
innerText
).
to
.
equal
(
'
1
'
);
done
();
},
10
);
});
describe
(
'
manual control
'
,
()
=>
{
it
(
'
hover
'
,
done
=>
{
vm
=
createVue
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment