[improvement] Tab: optimize transition (#2151)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
.van-tab {
|
||||
flex: 1;
|
||||
cursor: pointer;
|
||||
min-width: 0; // hack for flex ellipsis
|
||||
padding: 0 5px;
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
@@ -11,7 +12,7 @@
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
background-color: @white;
|
||||
min-width: 0; /* hack for flex ellipsis */
|
||||
transition: color .3s;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
|
||||
@@ -72,6 +72,7 @@ export default create({
|
||||
props: {
|
||||
color: String,
|
||||
sticky: Boolean,
|
||||
animated: Boolean,
|
||||
lineWidth: Number,
|
||||
swipeable: Boolean,
|
||||
active: {
|
||||
@@ -84,7 +85,7 @@ export default create({
|
||||
},
|
||||
duration: {
|
||||
type: Number,
|
||||
default: 0.4
|
||||
default: 0.3
|
||||
},
|
||||
swipeThreshold: {
|
||||
type: Number,
|
||||
@@ -93,8 +94,7 @@ export default create({
|
||||
offsetTop: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
animated: Boolean
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
Reference in New Issue
Block a user