index.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <div class="">
  3. <toolbar @on-filter="filterData" @on-reset="filterData" />
  4. <base-table
  5. class="m-10 bg-w p-20 br-10"
  6. :columns="columns"
  7. :items="items"
  8. :pagination="pagination"
  9. :page-change="pageChange"
  10. />
  11. </div>
  12. </template>
  13. <script>
  14. import toolbar from './toolbar';
  15. import mxFilterList from '@/mixins/filterList';
  16. import { getPage, delItem } from '@/api/points/detail';
  17. export default {
  18. name: 'PointsDetail',
  19. components: { toolbar },
  20. mixins: [
  21. mxFilterList({
  22. fetchList: getPage // 在下方data再声明一个 fetchList: iGetList 同等效果
  23. })
  24. ],
  25. data() {
  26. return {
  27. columns: [
  28. {
  29. key: 'accountId',
  30. name: '用户ID',
  31. width: this.$col.b
  32. },
  33. // {
  34. // key: 'region',
  35. // name: '昵称',
  36. // width: '180'
  37. // },
  38. // {
  39. // key: 'region',
  40. // name: '手机号',
  41. // width: '120'
  42. // },
  43. {
  44. key: 'scene',
  45. name: '场景',
  46. width: this.$col.b
  47. },
  48. {
  49. key: 'displayText',
  50. name: '展示文案',
  51. minWidth: this.$col.b
  52. },
  53. {
  54. key: 'createAt',
  55. name: '时间',
  56. width: this.$col.b
  57. }
  58. ]
  59. };
  60. }
  61. };
  62. </script>
  63. <style type="scss" scoped></style>