03使用Want Weapp进行路由跳转
2024-09-07 09:59:17
因为这里使用的是第三方库,所以你要引入哈。
在app.json中引入哈。
"usingComponents": {
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index"
},
虽然官网值这样说的,但是这样是要不得的,这是一个坑
引入
在app.json或index.json中引入组件,详细介绍见快速上手
"usingComponents": {
"van-cell": "path/to/@vant/weapp/dist/cell/index",
"van-cell-group": "path/to/@vant/weapp/dist/cell-group/index"
}
这样要不得哈 要将 path/to/去除 还要将 /dist去除
***这里循环的时候,不能直接在vant-cell中循环,因为这是自定义的。
所以外面在加一层view标签哈
border="{{borderfalse}}" 值为false不要下边框
custom-class="iconfont {{item.iocn}}" 自定义class。用来显示阿里字体图标库
wxml
<view wx:for="{{gotoList}}">
<van-cell custom-class="iconfont {{item.iocn}}" is-link border="{{borderfalse}}" title="{{item.cont}}"
link-type="navigateTo" url="/pages/othertest/othertest" />
</view>
js
borderfalse: false, //不要边框
// list中的跳转
gotoList: [
{
url: "/pages/othertest/othertest",
cont: "个人主页",
iocn: "icon-system"
},
{
url: "/pages/othertest/othertest",
cont: "牛人问答",
iocn: "icon-service"
},
]
最新文章
- [Unity3D]粒子系统学习笔记
- JAVA字符串格式化-String.format()的使用(转)
- 用computed返回this.$store.state.count,store更改了,但是computed没有调用
- 两台装有Ubuntu系统的服务器搭建VPN(一台为本地服务器,另一台为云服务器)
- MVC4在IIS6上部署遇到的问题
- 寒假222_codeforces 290 div 2 D
- C#操作XML的完整例子——XmlDocument篇(转载,仅做学习之用)
- webstorm 卡死解决方法
- 编译错误:expected an indented block
- 集合之ArrayList的源码分析
- 搭建rsync服务并同步重要数据
- @RequestBody, @ResponseBody 注解详解(转)
- Python shelve
- CTF密码学之凯撒加密
- 使用SDNN (space displacement neural network)进行多字体手写识别
- Redis学习基础一
- openstack 爬坑日记
- Python 入门学习(贰)文件/文件夹正则表达式批量重命名工具
- 【BZOJ1706】[usaco2007 Nov]relays 奶牛接力跑 矩阵乘法
- JS格式化数字(每三位加逗号)