当前位置:网站首页>Flexible layout single selection
Flexible layout single selection
2022-07-29 02:08:00 【Vegetable bird yard live】
My style is row by row 10 Column
Jiugong grid pop-up display
The code is as follows
The list of data
const ymList = ref([
{
ym: " Poria cocos ",
},
{
ym: " Angelica dahurica ",
},
{
ym: " Cocklebur ",
},
{
ym: " cicada slough ",
},
{
ym: " Fructus arctii ",
},
{
ym: " Mulberry leaves ",
},
{
ym: " Gegen ",
},
{
ym: " Chaihu ",
},
{
ym: " Vitex trifolia ",
},
{
ym: " Know your mother ",
},
]);
<el-dialog
v-model="ymDialogVisible"
title=" Please select "
draggable
width="60%"
destroy-on-close
center
>
<div class="row">
<div class="ymdiv" @click="ymClick(item,index)" v-for="(item,index) in ymList" :key="index">
{
{item.ym}}
<el-icon color="#FF0000" v-if="clickYmIndex == index"><Select /></el-icon>
</div>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="ymDialogVisible = false"> take eliminate </el-button>
<el-button type="primary" @click="ymconfirm"> indeed set </el-button>
</span>
</template>
</el-dialog>
Click event
const clickYmIndex = ref(null)
function ymClick(item, index) {
clickYmIndex.value = index;
}
function ymconfirm(){
zbList.value[clickIndex.value].yymc = ymList.value[clickYmIndex.value].ym;
ymDialogVisible.value = false;
}
css style
.row {
display: flex;
margin-bottom: 5px;
flex-direction: row;
flex-wrap: wrap;
}
.ymdiv {
width: 105px;
height: 105px;
line-height: 105px;
text-align: center;
border-collapse: collapse;
margin-right:-1px;
margin-bottom:-1px;
cursor: pointer;
border: 1px solid #a5a3a3;
}

边栏推荐
- Overview of Qualcomm 5g intelligent platform
- Force deduction brush question (2): sum of three numbers
- [the road of Exile - Chapter 4]
- 数学建模——自来水管道铺设问题
- LM13丨形态量化-动量周期分析
- Mysql存储json格式数据
- Mathematical modeling -- the laying of water pipes
- [7.21-26] code source - [good sequence] [social circle] [namonamo]
- Leetcode 113: path sum II
- 解决使用ESlint时,和vetur冲突导致保存变双引号,结尾逗号等
猜你喜欢

druid. IO custom real-time task scheduling policy

Mathematical modeling -- cold proof simulation of low temperature protective clothing with phase change materials

Day01 job

2022年编程语言排名,官方数据来了,让人大开眼界

The basic concept of transaction and the implementation principle of MySQL transaction

iVX低代码平台系列详解 -- 概述篇(二)
![[golang] use select {}](/img/30/fa593ec682a40c47689c1fd88f9b83.png)
[golang] use select {}

StoneDB 邀请您参与开源社区月会!

知道创宇上榜CCSIP 2022全景图多个领域

(CVPR-2019)选择性的内核网络
随机推荐
(cvpr-2019) selective kernel network
iVX低代码平台系列详解 -- 概述篇(二)
Comprehensive analysis of news capture doorway
leetcode 242. Valid Anagram(有效的字母异位词)
The solution of reducing the sharpness of pictures after inserting into word documents
[the road of Exile - Chapter 5]
[golang] synchronization lock mutex
StoneDB 邀请您参与开源社区月会!
Comprehensive explanation of "search engine crawl"
Use of packet capturing tool Charles
分布式开发漫谈
Js DOM2 和 DOM3
[WesternCTF2018]shrine
[the road of Exile - Chapter 8]
Process -- user address space and kernel address space
Practical experience of Google cloud spanner
忽略微信设置字体
The number of consecutive subarrays whose leetcode/ product is less than k
Promise解决异步
The growth path of embedded engineers