Explorar el Código

fix: BsUi-基础表格组件修改

hanxiaohui hace 7 meses
padre
commit
7295347b4a
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 4 2
      src/components/BsUi/Table/Table.vue
  2. 0 2
      src/components/BsUi/Table/index.js

+ 4 - 2
src/components/BsUi/Table/Table.vue

@@ -1,5 +1,5 @@
 <template>
-  <vxe-grid class="wrapper" v-bind="gridOptions" ref="gridRef" v-fullscreen>
+  <vxe-grid class="wrapper" v-bind="gridOptions" ref="gridRef" v-fullscreen :style="{height: isFixed ? `calc(100vh - 101px)` : '100%'}">
     <template #form>
       <Search
         v-if="searchConfig && searchConfig.enable && searchConfig?.fields && searchConfig?.data"
@@ -90,7 +90,7 @@
     </template>
 
     <template #pager>
-      <div :class="`pager ${(!has(pagerConfig, 'isFixed') || pagerConfig.isFixed) && false ? 'page_fixed' : '' }`" v-if="pagerConfig && pagerConfig.enable">
+      <div :class="`pager ${(!has(pagerConfig, 'isFixed') || pagerConfig.isFixed) ? 'page_fixed' : '' }`" v-if="pagerConfig && pagerConfig.enable">
         <Pagination :pagerConfig="pagerConfig" />
       </div>
     </template>
@@ -122,6 +122,8 @@
   import {DISPLAY_STATE} from "/@/components/BsUi/constant.js";
   const props = defineProps(['gridOptions', 'searchConfig', 'pagerConfig', 'toolbarConfig', 'getGridRef', 'mounted', 'toolbarTopConfig']);
 
+  const isFixed = get(props.pagerConfig,'isFixed', true)
+
   const $slots = useSlots();
 
   const gridRef = ref(null);

+ 0 - 2
src/components/BsUi/Table/index.js

@@ -10,8 +10,6 @@ export const useBsTable = (options, tableRef) => {
 
   const initGridOptions = () => {
 
-    const isFixed = get(tableOptions,'pagerConfig.isFixed', true)
-
     const seqCol = tableOptions?.gridOptions.columns.find(v => ['seq', 'check', 'radio'].includes(v.type));
     const optCol =  tableOptions?.gridOptions.columns.find(v => v?.cellRender && v.cellRender.name === 'CellOption');
     // 操作初始化