当前位置:网站首页>Uniapp uni list item @click, uniapp uni list item jump with parameters
Uniapp uni list item @click, uniapp uni list item jump with parameters
2022-07-02 11:57:00 【Code s Beethoven's note】
<uni-list-item @click="goDetailsArena(item)" >
goDetailsArena(item) {
console.log(item)
// console.log(item);
let jsonObj = JSON.stringify(item.venueResult)
uni.navigateTo({
url: './arenaDetail/arenaDetail?item=' + jsonObj
})
},
Click no response , Need to add link
<uni-list-item @click="goDetailsArena(item)" link >
Click the jump ,uni.navigateto Method does not execute . Need to add :to=
<uni-list-item direction="column" v-for="(item,index) in venueCollects" :to="`../../index/arenaDetail/arenaDetail?item=`+indext" @click="goDetailsArena(item)"
>
If jump to pass parameters Use JSON.stringify(item.venueResult) code . Then on the second page onload Methods use JSON.parse decode .
onLoad(e) {
this.ChangGuan = JSON.parse(e.item)
console.log("changguan:" + this.ChangGuan)
},
<uni-list-item direction="column" v-for="(item,index) in venueCollects" :to="`../../index/arenaDetail/arenaDetail?item=`+JSON.stringify(item.venueResult)" @click="goDetailsArena(item)"
>
official :
Component name :uni-list
Code block :
uList
、uListItem
Associated components :uni-list-item
、uni-badge
、uni-icons
、uni-list-chat
Click to download & install (opens new window)
List List components , Contains basic list styles 、 Scalable slot mechanism 、 Long list performance optimization 、 Multi port compatibility .
stay vue In the page , It uses page level scrolling by default . stay app-nvue In the page , It defaults to native list Component scrolling . Such a long list , After scrolling out of the screen , The system will reclaim rendering memory resources of invisible areas , It will not cause the problem that the longer the scroll, the more stuck the mobile phone .
uni-list Components are parent containers , The core of it is uni-list-item Child components , It represents a repeatable row in the list , Subcomponents can loop indefinitely .
uni-list-item There are many styles ,uni-list-item Components through built-in properties , Meet some common scenarios . When the built-in attributes do not meet the requirements , You can customize the contents of the list by expanding slots .
Scenarios that can be covered by built-in attributes include : Navigation list 、 Settings list 、 Small icon list 、 Address list 、 Chat list .
A list involving many large pictures or rich contents , For example, the news list of today's headlines 、 Taobao like e-commerce list , It needs to be realized by expanding slots .
Examples are given below .
uni-list It does not include pull-down refresh and pull-up page turning . Pull up and turn the page. See also components :uni-load-more(opens new window)
# Introduce
matters needing attention
To avoid misuse , Bring you a bad development experience , Please read the following precautions carefully before using the components , Can help you avoid some mistakes .
- Components need to depend on
sass
plug-in unit , Please install it manually - Component internal dependencies
'uni-icons'
、uni-badge
Components uni-list
anduni-list-item
It needs to be used together , It is not supported to use aloneuni-list-item
- Only after clicking on feedback , There will be a click selection effect
- When using slots , You can completely customize the content
- note 、rightText Properties are not restricted for the time being , Text overflow hiding is not supported , When using, you should control the length display or expand by yourself through the default slot
- Alipay applet platform needs to be opened in Alipay applet developer tool component2 Compile mode , Opening mode : details --> Project configuration --> Enable component2 compile
- If modification is needed
switch
、badge
style , Please use slot customization - stay
HBuilderX
In the lower version , Component display may appearundefined
The problem of , Please upgrade the latestHBuilderX
perhapscli
# Basic usage
- Set up
title
attribute , List titles can be displayed - Set up
disabled
attribute , You can disable the current item
边栏推荐
- How to Visualize Missing Data in R using a Heatmap
- Dynamic debugging of multi file program x32dbg
- Redis exceeds the maximum memory error oom command not allowed when used memory & gt; ' maxmemory'
- Three transparent LED displays that were "crowded" in 2022
- R HISTOGRAM EXAMPLE QUICK REFERENCE
- qt 仪表自定义控件
- HOW TO ADD P-VALUES TO GGPLOT FACETS
- HOW TO CREATE AN INTERACTIVE CORRELATION MATRIX HEATMAP IN R
- Bedtools tutorial
- 进入前六!博云在中国云管理软件市场销量排行持续上升
猜你喜欢
【2022 ACTF-wp】
The selected cells in Excel form have the selection effect of cross shading
Mish shake the new successor of the deep learning relu activation function
vant tabs组件选中第一个下划线位置异常
可昇級合約的原理-DelegateCall
揭露数据不一致的利器 —— 实时核对系统
动态内存(进阶四)
2022年遭“挤爆”的三款透明LED显示屏
SVO2系列之深度濾波DepthFilter
How to Visualize Missing Data in R using a Heatmap
随机推荐
uniapp uni-list-item @click,uniapp uni-list-item带参数跳转
Redis exceeds the maximum memory error oom command not allowed when used memory & gt; ' maxmemory'
Read the Flink source code and join Alibaba cloud Flink group..
Log4j2
Yygh-9-make an appointment to place an order
PyTorch中repeat、tile与repeat_interleave的区别
[visual studio 2019] create and import cmake project
GGPUBR: HOW TO ADD ADJUSTED P-VALUES TO A MULTI-PANEL GGPLOT
YYGH-9-预约下单
vant tabs组件选中第一个下划线位置异常
BEAUTIFUL GGPLOT VENN DIAGRAM WITH R
Programmer growth Chapter 6: how to choose a company?
【2022 ACTF-wp】
QT获取某个日期是第几周
PHP query distance according to longitude and latitude
小程序链接生成
Easyexcel and Lombok annotations and commonly used swagger annotations
Log4j2
基于 Openzeppelin 的可升级合约解决方案的注意事项
Fabric.js 3个api设置画布宽高