更新记录
1.0.1(2022-02-05) 下载此版本
加上了跳转链接,以及可以配置下拉刷新和上拉到底加载更多
1.0.0(2022-02-04) 下载此版本
淘客商品列表vue3(图文): 支持键值映射:就是你本来接口返回的图片键值是”bigImage“,但本组件通过配置依然可以直接取到值,不需要自己再手动将”bigImage“改成”image“
平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
- | √ | - | - | - | - | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
- | - | - | - | - | - | - | - | - | - | - |
alone-goods
goodsList:数据列表 reflectKey:键值映射。 clickUrl:点击的时候跳转的链接,会自动拼接上id参数
reflectKey:{ image:'mainPic', price:'actualPrice', delPrice:'originalPrice', coupon:'couponPrice', saleNum:'monthSales', platform:'platform' },
下面是添加下拉刷新和加载更多: getGoodsList()是请求接口数据的方法
//下拉刷新 onPullDownRefresh() { this.getGoodsList(1) setTimeout(() => { uni.stopPullDownRefresh() }, 3000) },
//滑到底加载更多,需pages.json配置onReachBottomDistance onReachBottom() { this.getGoodsList() },