haoxuan
2024-04-09 4bf10a1ba42ddaeab565c105b376c5732b0f3dab
src/components/makepager/TableCommonView.vue
@@ -39,6 +39,17 @@
        :fixed="item.fixed"
        v-if="item.isShowColumn"
      >
      <template slot="header">
          {{ item.label }}
          <span v-if="item.iconRight">
            <i
              :class="item.iconRight"
              style="font-size: 16px; margin-left: 5px; cursor: pointer"
              @click="handleShow(item)"
            ></i>
          </span>
        </template>
        <template slot-scope="scope">
          <span v-if="item.price">{{ "¥" + number_format(scope.row[item.prop], 2, ".", ",") }}</span>
          <div v-else-if="item.status" :class="scope.row.status">{{ scope.row[item.prop] }}</div>
@@ -412,7 +423,11 @@
      } else {
        return false
      }
    }
    },
    // 自定义表头点击事件
    handleShow(item) {
      this.$emit("handleShow", item);
    },
  }
}
</script>