提交 1d7608ee 作者: Vben

fix(table): ensure that the height calculation is correct close #395

上级 7c16c2fa
## Wip ## Wip
### ✨ Features
- 路由新增 hideChildrenInMenu 配置。用于隐藏子菜单
### ✨ Refactor ### ✨ Refactor
- 重构路由多层模式,解决嵌套 keepalive 执行多次问题 - 重构路由多层模式,解决嵌套 keepalive 执行多次问题
...@@ -8,6 +12,11 @@ ...@@ -8,6 +12,11 @@
- 确保 CountDownInput 组件重置清空值 - 确保 CountDownInput 组件重置清空值
- 修复分割模式下在小屏幕中显示问题 - 修复分割模式下在小屏幕中显示问题
- 修复表格高度计算问题
- 修复后台路由获取不到组件问题
- 修复 Modal 组件 loadingTip 配置不生效
- 修复后台权限指令不生效
- 确保 progress 进度条正确关闭
## 2.1.0 (2021-03-15) ## 2.1.0 (2021-03-15)
......
...@@ -17,7 +17,7 @@ import { configThemePlugin } from './theme'; ...@@ -17,7 +17,7 @@ import { configThemePlugin } from './theme';
import { configImageminPlugin } from './imagemin'; import { configImageminPlugin } from './imagemin';
import { configWindiCssPlugin } from './windicss'; import { configWindiCssPlugin } from './windicss';
import { configSvgIconsPlugin } from './svgSprite'; import { configSvgIconsPlugin } from './svgSprite';
// import { configHmrPlugin } from './hmr'; import { configHmrPlugin } from './hmr';
export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
const { VITE_USE_IMAGEMIN, VITE_USE_MOCK, VITE_LEGACY, VITE_BUILD_COMPRESS } = viteEnv; const { VITE_USE_IMAGEMIN, VITE_USE_MOCK, VITE_LEGACY, VITE_BUILD_COMPRESS } = viteEnv;
...@@ -30,7 +30,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { ...@@ -30,7 +30,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
]; ];
// TODO // TODO
// !isBuild && vitePlugins.push(configHmrPlugin()); !isBuild && vitePlugins.push(configHmrPlugin());
// @vitejs/plugin-legacy // @vitejs/plugin-legacy
VITE_LEGACY && isBuild && vitePlugins.push(legacy()); VITE_LEGACY && isBuild && vitePlugins.push(legacy());
......
...@@ -87,7 +87,6 @@ export function useTableScroll( ...@@ -87,7 +87,6 @@ export function useTableScroll(
// Table height from bottom height-custom offset // Table height from bottom height-custom offset
const paddingHeight = 32; const paddingHeight = 32;
const borderHeight = 0;
// Pager height // Pager height
let paginationHeight = 2; let paginationHeight = 2;
if (!isBoolean(pagination)) { if (!isBoolean(pagination)) {
...@@ -99,6 +98,8 @@ export function useTableScroll( ...@@ -99,6 +98,8 @@ export function useTableScroll(
// TODO First fix 24 // TODO First fix 24
paginationHeight += 24; paginationHeight += 24;
} }
} else {
paginationHeight = -8;
} }
let footerHeight = 0; let footerHeight = 0;
...@@ -120,7 +121,6 @@ export function useTableScroll( ...@@ -120,7 +121,6 @@ export function useTableScroll(
bottomIncludeBody - bottomIncludeBody -
(resizeHeightOffset || 0) - (resizeHeightOffset || 0) -
paddingHeight - paddingHeight -
borderHeight -
paginationHeight - paginationHeight -
footerHeight - footerHeight -
headerHeight; headerHeight;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
} }
.ant-table-wrapper { .ant-table-wrapper {
padding: 8px; padding: 6px;
background: #fff; background: #fff;
border-radius: 2px; border-radius: 2px;
......
<template> <template>
<div> <RouterView>
<RouterView> <template #default="{ Component, route }">
<template #default="{ Component, route }"> <transition
<transition :name="
:name=" getTransitionName({
getTransitionName({ route,
route, openCache,
openCache, enableTransition: getEnableTransition,
enableTransition: getEnableTransition, cacheTabs: getCaches,
cacheTabs: getCaches, def: getBasicTransition,
def: getBasicTransition, })
}) "
" mode="out-in"
mode="out-in" appear
appear >
> <keep-alive v-if="openCache" :include="getCaches">
<keep-alive v-if="openCache" :include="getCaches"> <component :is="Component" :key="route.fullPath" />
<component :is="Component" :key="route.fullPath" /> </keep-alive>
</keep-alive> <component v-else :is="Component" :key="route.fullPath" />
<component v-else :is="Component" :key="route.fullPath" /> </transition>
</transition> </template>
</template> </RouterView>
</RouterView> <FrameLayout v-if="getCanEmbedIFramePage" />
<FrameLayout v-if="getCanEmbedIFramePage" />
</div>
</template> </template>
<script lang="ts"> <script lang="ts">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论