Commit 1d7608ee40c27ce81e031947ed6c679cc8b04c77
1 parent
7c16c2fa
fix(table): ensure that the height calculation is correct close #395
Showing
5 changed files
with
37 additions
and
30 deletions
CHANGELOG.zh_CN.md
1 | ## Wip | 1 | ## Wip |
2 | 2 | ||
3 | +### ✨ Features | ||
4 | + | ||
5 | +- 路由新增 hideChildrenInMenu 配置。用于隐藏子菜单 | ||
6 | + | ||
3 | ### ✨ Refactor | 7 | ### ✨ Refactor |
4 | 8 | ||
5 | - 重构路由多层模式,解决嵌套 keepalive 执行多次问题 | 9 | - 重构路由多层模式,解决嵌套 keepalive 执行多次问题 |
@@ -8,6 +12,11 @@ | @@ -8,6 +12,11 @@ | ||
8 | 12 | ||
9 | - 确保 CountDownInput 组件重置清空值 | 13 | - 确保 CountDownInput 组件重置清空值 |
10 | - 修复分割模式下在小屏幕中显示问题 | 14 | - 修复分割模式下在小屏幕中显示问题 |
15 | +- 修复表格高度计算问题 | ||
16 | +- 修复后台路由获取不到组件问题 | ||
17 | +- 修复 Modal 组件 loadingTip 配置不生效 | ||
18 | +- 修复后台权限指令不生效 | ||
19 | +- 确保 progress 进度条正确关闭 | ||
11 | 20 | ||
12 | ## 2.1.0 (2021-03-15) | 21 | ## 2.1.0 (2021-03-15) |
13 | 22 |
build/vite/plugin/index.ts
@@ -17,7 +17,7 @@ import { configThemePlugin } from './theme'; | @@ -17,7 +17,7 @@ import { configThemePlugin } from './theme'; | ||
17 | import { configImageminPlugin } from './imagemin'; | 17 | import { configImageminPlugin } from './imagemin'; |
18 | import { configWindiCssPlugin } from './windicss'; | 18 | import { configWindiCssPlugin } from './windicss'; |
19 | import { configSvgIconsPlugin } from './svgSprite'; | 19 | import { configSvgIconsPlugin } from './svgSprite'; |
20 | -// import { configHmrPlugin } from './hmr'; | 20 | +import { configHmrPlugin } from './hmr'; |
21 | 21 | ||
22 | export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { | 22 | export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { |
23 | const { VITE_USE_IMAGEMIN, VITE_USE_MOCK, VITE_LEGACY, VITE_BUILD_COMPRESS } = viteEnv; | 23 | 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) { | ||
30 | ]; | 30 | ]; |
31 | 31 | ||
32 | // TODO | 32 | // TODO |
33 | - // !isBuild && vitePlugins.push(configHmrPlugin()); | 33 | + !isBuild && vitePlugins.push(configHmrPlugin()); |
34 | 34 | ||
35 | // @vitejs/plugin-legacy | 35 | // @vitejs/plugin-legacy |
36 | VITE_LEGACY && isBuild && vitePlugins.push(legacy()); | 36 | VITE_LEGACY && isBuild && vitePlugins.push(legacy()); |
src/components/Table/src/hooks/useTableScroll.ts
@@ -87,7 +87,6 @@ export function useTableScroll( | @@ -87,7 +87,6 @@ export function useTableScroll( | ||
87 | // Table height from bottom height-custom offset | 87 | // Table height from bottom height-custom offset |
88 | 88 | ||
89 | const paddingHeight = 32; | 89 | const paddingHeight = 32; |
90 | - const borderHeight = 0; | ||
91 | // Pager height | 90 | // Pager height |
92 | let paginationHeight = 2; | 91 | let paginationHeight = 2; |
93 | if (!isBoolean(pagination)) { | 92 | if (!isBoolean(pagination)) { |
@@ -99,6 +98,8 @@ export function useTableScroll( | @@ -99,6 +98,8 @@ export function useTableScroll( | ||
99 | // TODO First fix 24 | 98 | // TODO First fix 24 |
100 | paginationHeight += 24; | 99 | paginationHeight += 24; |
101 | } | 100 | } |
101 | + } else { | ||
102 | + paginationHeight = -8; | ||
102 | } | 103 | } |
103 | 104 | ||
104 | let footerHeight = 0; | 105 | let footerHeight = 0; |
@@ -120,7 +121,6 @@ export function useTableScroll( | @@ -120,7 +121,6 @@ export function useTableScroll( | ||
120 | bottomIncludeBody - | 121 | bottomIncludeBody - |
121 | (resizeHeightOffset || 0) - | 122 | (resizeHeightOffset || 0) - |
122 | paddingHeight - | 123 | paddingHeight - |
123 | - borderHeight - | ||
124 | paginationHeight - | 124 | paginationHeight - |
125 | footerHeight - | 125 | footerHeight - |
126 | headerHeight; | 126 | headerHeight; |
src/components/Table/src/style/index.less
src/layouts/page/index.vue
1 | <template> | 1 | <template> |
2 | - <div> | ||
3 | - <RouterView> | ||
4 | - <template #default="{ Component, route }"> | ||
5 | - <transition | ||
6 | - :name=" | ||
7 | - getTransitionName({ | ||
8 | - route, | ||
9 | - openCache, | ||
10 | - enableTransition: getEnableTransition, | ||
11 | - cacheTabs: getCaches, | ||
12 | - def: getBasicTransition, | ||
13 | - }) | ||
14 | - " | ||
15 | - mode="out-in" | ||
16 | - appear | ||
17 | - > | ||
18 | - <keep-alive v-if="openCache" :include="getCaches"> | ||
19 | - <component :is="Component" :key="route.fullPath" /> | ||
20 | - </keep-alive> | ||
21 | - <component v-else :is="Component" :key="route.fullPath" /> | ||
22 | - </transition> | ||
23 | - </template> | ||
24 | - </RouterView> | ||
25 | - <FrameLayout v-if="getCanEmbedIFramePage" /> | ||
26 | - </div> | 2 | + <RouterView> |
3 | + <template #default="{ Component, route }"> | ||
4 | + <transition | ||
5 | + :name=" | ||
6 | + getTransitionName({ | ||
7 | + route, | ||
8 | + openCache, | ||
9 | + enableTransition: getEnableTransition, | ||
10 | + cacheTabs: getCaches, | ||
11 | + def: getBasicTransition, | ||
12 | + }) | ||
13 | + " | ||
14 | + mode="out-in" | ||
15 | + appear | ||
16 | + > | ||
17 | + <keep-alive v-if="openCache" :include="getCaches"> | ||
18 | + <component :is="Component" :key="route.fullPath" /> | ||
19 | + </keep-alive> | ||
20 | + <component v-else :is="Component" :key="route.fullPath" /> | ||
21 | + </transition> | ||
22 | + </template> | ||
23 | + </RouterView> | ||
24 | + <FrameLayout v-if="getCanEmbedIFramePage" /> | ||
27 | </template> | 25 | </template> |
28 | 26 | ||
29 | <script lang="ts"> | 27 | <script lang="ts"> |