/*
 * 为table处理的mixins
 * 列表页面中使用到多次复用的mixins
 */
const tableMixins = {
  methods: {
    handleSearch() {
      this.searchData.PageIndex = 1
      this.getList()
    },
    sortByColumn(column) {
      if (column.order === 'ascending') {
        this.searchData.Asc = true
      } else {
        this.searchData.Asc = false
      }
      this.searchData.SortField = column.prop
      this.searchData.PageIndex = 1
      this.getList()
    }
  }
}
export default tableMixins
