vue 循坏按钮样式为一行两个?
怎样修改样式一行两个按钮<div style="width: 90%; margin: 60px auto; display: flex; justify-content: space-between; flex-wrap: wrap">
<van-button v-for="(item, index) in btnsArr" style="margin-bottom: 300px"
:disabld="item.stgBinCode === null" :style="{'background-color': btnColor(item.stgBinCode)}"
:key="index">{{item.binName}}</van-button>
</div>
回复
1个回答

test
2024-07-14
<ul>
<li v-for="(item, index) in todos" :key="index">
<el-button>{{item.text}}</el-button>
</li>
</ul>
ul{
list-style: none;
width: 100%;
margin: auto;
padding:0;
display: flex;//关键
flex-wrap: wrap;//关键
li{
text-align: center;
width: 50%;
height: 60px;
}
}
是这样吗
回复

适合作为回答的
- 经过验证的有效解决办法
- 自己的经验指引,对解决问题有帮助
- 遵循 Markdown 语法排版,代码语义正确
不该作为回答的
- 询问内容细节或回复楼层
- 与题目无关的内容
- “赞”“顶”“同问”“看手册”“解决了没”等毫无意义的内容