当前位置:网站首页>Plug in import and usage of uni list
Plug in import and usage of uni list
2022-04-22 02:17:00 【iii2stay】
Create a new project first Choose the second hello uni-app The template of Find the following four folders Copy to your local project

Which component needs to use uni-lis Copy and import the code into js in
import uniList from '@/components/uni-list/uni-list.vue';
import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
import uniAd from '@/components/uni-list-ad/uni-list-ad.vue';
import uniChat from '@/components/uni-list-chat/uni-list-chat.vue';
Take a look at the complete code :
<template>
<view class="content">
<!-- Elderly list -->
<uni-list v-for="(item,index) in oldManList" :key="index">
<uni-list-item
:title="item.name"
@click="onClick"
show-arrow="true"
link
>
</uni-list-item>
</uni-list>
</view>
</template>
<script>
import uniList from '@/components/uni-list/uni-list.vue';
import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
import uniAd from '@/components/uni-list-ad/uni-list-ad.vue';
import uniChat from '@/components/uni-list-chat/uni-list-chat.vue';
export default {
components:{
uniList,uniListItem,uniAd,uniChat
},
data() {
return {
oldManList: [{
name: " Boss crab "
},
{
name: " Patrick Star "
},
],
};
},
methods: {
onClick(e) {
console.log(' perform click event ', e)
}
},
};
</script>

版权声明
本文为[iii2stay]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220214387276.html
边栏推荐
- Use of greendao;
- Unity3d RPG role playing game source code (top and bottom) --- source code analysis ----- 01 ------ protagonist character animation
- Mysql-if-then-else statement
- Ultimate doll 2.0 | observable practice sharing of cloud native PAAS platform
- SSLHandshakeException
- Page 49 information planning and digital transformation of petroleum and petrochemical industry
- 2022年软件设计师考试知识点:线性表
- Zuo Chengyun - Dachang brushing class - laying bricks
- 高级UI都没弄明白凭什么拿高薪,劲爆
- Why is Nacos so strong
猜你喜欢

How to select the appropriate neo4j Version (2022)

Why is Nacos so strong

Leetcode 141, circular linked list

Shell basic syntax
![[FAQ] Anaconda prompt reports an error. Solving environment: failed](/img/c9/e92a27b4150bcbc5ec1654f75a1b65.png)
[FAQ] Anaconda prompt reports an error. Solving environment: failed

像堆乐高一样解释神经网络的数学过程

Ultimate doll 2.0 | observable practice sharing of cloud native PAAS platform

互联网行业为什么能吸引越来越多的年轻人?尤其是程序员……

Leetcode 566, remodeling matrix

单层神经⽹络的详细实现
随机推荐
c#线程调用
Shell knowledge: awk
Leetcode 141, circular linked list
Swoole high performance in memory database use and configuration tutorial
unapp封装一个加载动画
Hexadecimal conversion
Deadlock of select statements in golang
Leetcode 566, remodeling matrix
NLP model summary
3D立体相册模板(大小可更改)
3D album template (size can be changed)
MySQL -- master slave synchronization
DEJA_ Vu3d - cesium feature set 012 - military plotting Series 6: Custom polygons
Advanced file IO of system programming (12) -- blocking and non blocking reading
Interview question: use the program to realize the alternating printing of odd and even numbers from 0 to 100 by two threads
面试题:用程序实现两个线程交替打印 0~100 的奇偶数
风控产品定额的陷阱都有哪些?
In PostgreSQL, convert a string to an integer or floating-point type in the query result
【项目】小帽外卖(七)
Nacos 为什么这么强