<commit_before><template>
  <div>
  <template v-if="showPage">
    <Page :current="currentPage" 
          :pageSize="pageSize" 
          :total="total"  
          @on-change="onPageChange"></Page>
  </template>
  <table class="table table-hover table-striped table-condensed" :class="classes">
    <colgroup>
      <col v-for="column in columns" :width="column.width">
    </colgroup>
    <thead>
      <tr>
        <th v-for="column in columns" :class="column.classes" v-text="column.title"></th>
      </tr>
    </thead>
    <tbody>
      <template v-for="(row, index) in cloneData">
        <tr><td v-for="column in columns" 
              v-html="renderTd(row, column, index)" 
              :key="row" 
              :class="column.classes"></td>
        </tr>
      </template>
    </tbody>
  </table>
  <template v-if="showPage">
    <Page :current="currentPage" 
          :pageSize="pageSize" 
          :total="total" 
          @on-change="onPageChange"></Page>
  </template>
</template>
</div>
<script>
  import Assist from '../../utils/assist.js';
  import Page from '../page/page.vue';
  import PageMixin from '../../mixins/page.vue';
  export default {
    name: 'table',
    components: { Page },
    mixins: [PageMixin],
    props: {
      // 自定义样式
      classes: String,
      showIndex: {<commit_msg>add tip when no data<commit_after><template>
  <div>
  <template v-if="showPage">
    <Page :current="currentPage" 
          :pageSize="pageSize" 
          :total="total"  
          @on-change="onPageChange"></Page>
  </template>
  <table class="table table-hover table-striped table-condensed" :class="classes">
    <colgroup>
      <col v-for="column in columns" :width="column.width">
    </colgroup>
    <thead>
      <tr>
        <th v-for="column in columns" :class="column.classes" v-text="column.title"></th>
      </tr>
    </thead>
    <tbody>
      <template v-for="(row, index) in cloneData">
        <tr><td v-for="column in columns" 
              v-html="renderTd(row, column, index)" 
              :key="row" 
              :class="column.classes"></td></tr>
      </template>
      <tr v-if="cloneData.length <= 0">
        <td :colspan="columns.length" class="text-center font_red">没有符合条件的数据！</td>
      </tr>
    </tbody>
  </table>
  <template v-if="showPage">
    <Page :current="currentPage" 
          :pageSize="pageSize" 
          :total="total" 
          @on-change="onPageChange"></Page>
  </template>
</template>
</div>
<script>
  import Assist from '../../utils/assist.js';
  import Page from '../page/page.vue';
  import PageMixin from '../../mixins/page.vue';
  export default {
    name: 'table',
    components: { Page },
    mixins: [PageMixin],
    props: {
      // 自定义样式
      classes: String,
      showIndex: {
{'fraction_non_alphanumeric': 0.17969031328772056, 'fraction_numerical': 0.00036010082823190496, 'mean_word_length': 2.326946107784431, 'pattern_counts': {'":': 0, '<': 72, '<?xml version=': 0, '>': 71, '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': '7635180', 'n_tokens_mistral': 932, 'n_tokens_neox': 917, 'n_words': 187}