index.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <div class="approvalPend">
  3. <a-table size="small" :dataSource="dataSource" :columns="columns" :scroll="{ y: 730 }" :pagination="pagination"
  4. @change="pageChange">
  5. <template #action="{ record }">
  6. <a-button type="link" style="color:#3DF6FF" @click="getViews">
  7. 查看
  8. </a-button>
  9. </template>
  10. </a-table>
  11. </div>
  12. </template>
  13. <script setup lang="ts">
  14. import {ref,reactive,watch,nextTick} from 'vue'
  15. import {columns} from './approvalPend.data.ts'
  16. //待审批列表数据
  17. let dataSource=ref<any[]>([])
  18. //分页参数配置
  19. let pagination = reactive({
  20. current: 1, // 当前页码
  21. pageSize: 10, // 每页显示条数
  22. total: 0, // 总条目数,后端返回
  23. // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
  24. showSizeChanger: true, // 是否可改变每页显示条数
  25. pageSizeOptions: ['10', '20', '50',], // 可选的每页显示条数
  26. })
  27. </script>
  28. <style lang="less" scoped>
  29. .approvalPend {
  30. position: relative;
  31. width: 100%;
  32. height: 100%;
  33. }
  34. </style>