mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
perf: add transition-property (#1983)
This commit is contained in:
parent
eef1fc6678
commit
73374a8d81
@ -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%;
|
||||
|
@ -4,7 +4,7 @@
|
||||
&__title {
|
||||
.van-cell__right-icon {
|
||||
transform: rotate(90deg);
|
||||
transition: @collapse-item-transition-duration;
|
||||
transition: transform @collapse-item-transition-duration;
|
||||
}
|
||||
|
||||
&--expanded {
|
||||
|
@ -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('; ');
|
||||
|
@ -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%;
|
||||
|
@ -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: `
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user