<template>
  <colgroup>
    <col v-for="index in columns" :key="index" :class="index % 2 === 1 ? $style.label : ''" />
  </colgroup>
</template>

<script>
import components from './_import-components/sd-form-colgroup-import'
/**
 * 设置table列宽，通常搭配sd-form下的table使用
 * @displayName SdFormColgroup 设置table列宽
 */
export default {
  name: 'SdFormColgroup',
  components,
  props: {
    /**
     * 多少列，默认4
     */
    columns: { type: Number, default: 4 },
  },
  data() {
    return {}
  },
  methods: {},
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
.label {
  width: 160px;
}
</style>
