当前位置:网站首页>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
边栏推荐
- 【多线程】主线程等待子线程执行完毕在执行并获取执行结果的方式记录(有注解代码无坑)
- Enter the top six! Boyun's sales ranking in China's cloud management software market continues to rise
- GGPLOT: HOW TO DISPLAY THE LAST VALUE OF EACH LINE AS LABEL
- K-Means Clustering Visualization in R: Step By Step Guide
- Log4j2
- GGPLOT: HOW TO DISPLAY THE LAST VALUE OF EACH LINE AS LABEL
- to_ Bytes and from_ Bytes simple example
- 时间格式化显示
- A white hole formed by antineutrons produced by particle accelerators
- excel表格中选中单元格出现十字带阴影的选中效果
猜你喜欢
ESP32 Arduino 引入LVGL 碰到的一些问题
小程序链接生成
Take you ten days to easily finish the finale of go micro services (distributed transactions)
How to Add P-Values onto Horizontal GGPLOTS
Develop scalable contracts based on hardhat and openzeppelin (I)
File operation (detailed!)
6. Introduce you to LED soft film screen. LED soft film screen size | price | installation | application
电脑无缘无故黑屏,无法调节亮度。
ESP32音频框架 ESP-ADF 添加按键外设流程代码跟踪
GGPLOT: HOW TO DISPLAY THE LAST VALUE OF EACH LINE AS LABEL
随机推荐
SVO2系列之深度滤波DepthFilter
PX4 Position_ Control RC_ Remoter import
Log4j2
CMake交叉编译
GGPUBR: HOW TO ADD ADJUSTED P-VALUES TO A MULTI-PANEL GGPLOT
BEAUTIFUL GGPLOT VENN DIAGRAM WITH R
Data analysis - Matplotlib sample code
The position of the first underline selected by the vant tabs component is abnormal
[visual studio 2019] create and import cmake project
to_bytes与from_bytes简单示例
Pyqt5+opencv project practice: microcirculator pictures, video recording and manual comparison software (with source code)
时间格式化显示
基于Hardhat和Openzeppelin开发可升级合约(一)
自然语言处理系列(二)——使用RNN搭建字符级语言模型
Fabric. JS 3 APIs to set canvas width and height
[visual studio 2019] create MFC desktop program (install MFC development components | create MFC application | edit MFC application window | add click event for button | Modify button text | open appl
php 根据经纬度查询距离
可昇級合約的原理-DelegateCall
How to Create a Nice Box and Whisker Plot in R
Principle of scalable contract delegatecall