_table.blade.php 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <table class="table table-striped table-sm table-hover" id="list">
  2. <tr class="text-center">
  3. <th>序号</th>
  4. <th>名称</th>
  5. <th>值</th>
  6. <th>描述</th>
  7. <th>操作员</th>
  8. <th>创建时间</th>
  9. <th>修改时间</th>
  10. <th>操作</th>
  11. </tr>
  12. <tr class="text-center" v-for="(configuration,i) in configurations" :key="configuration.id"
  13. @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
  14. <td>@{{ i+1 }}</td>
  15. <td>@{{ configuration.name }}</td>
  16. <td>@{{ configuration.value }}</td>
  17. <td>@{{ configuration.description }}</td>
  18. <td>
  19. <span v-if="configuration.operator">@{{ configuration.operator.name }}</span>
  20. </td>
  21. <td>@{{ configuration.created_at }}</td>
  22. <td>@{{ configuration.updated_at }}</td>
  23. <td>
  24. @can('系统配置-编辑')
  25. <button type="button" class="btn btn-sm btn-outline-primary" @click="edit(configuration,i)">编辑</button>
  26. @endcan
  27. @can('系统配置-删除')
  28. <button type="button" class="btn btn-sm btn-outline-danger" @click="destroy(configuration.id,i)">删除</button>
  29. @endcan
  30. </td>
  31. </tr>
  32. </table>
  33. {{$configurations->links()}}