fix bugs and add new features (#25)

* fix bugs and add new features

* add unit test

* fix tab/tag/datetime-picker bugs
This commit is contained in:
TimeTraveler
2017-05-03 10:11:31 +08:00
committed by 张敏
parent 58bd17f142
commit 239d2e1e53
31 changed files with 134 additions and 27 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
<template>
<div class="van-steps" :class="`van-steps--${steps.length}`">
<div class="van-steps__status" v-if="title || description">
<div class="van-steps__icon" v-if="icon || $slot.icon">
<div class="van-steps__icon" v-if="icon || $slots.icon">
<slot name="icon">
<van-icon :name="icon" :class="iconClass"></van-icon>
</slot>
+7 -1
View File
@@ -35,6 +35,11 @@
type: {
type: String,
default: 'line'
},
// 切换tab的动画时间
duration: {
type: Number,
default: 0.3
}
},
@@ -66,7 +71,8 @@
return {
width: offsetWidth,
transform: `translate3d(${offsetLeft}, 0px, 0px)`
transform: `translate3d(${offsetLeft}, 0px, 0px)`,
transitionDuration: `${this.duration}s`
};
}
},
+8 -1
View File
@@ -5,10 +5,17 @@
</template>
<script>
const ALLOW_TYPE = ['danger', 'success', 'primary'];
export default {
name: 'van-tag',
props: {
type: String,
type: {
type: String,
validator: function (val) {
return ~ALLOW_TYPE.indexOf(val);
}
},
mark: Boolean,
plain: Boolean
}
-1
View File
@@ -86,7 +86,6 @@
font-size: 14px;
line-height: 44px;
box-sizing: border-box;
transition: color .3s cubic-bezier(.645, .045, .355, 1);
cursor: pointer;
text-align: center;
float: left;