Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Steps style error when has more than 4 items #287

Merged
merged 40 commits into from Nov 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1e1dc19
[bugfix] CouponList always show empty info
chenjiahan Oct 25, 2017
578fbc0
[bugfix] add click feedback of buttons in components
chenjiahan Oct 25, 2017
31920d0
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Oct 25, 2017
c23bb77
[Doc] add custom theme document
chenjiahan Oct 26, 2017
9203fdc
[Doc] remove theme tips in quickstart
chenjiahan Oct 26, 2017
5c5ec5b
[new feature] Notice bar support more props
chenjiahan Oct 26, 2017
6d60049
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Oct 26, 2017
a8b1d82
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Oct 26, 2017
3ddb3e7
[bugfix] PullRefresh test cases
chenjiahan Oct 26, 2017
b0737c0
[bugfix] unused NoticeBar style
chenjiahan Oct 26, 2017
47852e4
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Oct 26, 2017
4fcb8b6
[bugfix] Swipe width calc error
chenjiahan Oct 26, 2017
40ef34f
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Oct 26, 2017
afae2d1
[Doc] english document of all action components
chenjiahan Oct 26, 2017
bc2c15a
[Doc] change document site path to /zanui/vant
chenjiahan Oct 27, 2017
c4dc09a
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Oct 27, 2017
ba62fe1
[Doc] fix
chenjiahan Oct 27, 2017
8b52deb
[bugfix] uploader style error
chenjiahan Oct 27, 2017
d9eb684
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Oct 27, 2017
6699bc5
[bugfix] tabs document demo
chenjiahan Oct 27, 2017
670700b
[new feature] Cell support vue-router target route
chenjiahan Oct 30, 2017
4bd5a10
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Oct 30, 2017
843c236
[bugfix] add cell test cases
chenjiahan Oct 30, 2017
9ed0d13
update yarn.lock
chenjiahan Oct 30, 2017
ce989d1
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Oct 30, 2017
bc818e0
[bugfix] Tabbar cann't display info when use icon slot
chenjiahan Oct 30, 2017
acdd78b
[Doc] update document title
chenjiahan Nov 1, 2017
ed43c0b
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Nov 1, 2017
3c76657
[bugfix] Dialog should reset button text when showed
chenjiahan Nov 2, 2017
245a3a8
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Nov 2, 2017
469392f
[new feature] CouponList add showCloseButton prop
chenjiahan Nov 2, 2017
c55d1ff
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Nov 3, 2017
7bb75e4
[new feature] Swipe add 'initialSwipe' prop
chenjiahan Nov 3, 2017
667b27a
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Nov 3, 2017
f954727
[bugfix] NoticeBar text disappeared when page back
chenjiahan Nov 3, 2017
abc5684
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Nov 7, 2017
2213418
[new feature] ImagePreview support startPosition
chenjiahan Nov 7, 2017
80fc5ea
fix: improve imagePreview test cases
chenjiahan Nov 7, 2017
dbe4d66
Merge remote-tracking branch 'main/dev' into dev
chenjiahan Nov 7, 2017
9da3475
[bugfix] Steps style error when has more than 4 items
chenjiahan Nov 7, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 1 addition & 11 deletions packages/steps/index.vue
@@ -1,5 +1,5 @@
<template>
<div class="van-steps" :class="stepsClass">
<div :class="['van-steps', `van-steps--${direction}`]">
<div class="van-steps__status" v-if="title || description">
<div class="van-steps__icon" v-if="icon || $slots.icon">
<slot name="icon">
Expand Down Expand Up @@ -56,16 +56,6 @@ export default {
return {
steps: []
};
},

computed: {
stepsClass() {
return [
`van-steps--${this.direction}`, {
[`van-steps--${this.steps.length}`]: this.direction === 'horizontal'
}
];
}
}
};
</script>
14 changes: 2 additions & 12 deletions packages/vant-css/src/steps.css
Expand Up @@ -9,6 +9,7 @@
padding: 0 10px;

.van-steps__items {
display: flex;
margin: 0 0 10px;
overflow: hidden;
position: relative;
Expand All @@ -24,18 +25,6 @@
padding: 0 0 0 35px;
}

&--4 {
.van-step {
width: 33.2%;
}
}

&--3 {
.van-step {
width: 50%;
}
}

&__icon {
float: left;
margin-right: 10px;
Expand Down Expand Up @@ -72,6 +61,7 @@
}

.van-step {
flex: 1;
font-size: 14px;
position: relative;
color: $gray-dark;
Expand Down