diff --git a/examples/pages/steps/index.wxml b/examples/pages/steps/index.wxml
index d565bd0..fb15b02 100644
--- a/examples/pages/steps/index.wxml
+++ b/examples/pages/steps/index.wxml
@@ -111,4 +111,60 @@
+
+ 横向反方向
+
+
+
+ 已完成
+
+
+ 这里是该步骤的描述信息
+
+
+
+
+ 进行中
+
+
+ 这里是该步骤的描述信息
+
+
+
+
+ 错误
+
+
+ 这里是该步骤的描述信息
+
+
+
+
+ 垂直反方向
+
+
+
+ 已完成
+
+
+ 这里是该步骤的描述信息
+
+
+
+
+ 进行中
+
+
+ 这里是该步骤的描述信息
+
+
+
+
+ 错误
+
+
+ 这里是该步骤的描述信息
+
+
+
\ No newline at end of file
diff --git a/src/step/index.js b/src/step/index.js
index 06a81a2..9e6b5e4 100644
--- a/src/step/index.js
+++ b/src/step/index.js
@@ -44,7 +44,8 @@ Component({
len : options.len,
index : options.index,
current : options.current,
- direction : options.direction
+ direction : options.direction,
+ reverse: options.reverse
})
}
}
diff --git a/src/step/index.wxml b/src/step/index.wxml
index 63549dc..419662a 100644
--- a/src/step/index.wxml
+++ b/src/step/index.wxml
@@ -1,10 +1,10 @@
-
+
{{ index+1 }}
-
+
@@ -44,8 +44,8 @@ module.exports = {
}
return class;
},
- getItemStyle : function(len,direction){
- if( direction === 'horizontal' ){
+ getItemStyle : function(len,direction,reverse){
+ if( direction === 'horizontal' && !reverse ){
return 'width :'+100/len + '%';
}else{
return 'width : 100%;';
diff --git a/src/steps/index.js b/src/steps/index.js
index 06bed88..5cab7ea 100644
--- a/src/steps/index.js
+++ b/src/steps/index.js
@@ -15,7 +15,11 @@ Component({
type : String,
//value has horizontal or vertical
value : 'horizontal'
- }
+ },
+ reverse : {
+ type : Boolean,
+ value : false
+ }
},
relations : {
'../step/index' : {
@@ -41,7 +45,8 @@ Component({
len : len,
index : index,
current : this.data.current,
- direction : this.data.direction
+ direction : this.data.direction,
+ reverse : this.data.reverse
});
});
}
diff --git a/src/steps/index.less b/src/steps/index.less
index 41585e8..8820f1e 100644
--- a/src/steps/index.less
+++ b/src/steps/index.less
@@ -2,4 +2,16 @@
@import "../styles/_mixins.less";
.i-steps{
width: 100%;
+}
+
+.i-steps-horizontal-reverse{
+ width: 100%;
+ display: flex;
+ flex-direction: row-reverse;
+}
+
+.i-steps-vertical-reverse{
+ width: 100%;
+ display: flex;
+ flex-direction: column-reverse;
}
\ No newline at end of file
diff --git a/src/steps/index.wxml b/src/steps/index.wxml
index d9c7942..039c2e6 100644
--- a/src/steps/index.wxml
+++ b/src/steps/index.wxml
@@ -1,3 +1,3 @@
-
+