guoyuji
2023-12-27 6465284c2be13a30785c8dccc7c2eba3b52d5a46
north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue
@@ -1,20 +1,10 @@
<template>
  <div style="width: 100%;height: 100%;">
  <div style="width: 100%;height: 100%;" >
    <!-- 正常区域的框 -->
    <div class="vxe-table--cell-area" ref="cellarea">
      <span class="vxe-table--cell-main-area"></span>
      <span class="vxe-table--cell-active-area"></span>
    </div>
    <!-- 左侧fixed区域的框 -->
<!--    <div class="vxe-table&#45;&#45;cell-area" ref="leftfixedcellarea">-->
<!--      <span class="vxe-table&#45;&#45;cell-main-area"></span>-->
<!--      <span class="vxe-table&#45;&#45;cell-active-area"></span>-->
<!--    </div>-->
    <!-- 右侧fixed区域的框 -->
<!--    <div class="vxe-table&#45;&#45;cell-area" ref="rightfixedcellarea">-->
<!--      <span class="vxe-table&#45;&#45;cell-main-area"></span>-->
<!--      <span class="vxe-table&#45;&#45;cell-active-area"></span>-->
<!--    </div>-->
    <vxe-grid
        max-height="100%"
        @filter-change="filterChanged"
@@ -22,6 +12,7 @@
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
        @scroll ="scrollEvnt"
    >
<!--      @toolbar-button-click="toolbarButtonClickEvent"-->
@@ -57,11 +48,14 @@
<script lang="ts" setup>
import {ref, reactive, defineEmits, onMounted, nextTick, toRef, watch} from 'vue'
import {VxeGridProps, VXETable} from 'vxe-table'
import scrollEvnt from '@/hook/index'
import request from "@/utils/request"
import deepClone from "@/utils/deepClone";
import {ElMessage} from "element-plus";
import router from "@/router";
//prop接收父组件函数
let props = defineProps({
  tableProp:{
@@ -85,7 +79,7 @@
  list.forEach(item => {
    count += Number(item[field])
  })
  return count
  return count.toFixed(2)
}
const changeFilterEvent = (event, option, $panel,) => {
@@ -111,7 +105,7 @@
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  scrollY:{ enabled: true , gt: 40},//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,