当前位置:网站首页>uniapp下拉弹层选择框效果demo(整理)
uniapp下拉弹层选择框效果demo(整理)
2022-06-27 11:55:00 【000000001111】
效果图:
<template>
<picker @change="onRecipientChangeSelect" :value="recipientIndex" :range="recipient" range-key="name">
<view class="uni-input p-0 txtFont">
<!-- {
{
recipient[recipientIndex].name}}<text class="iconfont icon-xia font-sm pl-1"></text> -->
{
{
shopName}}<text class="iconfont icon-xia font-sm pl-1"></text>
</view>
</picker>
</template>
<script>
export default{
data() {
return {
shopName: '全部',
recipient: [
{
id: 18,
name: "门店01"
},
{
id: 19,
name: "门店字数超长门店字数超长门店字数超长门店字数"
},
],
recipientIndex: 0,
dataObject: {
},
}
},
methods: {
onRecipientChangeSelect(e) {
console.log('携带值为', e.detail.value)
// this.recipientIndex = e.detail.value //选择数组的第几个
this.dataObject.shopId = this.recipient[e.detail.value].id; //选择商店id
this.dataObject.shopName = this.recipient[e.detail.value].name; //选择商店name
},
}
}
</script>
边栏推荐
- [tcapulusdb knowledge base] tcapulusdb OMS business personnel permission introduction
- 数学知识——博弈论(巴什博奕、尼姆博奕、威佐夫博奕)思路及例题
- R语言使用epiDisplay包的dotplot函数通过点图的形式可视化不同区间数据点的频率、使用by参数指定分组参数可视化不同分组的点图分布、使用dot.col参数指定分组数据点的颜色
- Llvm family (1) - Introduction to llvm
- 【TcaplusDB知识库】TcaplusDB-tcapsvrmgr工具介绍(二)
- 亚马逊测评掉评、留不上评是怎么回事呢?要如何应对?
- Safe landing practice of software supply chain under salesforce containerized ISV scenario
- Youboxun attended the openharmony technology day to create a new generation of secure payment terminals
- 记一次 .NET 某物管后台服务 卡死分析
- Shell script learning notes
猜你喜欢
JSP自定义标签
mysql学习1:安装mysql
【TcaplusDB知识库】TcaplusDB-tcapsvrmgr工具介绍(二)
Dynamic programming [4] (counting class DP) example: integer partition
C/s architecture
StarCraft's Bug King ia retired for 2 years to engage in AI, and lamented that it was inferior
Drive to APasS!使用明道云管理F1赛事
MySQL高阶语句(一)
alibaba jarslink
Online bidding of Oracle project management system
随机推荐
FileOutputStream
R语言使用epiDisplay包的dotplot函数通过点图的形式可视化不同区间数据点的频率、使用by参数指定分组参数可视化不同分组的点图分布、使用dot.col参数指定分组数据点的颜色
Getting started with go web programming: validators
数学知识——博弈论(巴什博奕、尼姆博奕、威佐夫博奕)思路及例题
Nvme2.0 protocol - new features
namespace ‘rlang’ 0.2.0 is being loaded, but &gt;= 0.3.0 is required
. Net6 access skywalking link tracking complete process
Summary of qstype class usage (II)
聊聊 Go 语言与云原生技术
内存四区(栈,堆,全局,代码区)
Wechat applet payment password input
星际争霸的虫王IA退役2年搞AI,自叹不如了
Salesforce 容器化 ISV 场景下的软件供应链安全落地实践
Dynamic programming [III] (interval DP) stone merging
Maximum path and problem (cherry picking problem)
In depth analysis of error solutions and problems in dynamic loading of unity shadow and outline components
Popular science of device review: popular science of innovative medical device series - sternum plate products
[tcapulusdb knowledge base] tcapulusdb doc acceptance - Introduction to creating game area
i.mx6ull(单片机) c语言环境搭建
【面试高频题】难度 1.5/5,LCS 模板题