<commit_before>import Checkbox from '../Checkbox'
import Button from '../Button'
import Sorter from '../Sorter'
import table from '../../mixins/table'

export default {
  name: 'veui-table-head',
  components: {
    'veui-checkbox': Checkbox,
    'veui-button': Button,
    'veui-sorter': Sorter
  },
  mixins: [table],
  computed: {
    ...table.mapTableData(
      'data',
      'selectable',
      'selectMode',
      'selectStatus',
      { realColumns: 'columns' }
    )
  },
  render () {
    return (
      <thead>
        <tr>
          {
            this.selectable
              ? <th scope="col" role="columnheader"><div class="veui-table-cell">
                {
                  this.selectMode === 'multiple'
                    ? <veui-checkbox checked={this.selectStatus !== 'none'}
                      disabled={!this.data.length}
                      indeterminate={this.selectStatus === 'partial'}
                      onChange={checked => { this.table.select(checked) }}
                      aria-label={this.checked ? '全部移除' : '全部添加'}/>
                    : null
                }</div></th>
              : null
          }
          {
            this.columns.map(col => (
              <th
                class={col.align ? `veui-table-column-${col.align}` : null}
                scope="col"
                role="columnheader"
                aria-sort={
                  this.table.orderBy === col.field && this.table.order
                    ? `${this.table.order}ending`
                    : false
                }>
                <div class="veui-table-cell">{col.renderHead()}</div>
                {
                  col.sortable
                    ? <veui-sorter
                      order={this.table.orderBy === col.field ? this.table.order : false}
                      onSort={order => { this.$emit('sort', col.field, order) }}>
                    </veui-sorter>
                    : null
                }
              </th>
            ))
          }
        </tr>
      </thead>
    )
  },
  methods: {
    getAriaSort (order) {
      if (!order) {
        return null
      }
      return order === 'asc' ? 'ascending' : 'descending'
    }
  }<commit_msg>fix: remove unnecessary method<commit_after>import Checkbox from '../Checkbox'
import Button from '../Button'
import Sorter from '../Sorter'
import table from '../../mixins/table'

export default {
  name: 'veui-table-head',
  components: {
    'veui-checkbox': Checkbox,
    'veui-button': Button,
    'veui-sorter': Sorter
  },
  mixins: [table],
  computed: {
    ...table.mapTableData(
      'data',
      'selectable',
      'selectMode',
      'selectStatus',
      { realColumns: 'columns' }
    )
  },
  render () {
    return (
      <thead>
        <tr>
          {
            this.selectable
              ? <th scope="col" role="columnheader"><div class="veui-table-cell">
                {
                  this.selectMode === 'multiple'
                    ? <veui-checkbox checked={this.selectStatus !== 'none'}
                      disabled={!this.data.length}
                      indeterminate={this.selectStatus === 'partial'}
                      onChange={checked => { this.table.select(checked) }}
                      aria-label={this.checked ? '全部移除' : '全部添加'}/>
                    : null
                }</div></th>
              : null
          }
          {
            this.columns.map(col => (
              <th
                class={col.align ? `veui-table-column-${col.align}` : null}
                scope="col"
                role="columnheader"
                aria-sort={
                  this.table.orderBy === col.field && this.table.order
                    ? `${this.table.order}ending`
                    : false
                }>
                <div class="veui-table-cell">{col.renderHead()}</div>
                {
                  col.sortable
                    ? <veui-sorter
                      order={this.table.orderBy === col.field ? this.table.order : false}
                      onSort={order => { this.$emit('sort', col.field, order) }}>
                    </veui-sorter>
                    : null
                }
              </th>
            ))
          }
        </tr>
      </thead>
    )
  }
{'fraction_non_alphanumeric': 0.14558583740973677, 'fraction_numerical': 0.0, 'mean_word_length': 1.2191214470284237, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2760178', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1168, 'n_words': 199}