el-form sets the same width as el-select and el-input

By default, select and input have different lengths, as follows

insert image description here

style="width:100%;"Just add it in el-select

<el-form-item label="模板类型" prop="type">
  <el-select
    v-model="templateForm.type"
    placeholder="请选择模板类型"
    style="width:100%;"
    @change="typeChange"
  >
    <el-option
      v-for="dict in typeOptions"
      :key="dict.dictValue"
      :label="dict.dictLabel"
      :value="dict.dictValue"
    />
  </el-select>
</el-form-item>

renderings

insert image description here

Guess you like

Origin blog.csdn.net/q283614346/article/details/126855652