@@ -38,6 +40,12 @@ export default {
return result;
}
+ },
+
+ data() {
+ return {
+ steps: []
+ };
}
};
diff --git a/packages/zanui-css/src/steps.css b/packages/zanui-css/src/steps.css
index 03b764afa..c113f2977 100644
--- a/packages/zanui-css/src/steps.css
+++ b/packages/zanui-css/src/steps.css
@@ -1,25 +1,28 @@
@import "./common/var.css";
+@import "./mixins/ellipsis.css";
@component-namespace zan {
@b steps {
- padding: 15px 0;
+ overflow: hidden;
+ padding: 0 10px;
- .zan-icon {
+ @m 4 {
+ .zan-step {
+ width: 33.2%;
+ }
+ }
+
+ @e icon {
font-size: 40px;
line-height: 1;
float: left;
- }
-
- @e status {
- padding: 0 10px;
+ margin-right: 10px;
}
@e message {
display: table;
height: 40px;
- padding-right: 50px;
- width: 100%;
- box-sizing: border-box;
+ margin: 15px 0;
.zan-steps__message-wrapper {
display: table-cell;
@@ -34,7 +37,107 @@
@e desc {
font-size: 12px;
+ line-height: 1.5;
color: $c-gray-dark;
+ max-height: 18px;
+ @mixin multi-ellipsis 1;
+ }
+
+ @e items {
+ margin: 0 0 10px;
+ overflow: hidden;
+ padding-bottom: 20px;
+ }
+ }
+
+ @b step {
+ font-size: 14px;
+ float: left;
+ position: relative;
+ color: $c-gray-dark;
+
+ @m finish {
+ color: $c-black;
+
+ .zan-step__circle,
+ .zan-step__line {
+ background-color: $c-green;
+ }
+ }
+
+ @m process {
+ color: $c-black;
+
+ .zan-step__circle-container {
+ top: 24px;
+ }
+
+ .zan-icon {
+ font-size: 12px;
+ color: $c-green;
+ line-height: 1;
+ display: block;
+ }
+ }
+
+ &:first-child {
+ .zan-step__title {
+ transform: none;
+ margin-left: 0;
+ }
+ }
+
+ &:last-child {
+ position: absolute;
+ right: 10px;
+ width: auto;
+
+ .zan-step__title {
+ transform: none;
+ margin-left: 0;
+ }
+
+ .zan-step__circle-container {
+ left: auto;
+ right: -6px;
+ }
+
+ .zan-step__line {
+ width: 0;
+ }
+ }
+
+ .zan-step__circle-container {
+ position: absolute;
+ top: 28px;
+ left: -8px;
+ padding: 0 8px;
+ background-color: #fff;
+ z-index: 1;
+ }
+
+ @e circle {
+ display: block;
+ width: 5px;
+ height: 5px;
+ background-color: #888;
+ border-radius: 50%;
+ }
+
+ @e title {
+ font-size: 12px;
+ transform: translate3d(-50%, 0, 0);
+ display: inline-block;
+ margin-left: 3px;
+ }
+
+ @e line {
+ position: absolute;
+ left: 0px;
+ top: 30px;
+ width: 100%;
+ height: 1px;
+ background-color: $c-gray-light;
}
}
}