当前位置:网站首页>swiper分类菜单双层效果demo(整理)
swiper分类菜单双层效果demo(整理)
2022-08-03 07:49:00 【我是开心呀】
效果图:
<template>
<view class="second-module-allicon">
<swiper class="nav-bar" indicator-dots>
<swiper-item class="nav-bar-wrap" v-for="(item,index) in list" :key="index">
<!-- 金刚区内容 -->
<view class="nav-bar-item" v-for="(item2,index2) in item.list2" :key="index2">
<image :src="item2.src" />
<text>{
{
item2.name}}</text>
</view>
</swiper-item>
</swiper>
</view>
</template>
<script>
export default {
data() {
return {
list:[
{
list2:[{
src:'/static/logo.png',
name:'酒店/名宿'
},{
src:'/static/logo.png',
name:'休闲/玩乐'
},{
src:'/static/logo.png',
name:'烧电影/演出'
},{
src:'/static/logo.png',
name:'美食'
},{
src:'/static/logo.png',
name:'饮品/小吃'
},{
src:'/static/logo.png',
name:'水果/果切'
},{
src:'/static/logo.png',
name:'会员专享'
},{
src:'/static/logo.png',
name:'新手指南'
},{
src:'/static/logo.png',
name:'商家入驻'
},{
src:'/static/logo.png',
name:'旅游'
}]
},{
list2:[{
src:'/static/logo.png',
name:'电影'
},{
src:'/static/logo.png',
name:'医疗'
},{
src:'/static/logo.png',
name:'丽人/美发'
},{
src:'/static/logo.png',
name:'宠物'
},{
src:'/static/logo.png',
name:'KTV'
},{
src:'/static/logo.png',
name:'按摩/足疗'
},{
src:'/static/logo.png',
name:'母婴服务'
},{
src:'/static/logo.png',
name:'核酸检测'
},{
src:'/static/logo.png',
name:'养车/用车'
},{
src:'/static/logo.png',
name:'核酸检测'
},]
}
]
}
},
methods: {
},
}
</script>
<style>
page{
background: #f5f5f5;}
.nav-bar{
height: 100%;
}
/* 背景模块 */
.second-module-allicon{
background: white;
border-radius:8px;
position: relative;
height: 360rpx;
overflow : hidden;
}
scroll-view {
white-space: nowrap;
}
.nav-bar-wrap {
display: flex;
flex-flow: column wrap; /* 金刚区排序方式*/
height: 330rpx;
}
/* 图标区域 */
.nav-bar-item {
width: 152rpx;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 20rpx;
}
/* 图片 */
.nav-bar-item image {
display: block;
height: 88rpx;
width: 88rpx;
margin: 0;
border-radius: 24rpx;
}
/* 文字 */
.nav-bar-item text {
margin-top: 8rpx;
line-height: 34rpx;
color:rgba(51,51,51,1);
font-size: 24rpx;
}
/* 默认指示点的样式 */
.nav-bar .wx-swiper-dot {
width: 15rpx;
height: 15rpx;
background: #eee;
border-radius: 15rpx;
margin-top: 30rpx;
}
/* 选中指示点的样式 */
.nav-bar .wx-swiper-dot.wx-swiper-dot-active {
width: 30rpx;
height: 15rpx;
background: #FED005;
border-radius: 15rpx;
margin-top: 30rpx;
}
</style>
原文更详细链接:https://blog.csdn.net/qq_59795720/article/details/125762512?spm=1001.2014.3001.5502
边栏推荐
猜你喜欢

Postman will return to results generated CSV file to the local interface

DSP Trick:向量长度估算

sqlite date field plus one day

使用pipreqs导出项目所需的requirements.txt(而非整个环境)

训练正常&异常的GAN损失函数loss变化应该是怎么样的

Fortify白盒神器20.1.1下载及安装(非百度网盘)

- display image API OpenCV 】 【 imshow () to a depth (data type) at different image processing methods

解决移动端有纵向滚动条但是不能滚动的问题

《21天精通TypeScript-5》类型注解与原始类型

Roson的Qt之旅#104 QML Image控件
随机推荐
图解Kernel Device Tree(设备树)的使用
解决GANs训练中模式崩塌/训练崩溃的十五个方法
DSP-ADAU1452输出通道配置
Detailed explanation of cause and effect diagram of test case design method
【Kaggle实战】泰坦尼克号生存人数预测(从零到提交到Kaggle再到模型的保存与恢复)
ArcEngine(五)用ICommand接口实现放大缩小
ArcEngine(二)加载地图文档
23届微软秋招内推
ArcEngine (3) zoom in and zoom out through the MapControl control to achieve full-image roaming
《21天精通TypeScript-5》类型注解与原始类型
LiveData 记录下 +
跨域嵌套传递信息(iframe)
Nanny level explains Transformer
分治法求解中位数
ArcEngine (six) use the tool tool to realize the zoom in, zoom out and translation of the pull box
tolower函数
力扣(LeetCode)214. 打家劫舍 II(2022.08.02)
Oracle Rac Cluster File Directory Migration
Roson的Qt之旅#105 QML Image引用大尺寸图片
《剑指Offer》刷题之打印从1到最大的n位数