From 5983cb015e092e2edc1d3f27dba2d585fb4db099 Mon Sep 17 00:00:00 2001 From: dushusir <1414556676@qq.com> Date: Tue, 22 Dec 2020 17:56:57 +0800 Subject: [PATCH] fix(feature): functionButton 1.fix functionButton 2.remove undefined request 3.add rangePasteBefore hook fix #336 fix #381 --- docs/guide/api.md | 10 ++++++++++ docs/zh/guide/api.md | 12 ++++++++++++ src/controllers/constant.js | 17 +++++++++-------- src/controllers/handler.js | 6 ++++++ src/css/luckysheet-core.css | 2 +- src/global/method.js | 3 +++ src/index.html | 6 +++++- 7 files changed, 46 insertions(+), 10 deletions(-) diff --git a/docs/guide/api.md b/docs/guide/api.md index f21dfe4..4a48752 100644 --- a/docs/guide/api.md +++ b/docs/guide/api.md @@ -319,6 +319,16 @@ Use note: Pay special attention to the setting of `range` in `setting` only when `isRange` is set to `true`, which is different from the general range format. + If you want to use this API to set the freeze after the workbook is initialized, you can execute it in the hook function after the workbook is created, such as: + ```js + luckysheet.create({ + hook:{ + workbookCreateAfter:function(){ + luckysheet.setBothFrozen(false); + } + } + }); + - **Usage**: - Frozen ranks diff --git a/docs/zh/guide/api.md b/docs/zh/guide/api.md index f20295c..6535c57 100644 --- a/docs/zh/guide/api.md +++ b/docs/zh/guide/api.md @@ -320,6 +320,18 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开 冻结行列操作 特别注意,只有在`isRange`设置为`true`的时候,才需要设置`setting`中的`range`,且与一般的range格式不同。 + + 如果想在工作簿初始化后使用此API设置冻结,可以在工作簿创建后的钩子函数中执行,比如: + ```js + luckysheet.create({ + hook:{ + workbookCreateAfter:function(){ + luckysheet.setBothFrozen(false); + } + } + }); + + ``` - **示例**: diff --git a/src/controllers/constant.js b/src/controllers/constant.js index aade632..67b6d9a 100644 --- a/src/controllers/constant.js +++ b/src/controllers/constant.js @@ -7,7 +7,7 @@ const gridHTML = function(){ const _locale = locale(); const locale_info = _locale.info; const locale_print = _locale.print; - const userInfo = luckysheetConfigsetting.userInfo === true ? ' Lucky' : luckysheetConfigsetting.userInfo; // When true, use the default HTML string + const userInfo = luckysheetConfigsetting.userInfo === true ? ' Lucky' : luckysheetConfigsetting.userInfo; // When true, use the default HTML string. The rendering of userInfo below uses nested template strings. Otherwise, when display is used and the image path is not passed in, there will be an undefined request return `