• element 前端排序 与 后端排序


    前端排序 :

           <el-table-column
                      prop="total_fee"
                      sortable :sort-orders="[‘descending‘,‘ascending‘]"
                      align="center"
                      label="收入情况">
                    </el-table-column>

    后端排序;

    1.表格行

     <el-table-column
                      prop="transfer"
                      :sortable="‘custom‘"
                      align="center"
                      label="转账汇款">
                    </el-table-column>

    2.表格 

     <el-table
                    key="3"
                    align="center"
                    v-if="type===1"
                    class="table1"
                    stripe
                    show-summary
                    :summary-method="getSummaries"
                    @sort-change="changeTableSort1"
                    :header-cell-style="headerCellStyle"
                    :data="tableData">

    3.方法

    data  数据 

            // 排序 1: 总金额 2:支付宝 3:微信 4:贝宝 5:转账 6: 退款 7: 定金 8 :尾款
            incomeSort:  {
              "total": 1,
              "ali": 2,
              "wx": 3,
              "paypal": 4,
              "transfer": 5,
              "refund": 6,
              "depositFee": 7,
              "finalPayFee": 8,
            },
      changeTableSort1 (column) {
            this.orderField = column.order === ‘ascending‘ ? -this.incomeSort[column.prop] : (column.order === ‘descending‘ ? this.incomeSort[column.prop] : ‘‘)
            if (this.orderField) {
              this.getListHand()
            }
          },
    this.getListHand() 是后端接口 

    原文:https://www.cnblogs.com/guangzhou11/p/14330471.html

     
  • 相关阅读:
    angular-指令
    microbit 范例课程
    microsoft 为microbit.org 设计的课程
    Microbit 翻译计划及IDE 中文化
    Microbit MicroPython 介绍
    micro:bit 软件生态系统介绍
    Microbit 硬件架构介绍
    TCP协议和UDP协议下的socket
    爬虫-链家二手房
    函数相关
  • 原文地址:https://www.cnblogs.com/javalinux/p/15722090.html
Copyright © 2020-2023  润新知