Element-ui form content is centered (detailed tutorial)

During development, the element-ui form function is often used. After the development, it is found that the content of the form is not aligned and looks unsightly. If you encounter it in your own development, just record it

1. Definition method

 methods: {
 rowStyle() {
      return "text-align:center";
    },
}

2. Use in the header

<el-table
        :cell-style="rowStyle" 
      >
</el-table>

3. Use in the table row

 <el-table-column
          prop="inspect_item_conf_name"
          align="center"
        >
        </el-table-column>

Four. Effect

 

Guess you like

Origin blog.csdn.net/m0_59023970/article/details/123581811