更新记录
1.0.1(2022-03-08)
1.购物车动画支持多次点击
2.项目示例更新
1.0.0(2022-01-11)
首次发布,多多支持
平台兼容性
Vue2 | Vue3 |
---|---|
√ | × |
App | 快应用 | 微信小程序 | 支付宝小程序 | 百度小程序 | 字节小程序 | QQ小程序 |
---|---|---|---|---|---|---|
app-vue | √ | √ | √ | √ | √ | √ |
钉钉小程序 | 快手小程序 | 飞书小程序 | 京东小程序 |
---|---|---|---|
× | × | × | × |
H5-Safari | Android Browser | 微信浏览器(Android) | QQ浏览器(Android) | Chrome | IE | Edge | Firefox | PC-Safari |
---|---|---|---|---|---|---|---|---|
√ | √ | √ | √ | √ | √ | √ | √ | √ |
加入购物车抛物线动画
加入购物车抛物线动画,左右抛物线适配动画,可自定义设置掉落点坐标,曲线流畅,使用简单,适合多平台
引入组件
import cartAnimation from '@/components/module/f-cartAnimation/f-cartAnimation'
点击事件传参$event
<view class="btn" @click="addCart($event)">加入购物车</view>
调用组件
<cart-animation ref="cartAnimation"></cart-animation>
自定义掉落点坐标,需data中设置坐标参数
busPos:{
x:uni.getSystemInfoSync().windowWidth - 190,
y:uni.getSystemInfoSync().windowHeight + 100
}
默认抛物线事件
addCart(event){
this.$refs.cartAnimation.touchOnGoods(event);
}
自定义掉落点抛物线事件
onCustomPlay(event){
this.$refs.cartAnimation.touchOnGoods(event,this.busPos);
}
有不懂的请下载示例,查看pagesDome/cartAnimation/cartAnimation
小程序预览
欢迎加入wx群聊,一起交流技术
微信交流群(加我好友备注"进群") |
---|
微信号:wbt10302015 |