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
23aa2b61
Commit
23aa2b61
authored
Nov 13, 2016
by
qingwei.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Step: add align-center, fixed #994
parent
58dc7e14
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
examples/docs/en-US/steps.md
examples/docs/en-US/steps.md
+2
-1
examples/docs/zh-CN/steps.md
examples/docs/zh-CN/steps.md
+1
-0
packages/steps/src/step.vue
packages/steps/src/step.vue
+3
-1
packages/steps/src/steps.vue
packages/steps/src/steps.vue
+1
-0
No files found.
examples/docs/en-US/steps.md
View file @
23aa2b61
...
...
@@ -120,6 +120,7 @@ Vertical step bars.
| active | Sets the current activation step | number | — | 0 |
| process-status | Sets the status of current step | string | wait/process/finish/error/success | process |
| finish-status | Sets the status of end step | string | wait/process/finish/error/success | finish |
| align-center | align center | boolean | false, true | false |
### Step Attributes
| Attribute | Description | Type | Options | Default |
...
...
examples/docs/zh-CN/steps.md
View file @
23aa2b61
...
...
@@ -113,6 +113,7 @@
| active | 设置当前激活步骤 | number | — | 0 |
| process-status | 设置当前步骤的状态 | string | wait/process/finish/error/success | process |
| finish-status | 设置结束步骤的状态 | string | wait/process/finish/error/success | finish |
| align-center | 标题描述居中对齐 | boolean | false, true | false |
### Step Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
...
...
packages/steps/src/step.vue
View file @
23aa2b61
...
...
@@ -114,7 +114,9 @@ export default {
if
(
parent
.
direction
===
'
horizontal
'
)
{
this
.
style
=
{
width
:
space
};
// this.mainOffset = -this.$refs.title.getBoundingClientRect().width / 2 + 16 + 'px';
if
(
parent
.
alignCenter
)
{
this
.
mainOffset
=
-
this
.
$refs
.
title
.
getBoundingClientRect
().
width
/
2
+
16
+
'
px
'
;
}
}
else
{
if
(
parent
.
steps
[
parent
.
steps
.
length
-
1
]
!==
this
)
{
this
.
style
=
{
height
:
space
};
...
...
packages/steps/src/steps.vue
View file @
23aa2b61
...
...
@@ -13,6 +13,7 @@ export default {
type
:
String
,
default
:
'
horizontal
'
},
alignCenter
:
Boolean
,
finishStatus
:
{
type
:
String
,
default
:
'
finish
'
...
...
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