vue的el-form-item标签的label展示名称左右对齐

方法一

 .el-form-item label:after {
        content: "";
        display: inline-block;
        width: 100%;
    }

    .el-form-item__label {
        text-align: justify;
        height: 50px;
    }
    
    .el-form-item.is-required .el-form-item__label:before {
        content: none !important;
    }

方法二

<template>
  <el-form-item prop="name">
    <div slot="label" style="margin-left:10px;">名称</div>
    <el-input v-model="form.name" placeholder="请输入名称"></el-input>
  </el-form-item>
</template>

vue的el-table-column标签的表格中给标题加红*

<template slot="header">
   <span class="btnWarn">*</span>
   <span>套数</span>
 </template>
Logo

前往低代码交流专区

更多推荐