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:
@@ -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>
|
||||
|
||||
@@ -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`
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user