Skip to content

解决数字匀速递增的问题 #40

Open
@wincorry

Description

@wincorry

<countTo class="count_to" :startVal='startVal-50' :endVal='endVal' :duration='100000' :easingFn="easingFn"></countTo>

methods: {

easingFn(t, b, c, d){

let y = c*t/d+b; //此方法为匀速

return y;

//return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b; //原方案为先快后慢

}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions