当前位置:网站首页>Uniapp drop-down layer selection box effect demo (sorting)
Uniapp drop-down layer selection box effect demo (sorting)
2022-06-27 12:21:00 【000000001111】
design sketch :
<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: ' All ',
recipient: [
{
id: 18,
name: " store 01"
},
{
id: 19,
name: " Store word count super long store word count super long store word count super long store word count "
},
],
recipientIndex: 0,
dataObject: {
},
}
},
methods: {
onRecipientChangeSelect(e) {
console.log(' Carrying value is ', e.detail.value)
// this.recipientIndex = e.detail.value // Select the ordinal of the array
this.dataObject.shopId = this.recipient[e.detail.value].id; // Select store id
this.dataObject.shopName = this.recipient[e.detail.value].name; // Select store name
},
}
}
</script>
边栏推荐
- 1. Mx6ull startup mode
- How histrix works
- How to find the movie and TV clips with the same lines? These 8 movies search for artifact, and find the corresponding segment in one line
- mysql学习1:安装mysql
- 建木持续集成平台v2.5.0发布
- Interview shock 60: what will cause MySQL index invalidation?
- 盘点一些好用且小众的 Markdown 编辑器
- 解开C语言的秘密《关键字》(第六期)
- The DBSCAN function of FPC package in R language performs density clustering analysis on data, and the plot function visualizes the clustering graph
- 深入理解 happens-before 原则
猜你喜欢
What's the matter with Amazon's evaluation dropping and failing to stay? How to deal with it?
Dynamic programming [4] (counting class DP) example: integer partition
In 2021, the global enhanced oil production surfactant revenue was about USD 202.3 million, and it is expected to reach USD 297.1 million in 2028
This privatized deployed enterprise knowledge base makes telecommuting a zero distance
Peak store app imitation station development play mode explanation source code sharing
Usage of rxjs mergemap
Safe landing practice of software supply chain under salesforce containerized ISV scenario
如何修改 node_modules 裏的文件
Wechat applet realizes five-star evaluation
StarCraft's Bug King ia retired for 2 years to engage in AI, and lamented that it was inferior
随机推荐
千万不要错过,新媒体运营15个宝藏公众号分享
一个有趣的网络掩码的实验
Master formula
巅峰小店APP仿站开发玩法模式讲解源码分享
Raspberry pie 3b+ learning
Four memory areas (stack, heap, global, code area)
Interview shock 60: what will cause MySQL index invalidation?
Private dry goods sharing: how to implement platform in Enterprise Architecture
Mit6.031 software construction7 reading notesdesigning specifications
浅谈珂朵莉树
Interview shock 60: what will cause MySQL index invalidation?
build. Gradle configuration
[tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (II)
盘点一些好用且小众的 Markdown 编辑器
想学好C语言,操作符也很重要
[on Nacos] get started quickly
How to modify a node_ Files in modules
StarCraft's Bug King ia retired for 2 years to engage in AI, and lamented that it was inferior
Don't miss it. New media operates 15 treasure official account to share
今晚战码先锋润和赛道第2期直播丨如何参与OpenHarmony代码贡献