element相关组件

54 阅读1分钟

1. layout组件

有时官网提供的el-col的span间距并不能满足我们的需求,所以我们需要自定义样式。

<el-col :xl="{ span: '4-5' }">
</el-col>

<style lang="less" scoped>
@media only screen and (min-width: 1920px) {
  .el-col-xl-4-5 {
    width: 13%;
  }
  .el-col-xl-offset-4-5 {
    margin-left: 13%;
  }
  .el-col-xl-pull-4-5 {
    position: relative;
    right: 13%;
  }
  .el-col-xl-push-4-5 {
    position: relative;
    left: 13%;
  }
}
</style>