Skip to content

Commit

Permalink
2.0 功能优化
Browse files Browse the repository at this point in the history
  • Loading branch information
fxss5201 committed Dec 13, 2018
1 parent aa402d4 commit 78c81ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions 2.0/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@
titleIndex = options.dataOrder.indexOf("title"),
descIndex = options.dataOrder.indexOf("description");
if(options.direction.toLowerCase() == "vertical" && options.dataWidth.length > 0){
lineStyle = "flex: " + options.dataWidth[lineIndex] + ";";
titleStyle = "flex: " + options.dataWidth[titleIndex] + ";";
descStyle = "flex: " + options.dataWidth[descIndex] + ";";
lineStyle = "flex: " + (options.dataWidth[lineIndex] ? options.dataWidth[lineIndex] : "none") + ";";
titleStyle = "flex: " + (options.dataWidth[titleIndex] ? options.dataWidth[titleIndex] : "none") + ";";
descStyle = "flex: " + (options.dataWidth[descIndex] ? options.dataWidth[descIndex] : "none") + ";";
}

var stepLineBox = '<div class="step-line-box" style="' + lineStyle + 'order:' + lineIndex + '"><div class="step-line {{finishLineClass}}"></div><div class="step-icon ' + stepIconClass + '"><div class="' + stepIconInnerClass + '">' + stepIconInnerText + '</div></div></div>';
Expand Down
2 changes: 1 addition & 1 deletion 2.0/steps.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions 2.0/更新日志.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ var steps10 = steps({
});
```

2. `dataWidth`未设置时,默认都为`none`,也就是`(0 0 auto)`

## 2018-11-07 ##

1. 暂时移除使用`classList`来为`.step`的父元素添加自定义的class。
Expand Down

0 comments on commit 78c81ba

Please sign in to comment.