perf: add transition-property (#1983)

This commit is contained in:
neverland 2019-09-07 19:28:51 +08:00 committed by GitHub
parent eef1fc6678
commit 73374a8d81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 6 deletions

View File

@ -23,7 +23,8 @@
font-size: 14px;
text-align: center;
border: 1px solid @checkbox-border-color;
transition: @checkbox-transition-duration;
transition-duration: @checkbox-transition-duration;
transition-property: color, border-color, background-color;
&--round {
border-radius: 100%;

View File

@ -4,7 +4,7 @@
&__title {
.van-cell__right-icon {
transform: rotate(90deg);
transition: @collapse-item-transition-duration;
transition: transform @collapse-item-transition-duration;
}
&--expanded {

View File

@ -55,7 +55,7 @@ VantComponent({
wrapperStyle() {
const { data } = this;
return [
`transition: ${data.duration}ms`,
`transition: transform ${data.duration}ms`,
`transform: translate3d(0, ${data.offset + data.baseOffset}px, 0)`,
`line-height: ${data.itemHeight}px`
].join('; ');

View File

@ -23,7 +23,8 @@
font-size: 14px;
text-align: center;
border: 1px solid @radio-border-color;
transition: @radio-transition-duration;
transition-duration: @radio-transition-duration;
transition-property: color, border-color, background-color;
&--round {
border-radius: 100%;

View File

@ -45,7 +45,7 @@ VantComponent({
const transform = `translate3d(${offset}px, 0, 0)`;
const transition = this.draging
? 'none'
: '.6s cubic-bezier(0.18, 0.89, 0.32, 1)';
: 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';
this.set({
wrapperStyle: `

View File

@ -21,7 +21,7 @@
background-color: @switch-node-background-color;
border-radius: 100%;
box-shadow: @switch-node-box-shadow;
transition: @switch-transition-duration;
transition: transform @switch-transition-duration;
}
&__loading {