当前位置:网站首页>弹性布局 单选
弹性布局 单选
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;
}

边栏推荐
- Sword finger offer special assault edition day 13
- MPEG音频编码三十年
- The scientific research environment has a great impact on people
- Mathematical modeling -- the laying of water pipes
- More interesting Title Dynamic Effect
- Process -- user address space and kernel address space
- LeetCode 112:路径总和
- Comprehensive explanation of "search engine crawl"
- IDEA 连接 数据库
- 数学建模——带相变材料的低温防护服御寒仿真模拟
猜你喜欢

MPEG音频编码三十年
![[WesternCTF2018]shrine](/img/c1/c099f8930902197590052630281258.png)
[WesternCTF2018]shrine

Planning mathematics final simulation exam I

Mathematical modeling - location of police stations

DSP vibration seat

Talk about possible problems when using transactions (@transactional)

Why can't Bi software do correlation analysis
![[the road of Exile - Chapter 5]](/img/ef/7ecc1cb4a95c613f7be91f7acc761c.png)
[the road of Exile - Chapter 5]

数学建模——公交调度优化

Know that Chuangyu is listed in many fields of ccsip 2022 panorama
随机推荐
Secret skill winter tide branding skill matching
[netding cup 2020 rosefinch group]nmap
How to prevent all kinds of affiliated fraud?
动态内存与智能指针
Semiconductor chip industry chain
(arxiv-2018) 重新审视基于视频的 Person ReID 的时间建模
【流放之路-第三章】
Day01作业
LeetCode 113:路径总和 II
The scientific research environment has a great impact on people
12.< tag-动态规划和子序列, 子数组>lt.72. 编辑距离
【流放之路-第七章】
[7.21-26] code source - [square count] [dictionary order minimum] [Z-type matrix]
Mathematical modeling -- the laying of water pipes
JS timer setinterval clearinterval delayer setTimeout asynchronous animation
[the road of Exile - Chapter 6]
[WesternCTF2018]shrine
Thirty years of MPEG audio coding
2022年编程语言排名,官方数据来了,让人大开眼界
StoneDB 邀请您参与开源社区月会!