跳到主要内容

col

col.ts

  • colProps

col.vue

设置 div attribute

  <component :is="tag" :class="colKls" :style="style">
<slot />
</component>

colKls

.el-col {
border-radius: 4px;
}

.el-col-16 {
max-width: 66.6666666667%;
flex: 0 0 66.6666666667%;
}

style

const { gutter } = inject(rowContextKey, { gutter: computed(() => 0) })

if (gutter.value) {
styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`
}