<el-col :span="6" :xs="24"> <div class="card-list" style="display: flex;width: 100%;flex-wrap: wrap;justify-content: space-between; align-items: center;"> <!--div style="display: flex; justify-content: space-between; align-items: center;"--> <!--el-card style="margin-bottom:20px; width:300px;height:280px"--> <el-card style="width:300px;height:280px; margin-left:1px;margin-bottom: 10px"> <template #header> <div class="h-4 pl-[90px]" style="width: 100%;display: flex;justify-content: space-between; align-items: center;"> <div class="user-block" style="line-height: 30px;font-size: 20px;"> <span class="username text-muted" style="margin-left: 10px;">故障模拟设备</span> <span class="description" style="margin-left: 10px;">教学理论设备</span> </div> <el-tag class="username text-muted" style="margin-left: 10px;color:green">运行</el-tag> <div class="el-icon-setting" style="font-size: 25px; color: rgba(18, 21, 211, 0.829);" @click="update"></div> </div> </template> <div class="flex justify-center" style="display: flex;width: 100%;flex-wrap: wrap;justify-content: space-between; align-items: center;"> <img class="rightullidiv" :src="'../../../static/images/fan.gif'"> <!--img class="w-[100px] h-[100px] rounded-lg" src="'../../../static/images/fan.gif'" alt=""--> <div class="ml-3" style="width:120px;height:280px; margin-left:1px;margin-bottom: 10px"> <!--el-descriptions class="el-descriptions__body" size="small" :column="Number('1')" border--> <el-descriptions size="small" :column="Number('1')" border> <el-descriptions-item label="电压">380 V</el-descriptions-item> <el-descriptions-item label="电流">10 A</el-descriptions-item> <el-descriptions-item label="通讯">正常 </el-descriptions-item> </el-descriptions> </div> </div> </el-card> </div> </el-col>实现图片与el-descriptions-item label="电压"并排放置,如何修改代码
时间: 2024-03-26 09:41:47 浏览: 159
详解vue中v-bind:style效果的自定义指令
您可以将图片与el-descriptions-item label="电压"都放在一个div中,设置该div的display属性为flex,并设置justify-content为space-between或者space-around。具体代码如下:
```
<div class="flex justify-between">
<img class="rightullidiv" :src="'../../../static/images/fan.gif'">
<el-descriptions size="small" :column="Number('1')" border>
<el-descriptions-item label="电压">380 V</el-descriptions-item>
</el-descriptions>
</div>
```
您可以将以上代码替换掉原来的el-descriptions代码部分即可。
阅读全文