yangfeng
2023-07-07 e34c2e67208bd63e320a4504ce8cf40a83ba7cbb
src/components/makepager/TableCommonView.vue
@@ -21,10 +21,12 @@
        :label="item.label"
        :width="item.width"
        :min-width="item.min"
        show-overflow-tooltip="true"
        sortable
      >
        <template slot-scope="scope">
          <span v-if="item.price">{{ "¥" + number_format(scope.row[item.prop], 2, ".", ",") }}</span>
          <span v-else-if="item.status" :class="scope.row.status">{{ scope.row[item.prop] }}</span>
          <span v-else>{{ scope.row[item.prop] }}</span>
        </template>
      </el-table-column>
@@ -93,7 +95,6 @@
    getSummaries(param) {
      if (this.showSummary.show) {
        const { columns, data } = param
        console.log(param)
        const sums = []
        columns.forEach((column, index) => {
          if (index === this.showSummary.mergeNumber) {
@@ -116,7 +117,7 @@
        return sums
      }
    },
    //定义number_format方法
    // 数字换行为金额显示格式
    number_format(number, decimals, dec_point, thousands_sep) {
      decimals = 2 //这里默认设置保留两位小数,也可以注释这句采用传入的参数
      /*
@@ -154,6 +155,12 @@
  margin-top: 20px;
  margin-right: 10px;
  margin-bottom: 40px;
  .blue {
    padding: 10px;
    color: #fff;
    background-color: blue;
    border-radius: 4px;
  }
}
::v-deep {
  .el-table__footer-wrapper tbody td.el-table__cell {