From 23c8a78cb3bd387c7c609250de41b187105475b5 Mon Sep 17 00:00:00 2001 From: mengshukeji Date: Wed, 16 Dec 2020 17:50:11 +0800 Subject: [PATCH] fix(main canvas): bottom space When hide add button and back to top button,we donot need 80px space bottom --- README-zh.md | 1 + README.md | 1 + docs/about/README.md | 3 ++- docs/zh/about/README.md | 3 ++- docs/zh/guide/config.md | 4 ++-- src/global/rhchInit.js | 8 +++++++- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README-zh.md b/README-zh.md index 2eaac5b..95218f6 100644 --- a/README-zh.md +++ b/README-zh.md @@ -182,6 +182,7 @@ Luckysheet是MIT许可的开源项目,其持续稳定的开发离不开这些 - [@gsw945](https://github.com/gsw945) - [@swen-xiong](https://github.com/swen-xiong) - [@lzmch](https://github.com/lzmch) +- [@kdevilpf](https://github.com/kdevilpf) ## 版权信息 [MIT](http://opensource.org/licenses/MIT) diff --git a/README.md b/README.md index 5841835..f19a503 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,7 @@ Funds donated via Patreon go directly to support mengshukeji's work on Luckyshee - [@gsw945](https://github.com/gsw945) - [@swen-xiong](https://github.com/swen-xiong) - [@lzmch](https://github.com/lzmch) +- [@kdevilpf](https://github.com/kdevilpf) ## License [MIT](http://opensource.org/licenses/MIT) diff --git a/docs/about/README.md b/docs/about/README.md index 0d82f7a..16bcb84 100644 --- a/docs/about/README.md +++ b/docs/about/README.md @@ -20,4 +20,5 @@ Luckysheet is a project led by an individual and jointly developed by several fr - [@TimerGang](https://github.com/TimerGang) - [@gsw945](https://github.com/gsw945) - [@swen-xiong](https://github.com/swen-xiong) -- [@lzmch](https://github.com/lzmch) \ No newline at end of file +- [@lzmch](https://github.com/lzmch) +- [@kdevilpf](https://github.com/kdevilpf) \ No newline at end of file diff --git a/docs/zh/about/README.md b/docs/zh/about/README.md index 4ca550d..7fbf321 100644 --- a/docs/zh/about/README.md +++ b/docs/zh/about/README.md @@ -20,4 +20,5 @@ Luckysheet是由个人主导、几个志同道合的小伙伴一同开发的项 - [@TimerGang](https://github.com/TimerGang) - [@gsw945](https://github.com/gsw945) - [@swen-xiong](https://github.com/swen-xiong) -- [@lzmch](https://github.com/lzmch) \ No newline at end of file +- [@lzmch](https://github.com/lzmch) +- [@kdevilpf](https://github.com/kdevilpf) \ No newline at end of file diff --git a/docs/zh/guide/config.md b/docs/zh/guide/config.md index f0811b3..53ed3e9 100644 --- a/docs/zh/guide/config.md +++ b/docs/zh/guide/config.md @@ -1213,7 +1213,7 @@ Luckysheet开放了更细致的自定义配置选项,分别有 ## 工作簿 ### workbookCreateBefore -(TODO) + - 类型:Function - 默认值:null - 作用:表格创建之前触发。旧的钩子函数叫做`beforeCreateDom` @@ -1222,7 +1222,7 @@ Luckysheet开放了更细致的自定义配置选项,分别有 ------------ ### workbookCreateAfter -(TODO) + - 类型:Function - 默认值:null - 作用:表格创建之后触发 diff --git a/src/global/rhchInit.js b/src/global/rhchInit.js index e4673e6..35fb1bf 100644 --- a/src/global/rhchInit.js +++ b/src/global/rhchInit.js @@ -25,7 +25,13 @@ export default function rhchInit(rowheight, colwidth) { Store.visibledatarow.push(Store.rh_height); //行的临时长度分布 } - Store.rh_height += 80; //最底部增加空白 + // 如果增加行和回到顶部按钮隐藏,则减少底部空白区域,但是预留足够空间给单元格下拉按钮 + if(!luckysheetConfigsetting.enableAddRow && !luckysheetConfigsetting.enableAddBackTop){ + Store.rh_height += 29; + }else{ + Store.rh_height += 80; //最底部增加空白 + } + } //列宽