Blame view

frontend/front/src/mixins/tableCommon.js 668 Bytes
8d73e917   陈威   初始化提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export default {
  data() {
    return {
      pagination: {
        page: 1,
        pageSize: 30,
        total: 0,
      },
      selectedRows: [],
      pageSizes: [10, 20, 30, 50, 100, 200, 300],
      headerStyle: {
        background: '#fafafa',
      },
    }
  },
  computed: {
    tableHeight() {
      return this.$baseTableHeight(-47)
    },
  },
  methods: {
    selectionChange(selection) {
      this.selectedRows = selection
    },
    handleSizeChange(size) {
      this.pagination.pageSize = size
      this.search()
    },
    handleCurrentChange(currentPage) {
      this.pagination.page = currentPage
      this.search('pageChange')
    },
  },
}