元气智驾官网后台前端页面
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

58 linhas
1.6 KiB

  1. <!--
  2. * @Date: 2021-07-08 11:02:40
  3. * @LastEditTime: 2022-07-27 10:48:43
  4. * @Description: 列表查询demo
  5. -->
  6. <template>
  7. <div class="app-container">
  8. <!--工具栏-->
  9. <div class="head-container">
  10. <div>
  11. <el-button class="filter-item" size="mini" type="primary" icon="el-icon-plus"
  12. @click="openSave()">新增</el-button>
  13. </div>
  14. </div>
  15. <!--表格渲染-->
  16. <el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="handleSelectionChange"
  17. >
  18. <el-table-column type="selection" width="55" />
  19. <el-table-column :show-overflow-tooltip="true" prop="newsId" label="序号" />
  20. <el-table-column :show-overflow-tooltip="true" prop="标题" label="newsTitle" />
  21. <el-table-column :show-overflow-tooltip="true" prop="createDate" label="创建时间" />
  22. </el-table>
  23. <!--分页组件-->
  24. <pagination />
  25. </div>
  26. </template>
  27. <script>
  28. import CRUD, { presenter, header, crud } from '@crud/crud'
  29. import pagination from '@crud/Pagination'
  30. export default {
  31. name: 'Demo',
  32. components: { pagination },
  33. mixins: [presenter(), header(), crud()],
  34. data() {
  35. return {
  36. releaseSourceList: [],
  37. dialogVisible: false,
  38. id: '',
  39. multipleSelection: []
  40. }
  41. },
  42. cruds() {
  43. return CRUD({ title: '列表', url: '/index/carNewsHotList', query: {}})
  44. },
  45. methods: {
  46. /* 刷新前操作 */
  47. [CRUD.HOOK.beforeRefresh]() {
  48. this.query.videHas = 1
  49. },
  50. handleSelectionChange(val) {
  51. this.multipleSelection = val
  52. }
  53. }
  54. }
  55. </script>