当前位置:网站首页>非scroll-view的纵向滑动
非scroll-view的纵向滑动
2022-06-09 15:11:00 【weixin_44387746】
<movable-area style="height:700rpx;width: 714rpx;overflow: hidden;">
<movable-view inertia="true" direction="vertical" style="display: flex;justify-content: space-between;flex-wrap: wrap;width:714rpx;height:{
{377*length}}rpx; ">
<view a:for="{
{bannerArray}}" style="margin-bottom:20rpx;width:350rpx;height:357rpx;background-image:url({
{item.image}});background-size:100% 100%;">
</view>
</movable-view>
</movable-area>
import {
enhanceComponent } from 'tb-shop-enhance';
Component(enhanceComponent({
data: {
length: 0,
flag: true,
current: -1
},
onInit() {
// mock数据需要修改client文件夹中的page文件
// 正常运行过程中模块总是默认传入data参数
},
didMount() {
// 加载成功后可以异步获取数据更新数据展示,例如请求接口等操作
const {
gdc = {
}, mds = {
}, modUtils } = this.props.data;
this.setData({
bannerArray: mds.moduleData.imageList,
})
if (this.data.bannerArray.length % 2 == 0) {
this.setData({
length: this.data.bannerArray.length / 2
})
} else {
this.setData({
length: Math.ceil(this.data.bannerArray.length / 2)
})
}
},
methods: {
open(e) {
console.log(e.currentTarget.dataset.index)
this.setData({
flag: !this.data.flag,
current: e.currentTarget.dataset.index
})
}
}
}));
边栏推荐
- Triangular constant strain element (CST) derived from area coordinates
- 王兴张勇徐雷,谁能问鼎本地电商?
- JS事件流、事件冒泡、阻止冒泡、事件捕获(一看就懂)
- 被大厂认可的测试报告怎么写?拥有这30套模板的我彻底起飞
- [paper] cascade rpn: delving into high quality region proposal network with adaptive revolution
- After 4 years of experience, I have interviewed 20K test posts. I can't even master basic skills. It's better to recruit fresh students
- YII2框架手动安装Redis扩展的过程
- AE script - grid reference line golden section line generation tool guidesup! 2.2 active version
- JS实现JSON数组合并和去重
- Geoffrey Hinton's latest interview: within five years, we will crack the brain's operating mechanism, but not through back propagation
猜你喜欢

Design of cache address mapping and transformation and associated directory table in cache memory

InfoQ geek media's 15th anniversary solicitation of papers | design practice of micro service architecture in the cloud native Era

Jupyter lab learning notes

陕西西安等保测评单位有哪些?在哪里可以查到?

详解Seaborn,看这一篇就够了

In June, 2022, China Database ranking: tidb made a comeback to win the crown, and Dameng was dormant and won the flowers in May

分布式数据对象:超级终端的'全局变量'

ARM64 上的性能怪兽:API 网关 Apache APISIX 在 AWS Graviton3 上的安装和性能测试

自如涨价,会逼退年轻人吗?

文化和自然遗产日,任务空投来了
随机推荐
Linux 运行升讯威在线客服系统:同时支持 SQL Server 和 MySQL 的实现方法
华为十大发明公布:高效加法网络、多目标博弈智能驾驶获奖
ZeroSSL 支持给 IP 地址申请 SSL 证书了,但有瑕疵!
MySQL数据库用户权限管理
数据库中错误1062,报错
[云原生]Kubernetes可视化界面WEBUI Kubernetes Dashboard
BAT和FAANG的时代翻篇儿了,谁来接棒?
小程序中实现视图懒加载
View lazy loading in applet
全球骨干网中断 4 小时:谷歌云、AWS、Azure 等均受到影响
技术干货 | Linkis实践:新引擎实现流程解析
利用Redis进行数据缓存的项目实践
微信小程序搜索框的代码写法
Geoffrey Hinton's latest interview: within five years, we will crack the brain's operating mechanism, but not through back propagation
【论文】Cascade R-CNN: Delving into High Quality Object Detection
mysql 8.0.29 winx64.zip安装配置方法图文教程
细说腾讯如何做到直播延时降低90%以上方案
Why can't Google search page infinite?
Taoist friends! What is the expiration policy of redis?
信息学奥赛一本通 1260 【例9.4】拦截导弹(Noip1999) | 洛谷 P1020 [NOIP1999 普及组] 导弹拦截