ZIP支付宝小程序商品加入购物车动画 2020年的代码不知道还能不能用 1.82KB

men_gqi

资源文件列表:

flyCart.zip 大约有5个文件
  1. flyCart/
  2. flyCart/flyCart.json 87B
  3. flyCart/flyCart.js 1.44KB
  4. flyCart/flyCart.acss
  5. flyCart/flyCart.axml 536B

资源介绍:

支付宝小程序商品加入购物车动画 2020年的代码不知道还能不能用
Component({ mixins: [], data: { position: [] }, props: {//接收父组件传的值 tran: {//1小球纵向移动距离//0小球横向移动距离//2//购物车宽度 type: Array, value: [] }, show: { type: Boolean, value: true }, position: {//小球初始位置,也就是点击位置0为x,1为y type: Array, value: [] }, }, didMount() { this.animation = my.createAnimation({ transformOrigin: "left bottom 0", duration: 800,//动画持续时间 timeFunction: "ease-in",//定义动画效果 }) this.animationBox = my.createAnimation({ transformOrigin: "left bottom 0", duration: 800,//动画持续时间 timeFunction: "ease",//定义动画效果 delay: 1, }) }, didUpdate() { }, didUnmount() { }, methods: { init() { let that = this let position = [this.props.position[0], this.props.position[1]] this.setData({ position, }, () => { //动画开始 setTimeout(function () { that.animation.translate(0, Math.abs(that.props.tran[1])).step()//小球垂直变速运动 that.setData({ animation: that.animation.export() }) }, 20) this.animationBox.translate(-Math.abs(this.props.tran[0] - this.props.tran[2] / 2), 0).step()//盒子匀速平移运动 this.setData({ animationBox: this.animationBox.export() }) }) } }, });
100+评论
captcha
    类型标题大小时间
    ZIP20240807000000661587.zip149.22KB8月前
    ZIPboot loader升级程序9.74MB8月前
    ZIP《Delphi7 高效数据库程序设计》源码含数据库44.82MB8月前
    ZIPpassword-brute-dictionary-master.zip1.76MB8月前
    ZIP仿YouTube版PHP视频上传分享程序.zip98.55MB8月前
    ZIP汉字与十六进制互转,输入1汉字转十六进制,输入2十六进制转汉字47.48KB8月前
    ZIP智云CMS影音程序PHP源码V3.0.zip3.05MB8月前
    ZIPVisdom静态资源文件,用来解决启动visdom时卡在下载阶段1.3MB8月前