当前位置:网站首页>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;
}

边栏推荐
猜你喜欢

动态内存与智能指针

Lua log implementation -- print table
![[the road of Exile - Chapter 8]](/img/df/a801da27f5064a1729be326c4167fe.png)
[the road of Exile - Chapter 8]

给LaTeX公式添加优美的注解;日更『数据科学』面试题集锦;大学生『计算机』自学指南;个人防火墙;前沿资料/论文 | ShowMeAI资讯日报

Large scale web crawling of e-commerce websites (Ultimate Guide)

Thirty years of MPEG audio coding

Verilog procedure assignment statements: blocking & non blocking

Lxml web page capture the most complete strategy

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

LM13丨形态量化-动量周期分析
随机推荐
试着换个角度理解低代码平台设计的本质
【流放之路-第五章】
Mysql存储json格式数据
iVX低代码平台系列详解 -- 概述篇(二)
[the road of Exile - Chapter 8]
ciscn 2022 华中赛区 misc
Large scale web crawling of e-commerce websites (Ultimate Guide)
Dynamic memory and smart pointer
Mathematical modeling -- the laying of water pipes
Why does stonedb dare to call it the only open source MySQL native HTAP database in the industry?
The basic concept of transaction and the implementation principle of MySQL transaction
Introduction to shared data center agent
Wonderful use of data analysis
IDEA 连接 数据库
【Golang】- runtime.Goexit()
Ciscn 2022 central China Misc
Stonedb invites you to participate in the open source community monthly meeting!
Semiconductor chip industry chain
Thirty years of MPEG audio coding
【流放之路-第四章】