当前位置:网站首页>弹性布局 单选
弹性布局 单选
2022-07-29 01:20:00 【小菜鸟码住】
我的样式是一行排10列
九宫格弹窗显示
代码如下
列表数据
const ymList = ref([
{
ym: "茯苓",
},
{
ym: "白芷",
},
{
ym: "苍耳子",
},
{
ym: "蝉蜕",
},
{
ym: "牛蒡子",
},
{
ym: "桑叶 ",
},
{
ym: "葛根",
},
{
ym: "柴胡",
},
{
ym: "蔓荆子",
},
{
ym: "知母",
},
]);
<el-dialog
v-model="ymDialogVisible"
title="请选择"
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">取 消</el-button>
<el-button type="primary" @click="ymconfirm">确 定</el-button>
</span>
</template>
</el-dialog>
点击事件
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样式
.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;
}

边栏推荐
- Mathematical modeling -- cold proof simulation of low temperature protective clothing with phase change materials
- 使用POI,实现excel文件导出,图片url导出文件,图片和excel文件导出压缩包
- [the road of Exile - Chapter 8]
- Why does stonedb dare to call it the only open source MySQL native HTAP database in the industry?
- Web crawler API Quick Start Guide
- 知道创宇上榜CCSIP 2022全景图多个领域
- 给LaTeX公式添加优美的注解;日更『数据科学』面试题集锦;大学生『计算机』自学指南;个人防火墙;前沿资料/论文 | ShowMeAI资讯日报
- Large scale web crawling of e-commerce websites (Ultimate Guide)
- How to prevent all kinds of affiliated fraud?
- [the road of Exile - Chapter 2]
猜你喜欢

Mathematical modeling -- red wine quality classification
![[the road of Exile - Chapter 8]](/img/df/a801da27f5064a1729be326c4167fe.png)
[the road of Exile - Chapter 8]

Semiconductor chip industry chain

As long as I run fast enough, it won't catch me. How does a high school student achieve a 70% salary increase under the epidemic?

使用本地缓存+全局缓存实现小型系统用户权限管理

Implementation of 10m multifunctional signal generator with FPGA
![Golang run times undefined error [resolved]](/img/9b/3379aeeff59b47531fe277f7422ce7.png)
Golang run times undefined error [resolved]
![[网鼎杯 2020 朱雀组]Nmap](/img/22/1fdf716a216ae26b9110b2e5f211f6.png)
[网鼎杯 2020 朱雀组]Nmap

Sigma-DSP-OUTPUT

Stonedb invites you to participate in the open source community monthly meeting!
随机推荐
【流放之路-第七章】
As long as I run fast enough, it won't catch me. How does a high school student achieve a 70% salary increase under the epidemic?
LeetCode 113:路径总和 II
Using local cache + global cache to realize user rights management of small systems
[7.21-26] code source - [sports festival] [Dan fishing war] [maximum weight division]
What is the function of data parsing?
数据平台数据接入实践
正则过滤数据学习笔记(①)
【7.21-26】代码源 - 【好序列】【社交圈】【namonamo】
【流放之路-第八章】
Leetcode 112: path sum
Tda75610-i2c-determination of I2C address of analog power amplifier
Comprehensive analysis of news capture doorway
Planning mathematics final exam simulation II
Yocto project download and compilation
Code reading - ten C open source projects
【流放之路-第五章】
How to crawl web pages with playwright?
[the road of Exile - Chapter 4]
LM13丨形态量化-动量周期分析