Browse Source

docs(update): readme

1.readme add LuckyResources and How to contribution 2.config.md add hook function
master
mengshukeji 5 years ago
parent
commit
bbdfb0945a
  1. 22
      README-zh.md
  2. 19
      README.md
  3. 23
      deploy.bat
  4. 54
      docs/guide/config.md
  5. 4
      docs/guide/resource.md
  6. 2
      docs/zh/guide/README.md
  7. 65
      docs/zh/guide/config.md
  8. 4
      docs/zh/guide/resource.md
  9. 1
      src/controllers/constant.js
  10. 5
      src/controllers/sheetmanage.js

22
README-zh.md

@ -13,9 +13,9 @@
> Luckysheet最近参加了“2020年度OSC中国开源项目评选”,为了支持Luckysheet更好的得到关注和发展,请大家帮忙投票: [https://www.oschina.net/p/luckysheet](https://www.oschina.net/p/luckysheet)。 > Luckysheet最近参加了“2020年度OSC中国开源项目评选”,为了支持Luckysheet更好的得到关注和发展,请大家帮忙投票: [https://www.oschina.net/p/luckysheet](https://www.oschina.net/p/luckysheet)。
## 相关链接 ## 相关链接
| 源码 | 文档 | Demo | 插件Demo | 论坛 | | 源码 | 文档 | Demo | 插件Demo | 论坛 | 资源 |
| ------ | -------- | ------ | ------ | ------ | | ------ | -------- | ------ | ------ | ------ | ------ |
| [Github](https://github.com/mengshukeji/Luckysheet)| [在线文档](https://mengshukeji.github.io/LuckysheetDocs/zh/) | [在线Demo](https://mengshukeji.github.io/LuckysheetDemo) | [导入Excel Demo](https://mengshukeji.github.io/LuckyexcelDemo/) | [中文论坛](https://support.qq.com/product/288322) | | [Github](https://github.com/mengshukeji/Luckysheet)| [在线文档](https://mengshukeji.github.io/LuckysheetDocs/zh/) | [在线Demo](https://mengshukeji.github.io/LuckysheetDemo) | [导入Excel Demo](https://mengshukeji.github.io/LuckyexcelDemo/) | [中文论坛](https://support.qq.com/product/288322) | [LuckyResources](https://github.com/mengshukeji/LuckyResources) |
| [Gitee镜像](https://gitee.com/mengshukeji/Luckysheet)| [Gitee在线文档](https://mengshukeji.gitee.io/LuckysheetDocs/zh/) | [Gitee在线Demo](https://mengshukeji.gitee.io/luckysheetdemo/) | [Gitee导入Excel Demo](https://mengshukeji.gitee.io/luckyexceldemo/) | [Google Group](https://groups.google.com/g/luckysheet) | | [Gitee镜像](https://gitee.com/mengshukeji/Luckysheet)| [Gitee在线文档](https://mengshukeji.gitee.io/LuckysheetDocs/zh/) | [Gitee在线Demo](https://mengshukeji.gitee.io/luckysheetdemo/) | [Gitee导入Excel Demo](https://mengshukeji.gitee.io/luckyexceldemo/) | [Google Group](https://groups.google.com/g/luckysheet) |
@ -35,7 +35,7 @@
+ **数据类型** + **数据类型**
+ **货币, 百分比, 数字, 日期** + **货币, 百分比, 数字, 日期**
+ **Custom** (和excel保持一致,例如: `##,###0.00` , `$1,234.56$##,###0.00_);[Red]($##,###0.00)`, `_($* ##,###0.00_);_(...($* "-"_);_(@_)`, `08-05 PM 01:30MM-dd AM/PM hh:mm` ) + **Custom** (和excel保持一致,例如: `##,###0.00` , `$1,234.56$##,###0.00_);[Red]($##,###0.00)`, `_($* ##,###0.00_);_(...($* "-"_);_(@_)`, `08-05 PM 01:30MM-dd AM/PM hh:mm` )
+ **单元格内多样式** (Alt+Enter单元格内换行、上标、下标、单元格内定义每个文字的不同样式) + **单元格内多样式** (Alt+Enter单元格内换行、上标、下标、单元格内定义每个文字的不同样式)
### 🧬单元格 ### 🧬单元格
+ **拖拽选取来修改单元格** (对选区进行操作,可以拖动四边来移动选区,也可以在右下角对选区进行下拉填充操作) + **拖拽选取来修改单元格** (对选区进行操作,可以拖动四边来移动选区,也可以在右下角对选区进行下拉填充操作)
@ -167,19 +167,11 @@ npm run build
- [excelize](https://github.com/360EntSecGroup-Skylar/excelize) - [excelize](https://github.com/360EntSecGroup-Skylar/excelize)
- [h5-Dooring](https://github.com/MrXujiang/h5-Dooring) - [h5-Dooring](https://github.com/MrXujiang/h5-Dooring)
## 加入共建 ## 贡献
1. 任何疑问或者建议,欢迎提交[Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose) 1. 任何疑问或者建议,欢迎提交[Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose)
2. 如果您想为 Luckysheet 实现一个重要功能,需要先撰写 RFC 文档,按照Luckysheet的 [RFC](https://github.com/mengshukeji/Luckysheet-rfcs) 机制进行操作,在经过社区讨论完善后才可以进行代码的提交。 2. 详细了解:[如何参与贡献](https://github.com/mengshukeji/Luckysheet/issues/128)
3. 如果您对Luckysheet感兴趣,非常欢迎加入开发组,一起来完善这个插件(下方扫码添加小编微信备注:共建),有4类任务可以认领
- BUG修复
- 新功能添加
- 文档
- 推广
您将收获:
- Luckysheet官方readme文档贡献者链接
- 参与大型开源项目,技术和视野提升
## 交流 ## 交流

19
README.md

@ -16,9 +16,9 @@ English| [简体中文](./README-zh.md)
🚀Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source. 🚀Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.
## Links ## Links
| Source Code | Documentation | Demo | Plugins Demo | Forum | | Source Code | Documentation | Demo | Plugins Demo | Forum | Resources |
| ------ | -------- | ------ | ------ | ------ | | ------ | -------- | ------ | ------ | ------ | ------ |
| [Github](https://github.com/mengshukeji/Luckysheet)| [Online Documentation](https://mengshukeji.github.io/LuckysheetDocs/) | [Online Demo](https://mengshukeji.github.io/LuckysheetDemo) | [Import Excel Demo](https://mengshukeji.github.io/LuckyexcelDemo/) | [Chinese Forum](https://support.qq.com/product/288322) | | [Github](https://github.com/mengshukeji/Luckysheet)| [Online Documentation](https://mengshukeji.github.io/LuckysheetDocs/) | [Online Demo](https://mengshukeji.github.io/LuckysheetDemo) | [Import Excel Demo](https://mengshukeji.github.io/LuckyexcelDemo/) | [Chinese Forum](https://support.qq.com/product/288322) | [LuckyResources](https://github.com/mengshukeji/LuckyResources) |
| [Gitee Mirror](https://gitee.com/mengshukeji/Luckysheet)| [Gitee Online Documentation](https://mengshukeji.gitee.io/LuckysheetDocs/) | [Gitee Online Demo](https://mengshukeji.gitee.io/luckysheetdemo/) | [Gitee Import Excel Demo](https://mengshukeji.gitee.io/luckyexceldemo/) | [Google Group](https://groups.google.com/g/luckysheet) | | [Gitee Mirror](https://gitee.com/mengshukeji/Luckysheet)| [Gitee Online Documentation](https://mengshukeji.gitee.io/LuckysheetDocs/) | [Gitee Online Demo](https://mengshukeji.gitee.io/luckysheetdemo/) | [Gitee Import Excel Demo](https://mengshukeji.gitee.io/luckyexceldemo/) | [Google Group](https://groups.google.com/g/luckysheet) |
![Demo](/docs/.vuepress/public/img/LuckysheetDemo.gif) ![Demo](/docs/.vuepress/public/img/LuckysheetDemo.gif)
@ -168,19 +168,10 @@ Create a table
- [excelize](https://github.com/360EntSecGroup-Skylar/excelize) - [excelize](https://github.com/360EntSecGroup-Skylar/excelize)
- [h5-Dooring](https://github.com/MrXujiang/h5-Dooring) - [h5-Dooring](https://github.com/MrXujiang/h5-Dooring)
## Co-construction ## Contribution
1. Any questions or suggestions are welcome to submit [Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose) 1. Any questions or suggestions are welcome to submit [Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose)
2. If you want to implement an important function for Luckysheet, you need to write an RFC document first, follow Luckysheet's [RFC](https://github.com/mengshukeji/Luckysheet-rfcs) mechanism to operate, and only after community discussion and improvement, you can submit the code. 2. Learn more:[How to contribute](https://github.com/mengshukeji/Luckysheet/issues/128)
3. If you are interested in Luckysheet, you are very welcome to join the development team to improve this plugin together (Email: alexads@foxmail.com), there are 4 types of tasks that can be claimed
- BUG
- New features
- Documentation
- Popularize
You will gain:
- Luckysheet official readme document contributor link
- Participate in large open source projects, improve technology and vision
## Communication ## Communication

23
deploy.bat

@ -7,6 +7,8 @@ git add .
git commit -m 'deploy Luckysheet demo' git commit -m 'deploy Luckysheet demo'
git push -f origin master:gh-pages git push -f origin master:gh-pages
# ===============================================
# deploy Docs # deploy Docs
npm run docs:build npm run docs:build
cd docs/.vuepress/dist cd docs/.vuepress/dist
@ -16,6 +18,8 @@ git add .
git commit -m 'deploy Luckysheet docs' git commit -m 'deploy Luckysheet docs'
git push -f origin master:gh-pages git push -f origin master:gh-pages
# ===============================================
# replease # replease
npm run build npm run build
npm run release -- --release-as patch npm run release -- --release-as patch
@ -29,3 +33,22 @@ npm run commit
npm version patch npm version patch
git push -u origin master git push -u origin master
npm publish npm publish
# ===============================================
# test pull request: https://docs.github.com/cn/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally
# 139 is ID, dev is branch name
git fetch origin pull/139/head:dev
git checkout dev
# test code
git push origin dev
# create new PR ,merge dev to master
# list all remote and local branchs
git branch -a
# delete remote branch
git push origin --delete dev
git checkout master
# delete local branch
git branch -d dev

54
docs/guide/config.md

@ -544,6 +544,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### cellEditBefore ### cellEditBefore
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: Triggered after double-clicking the cell, that is, when double-clicking the cell to edit the content, this method is triggered first - Usage: Triggered after double-clicking the cell, that is, when double-clicking the cell to edit the content, this method is triggered first
@ -553,10 +554,11 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
- {Object} [v]: Cell object - {Object} [v]: Cell object
------------ ------------
### cellEditAfter ### cellExitEditBefore
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: Triggered after double-clicking the cell, that is, when double-clicking the cell to edit the content, this method is finally triggered - Usage: Exit the cell editing state, which is triggered before saving the cell value
- Parameter: - Parameter:
- {Number} [r]: Row number of cell - {Number} [r]: Row number of cell
- {Number} [c]: Column number of cell - {Number} [c]: Column number of cell
@ -730,12 +732,14 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
## Worksheet ## Worksheet
### sheetCreatekBefore ### sheetCreatekBefore
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: Triggered before the worksheet is created, the new worksheet also includes the new pivot table - Usage: Triggered before the worksheet is created, the new worksheet also includes the new pivot table
------------ ------------
### sheetCreateAfter ### sheetCreateAfter
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: Triggered after the worksheet is created, the new worksheet also includes the new pivot table - Usage: Triggered after the worksheet is created, the new worksheet also includes the new pivot table
@ -744,6 +748,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### sheetMoveBefore ### sheetMoveBefore
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: Before the worksheet is moved - Usage: Before the worksheet is moved
@ -753,6 +758,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### sheetMoveAfter ### sheetMoveAfter
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: After the worksheet is moved - Usage: After the worksheet is moved
@ -763,6 +769,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### sheetDeleteBefore ### sheetDeleteBefore
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: Before the worksheet is deleted - Usage: Before the worksheet is deleted
@ -771,6 +778,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### sheetDeleteAfter ### sheetDeleteAfter
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: After the worksheet is deleted - Usage: After the worksheet is deleted
@ -779,6 +787,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### sheetEditNameBefore ### sheetEditNameBefore
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: Before changing the name of the worksheet - Usage: Before changing the name of the worksheet
@ -788,6 +797,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### sheetEditNameAfter ### sheetEditNameAfter
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: After changing the name of the worksheet - Usage: After changing the name of the worksheet
@ -798,6 +808,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### sheetEditColorBefore ### sheetEditColorBefore
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: Before changing the color of the worksheet - Usage: Before changing the color of the worksheet
@ -807,6 +818,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### sheetEditColorAfter ### sheetEditColorAfter
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: After changing the color of the worksheet - Usage: After changing the color of the worksheet
@ -817,6 +829,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### sheetZoomBefore ### sheetZoomBefore
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: Before worksheet zoom - Usage: Before worksheet zoom
@ -826,6 +839,7 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------ ------------
### sheetZoomAfter ### sheetZoomAfter
(TODO)
- Type: Function - Type: Function
- Default: null - Default: null
- Usage: After worksheet zoom - Usage: After worksheet zoom
@ -834,6 +848,42 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
- {String} [oldZoom]: Before modification, the current worksheet zoom ratio - {String} [oldZoom]: Before modification, the current worksheet zoom ratio
- {String} [newZoom]: After modification, the current worksheet zoom ratio - {String} [newZoom]: After modification, the current worksheet zoom ratio
------------
### sheetActivateBefore
(TODO)
- Type: Function
- Default: null
- Usage:Before worksheet activate
- Parameter:
- {Number} [i]: `index` of current worksheet
------------
### sheetActivateAfter
(TODO)
- Type: Function
- Default: null
- Usage:After worksheet activate
- Parameter:
- {Number} [i]: `index` of current worksheet
------------
### sheetDeactivateBefore
(TODO)
- Type: Function
- Default: null
- Usage:Before the worksheet changes from active to inactive
- Parameter:
- {Number} [i]: `index` of current worksheet
------------
### sheetDeactivateAfter
(TODO)
- Type: Function
- Default: null
- Usage:After the worksheet is changed from active to inactive
- Parameter:
- {Number} [i]: `index` of current worksheet
------------ ------------
## Workbook ## Workbook

4
docs/guide/resource.md

@ -8,14 +8,14 @@ If you have written or found an excellent tutorial and want to recommend it to u
- [How Luckysheet initializes the data with merged cells](https://www.cnblogs.com/DuShuSir/p/13272397.html)[Pending translation] - [How Luckysheet initializes the data with merged cells](https://www.cnblogs.com/DuShuSir/p/13272397.html)[Pending translation]
- [How Luckysheet saves the data in the table to the database](https://www.cnblogs.com/DuShuSir/p/13857874.html)[Pending translation] - [How Luckysheet saves the data in the table to the database](https://www.cnblogs.com/DuShuSir/p/13857874.html)[Pending translation]
- [Case of introducing Luckysheet into local HTML using CDN loading](https://www.cnblogs.com/DuShuSir/p/13859103.html)[Pending translation] - [Case of introducing Luckysheet into local HTML using CDN loading](https://www.cnblogs.com/DuShuSir/p/13859103.html)[Pending translation]
- [Basic usage of Luckysheet, use `loadUrl` to load server data](https://blog.csdn.net/DCDC2020/article/details/108486525)
## Collaborative editing background ## Back-end
### Community Case ### Community Case
- [Luckysheet save and restore](https://gitee.com/ichiva/luckysheet-saved-in-recovery) (Java version) - [Luckysheet save and restore](https://gitee.com/ichiva/luckysheet-saved-in-recovery) (Java version)
- [Online form for collaborative editing based on Luckysheet](https://github.com/DilemmaVi/ecsheet) (Java version) - [Online form for collaborative editing based on Luckysheet](https://github.com/DilemmaVi/ecsheet) (Java version)
## Learning Materials ## Learning Materials
- [How to build a web data analysis report from 0 to 1](https://github.com/mengshukeji/LuckyResources/blob/master/ppt/%E5%A6%82%E4%BD%95%E4%BB%8E0%E5%88%B01%E6%90%AD%E5%BB%BA%20Web%20%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%E6%8A%A5%E8%A1%A8.pptx)[Pending translation] - [How to build a web data analysis report from 0 to 1](https://github.com/mengshukeji/LuckyResources/blob/master/ppt/%E5%A6%82%E4%BD%95%E4%BB%8E0%E5%88%B01%E6%90%AD%E5%BB%BA%20Web%20%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%E6%8A%A5%E8%A1%A8.pptx)[Pending translation]

2
docs/zh/guide/README.md

@ -18,7 +18,7 @@ Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置
+ **数据类型** + **数据类型**
+ **货币, 百分比, 数字, 日期** + **货币, 百分比, 数字, 日期**
+ **Custom** (和excel保持一致,例如: `##,###0.00` , `$1,234.56$##,###0.00_);[Red]($##,###0.00)`, `_($* ##,###0.00_);_(...($* "-"_);_(@_)`, `08-05 PM 01:30MM-dd AM/PM hh:mm` ) + **Custom** (和excel保持一致,例如: `##,###0.00` , `$1,234.56$##,###0.00_);[Red]($##,###0.00)`, `_($* ##,###0.00_);_(...($* "-"_);_(@_)`, `08-05 PM 01:30MM-dd AM/PM hh:mm` )
+ **单元格内多样式** (Alt+Enter单元格内换行、上标、下标、单元格内定义每个文字的不同样式) + **单元格内多样式** (Alt+Enter单元格内换行、上标、下标、单元格内定义每个文字的不同样式)
### 🧬单元格 ### 🧬单元格
+ **拖拽选取来修改单元格** (对选区进行操作,可以拖动四边来移动选区,也可以在右下角对选区进行下拉填充操作) + **拖拽选取来修改单元格** (对选区进行操作,可以拖动四边来移动选区,也可以在右下角对选区进行下拉填充操作)

65
docs/zh/guide/config.md

@ -662,11 +662,11 @@ Luckysheet开放了更细致的自定义配置选项,分别有
- {Object} [v]: 单元格对象 - {Object} [v]: 单元格对象
------------ ------------
### cellEditAfter ### cellExitEditBefore
(TODO) (TODO)
- 类型:Function - 类型:Function
- 默认值:null - 默认值:null
- 作用:双击单元格后触发,即在双击单元格编辑内容的时候,最后触发这个方法 - 作用:退出单元格编辑状态,即保存这个单元格值之前触发
- 参数: - 参数:
- {Number} [r]: 单元格所在行数 - {Number} [r]: 单元格所在行数
- {Number} [c]: 单元格所在列数 - {Number} [c]: 单元格所在列数
@ -790,8 +790,8 @@ Luckysheet开放了更细致的自定义配置选项,分别有
- {Object} [sheet]:当前sheet对象 - {Object} [sheet]:当前sheet对象
- {Object} [moveState]:鼠标移动状态,可判断现在鼠标操作的对象,false和true - {Object} [moveState]:鼠标移动状态,可判断现在鼠标操作的对象,false和true
+ {Boolean} [functionResizeStatus]:工具栏拖动 + {Boolean} [functionResizeStatus]:工具栏拖动
+ {Boolean} [horizontalmoveState]:水平冻结分割拖动 + {Boolean} [horizontalmoveState]:水平冻结分割拖动
+ {Boolean} [verticalmoveState]:垂直冻结分割拖动 + {Boolean} [verticalmoveState]:垂直冻结分割拖动
+ {Boolean} [pivotTableMoveState]:数据透视表字段拖动 + {Boolean} [pivotTableMoveState]:数据透视表字段拖动
+ {Boolean} [sheetMoveStatus]:sheet改变你位置拖动 + {Boolean} [sheetMoveStatus]:sheet改变你位置拖动
+ {Boolean} [scrollStatus]:鼠标触发了滚动条移动 + {Boolean} [scrollStatus]:鼠标触发了滚动条移动
@ -826,8 +826,8 @@ Luckysheet开放了更细致的自定义配置选项,分别有
- {Object} [sheet]:当前sheet对象 - {Object} [sheet]:当前sheet对象
- {Object} [moveState]:鼠标移动状态,可判断现在鼠标操作的对象,false和true - {Object} [moveState]:鼠标移动状态,可判断现在鼠标操作的对象,false和true
+ {Boolean} [functionResizeStatus]:工具栏拖动 + {Boolean} [functionResizeStatus]:工具栏拖动
+ {Boolean} [horizontalmoveState]:水平冻结分割拖动 + {Boolean} [horizontalmoveState]:水平冻结分割拖动
+ {Boolean} [verticalmoveState]:垂直冻结分割拖动 + {Boolean} [verticalmoveState]:垂直冻结分割拖动
+ {Boolean} [pivotTableMoveState]:数据透视表字段拖动 + {Boolean} [pivotTableMoveState]:数据透视表字段拖动
+ {Boolean} [sheetMoveStatus]:sheet改变你位置拖动 + {Boolean} [sheetMoveStatus]:sheet改变你位置拖动
+ {Boolean} [scrollStatus]:鼠标触发了滚动条移动 + {Boolean} [scrollStatus]:鼠标触发了滚动条移动
@ -842,6 +842,11 @@ Luckysheet开放了更细致的自定义配置选项,分别有
+ {Boolean} [chartResize]:图表改变大小 + {Boolean} [chartResize]:图表改变大小
+ {Boolean} [rangeResize]:公式参数高亮选区的大小拖拽 + {Boolean} [rangeResize]:公式参数高亮选区的大小拖拽
+ {Boolean} [rangeMove]:公式参数高亮选区的位置拖拽 + {Boolean} [rangeMove]:公式参数高亮选区的位置拖拽
+ {Boolean} [cellRightClick]:单元格右击
+ {Boolean} [rowTitleRightClick]:行标题右击
+ {Boolean} [columnTitleRightClick]:列标题右击
+ {Boolean} [sheetRightClick]:底部sheet页右击
+ {Boolean} [hyperlinkClick]:点击超链接
- {Object} [ctx]: 当前画布的context - {Object} [ctx]: 当前画布的context
------------ ------------
@ -1145,6 +1150,42 @@ Luckysheet开放了更细致的自定义配置选项,分别有
- {String} [oldZoom]: 修改前当前sheet页缩放比例 - {String} [oldZoom]: 修改前当前sheet页缩放比例
- {String} [newZoom]: 修改后当前sheet页缩放比例 - {String} [newZoom]: 修改后当前sheet页缩放比例
------------
### sheetActivateBefore
(TODO)
- 类型:Function
- 默认值:null
- 作用:激活工作表前
- 参数:
- {Number} [i]: sheet页的`index`
------------
### sheetActivateAfter
(TODO)
- 类型:Function
- 默认值:null
- 作用:激活工作表后
- 参数:
- {Number} [i]: sheet页的`index`
------------
### sheetDeactivateBefore
(TODO)
- 类型:Function
- 默认值:null
- 作用:工作表从活动状态转为非活动状态前
- 参数:
- {Number} [i]: sheet页的`index`
------------
### sheetDeactivateAfter
(TODO)
- 类型:Function
- 默认值:null
- 作用:工作表从活动状态转为非活动状态后
- 参数:
- {Number} [i]: sheet页的`index`
------------ ------------
## 工作簿 ## 工作簿
@ -1189,7 +1230,7 @@ Luckysheet开放了更细致的自定义配置选项,分别有
(TODO) (TODO)
- 类型:Function - 类型:Function
- 默认值:null - 默认值:null
- 作用:每次操作更新后执行的方法,在画布渲染之后执行,即客户端每执行一次表格操作,Luckysheet将这次操作存到历史记录中后触发,撤销重做时因为也算一次操作,当然也会触发此钩子函数。 - 作用:协同编辑中的每次操作后执行的方法,即客户端每执行一次表格操作,Luckysheet将这次操作存到历史记录中后触发,撤销重做时因为也算一次操作,也会触发此钩子函数。
- 参数: - 参数:
- {Object} [operate]: 本次操作的历史记录信息,根据不同的操作,会有不同的历史记录,参考源码 [历史记录](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/controlHistory.js) - {Object} [operate]: 本次操作的历史记录信息,根据不同的操作,会有不同的历史记录,参考源码 [历史记录](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/controlHistory.js)
@ -1381,6 +1422,16 @@ Luckysheet开放了更细致的自定义配置选项,分别有
------------ ------------
## 打印
### printBefore
(TODO)
- 类型:Function
- 默认值:null
- 作用:打印前
------------
## 旧版钩子函数 ## 旧版钩子函数
### fireMousedown ### fireMousedown

4
docs/zh/guide/resource.md

@ -8,14 +8,14 @@
- [Luckysheet如何初始化含合并单元格的数据](https://www.cnblogs.com/DuShuSir/p/13272397.html) - [Luckysheet如何初始化含合并单元格的数据](https://www.cnblogs.com/DuShuSir/p/13272397.html)
- [Luckysheet如何把表格里的数据保存到数据库](https://www.cnblogs.com/DuShuSir/p/13857874.html) - [Luckysheet如何把表格里的数据保存到数据库](https://www.cnblogs.com/DuShuSir/p/13857874.html)
- [本地HTML采用cdn加载方式引入Luckysheet的案例](https://www.cnblogs.com/DuShuSir/p/13859103.html) - [本地HTML采用cdn加载方式引入Luckysheet的案例](https://www.cnblogs.com/DuShuSir/p/13859103.html)
- [Luckysheet基础用法,使用loadUrl加载服务端数据](https://blog.csdn.net/DCDC2020/article/details/108486525)
## 协同编辑后台 ## 后台
### 社区案例 ### 社区案例
- [Luckysheet保存与恢复](https://gitee.com/ichiva/luckysheet-saved-in-recovery)(Java版) - [Luckysheet保存与恢复](https://gitee.com/ichiva/luckysheet-saved-in-recovery)(Java版)
- [基于Luckysheet实现的协同编辑在线表格](https://github.com/DilemmaVi/ecsheet)(Java版) - [基于Luckysheet实现的协同编辑在线表格](https://github.com/DilemmaVi/ecsheet)(Java版)
## 学习资料 ## 学习资料
- [如何从0到1搭建 Web 数据分析报表](https://github.com/mengshukeji/LuckyResources/blob/master/ppt/%E5%A6%82%E4%BD%95%E4%BB%8E0%E5%88%B01%E6%90%AD%E5%BB%BA%20Web%20%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%E6%8A%A5%E8%A1%A8.pptx) - [如何从0到1搭建 Web 数据分析报表](https://github.com/mengshukeji/LuckyResources/blob/master/ppt/%E5%A6%82%E4%BD%95%E4%BB%8E0%E5%88%B01%E6%90%AD%E5%BB%BA%20Web%20%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%E6%8A%A5%E8%A1%A8.pptx)

1
src/controllers/constant.js

@ -1736,7 +1736,6 @@ function customCellRightClickConfig() {
if(JSON.stringify(luckysheetConfigsetting.cellRightClickConfig) !== '{}'){ if(JSON.stringify(luckysheetConfigsetting.cellRightClickConfig) !== '{}'){
Object.assign(config,luckysheetConfigsetting.cellRightClickConfig); Object.assign(config,luckysheetConfigsetting.cellRightClickConfig);
} }
console.info('=======cellRightClickConfig======'),
luckysheetConfigsetting.cellRightClickConfig = config; luckysheetConfigsetting.cellRightClickConfig = config;
return config; return config;
} }

5
src/controllers/sheetmanage.js

@ -841,6 +841,11 @@ const sheetmanage = {
sheetindex.push(item); sheetindex.push(item);
} }
// No request is sent if it is not linked to other worksheets
if(sheetindex.length === 0){
execF();
return;
}
$.post(loadSheetUrl, {"gridKey" : server.gridKey, "index": sheetindex.join(",")}, function (d) { $.post(loadSheetUrl, {"gridKey" : server.gridKey, "index": sheetindex.join(",")}, function (d) {
let dataset = eval("(" + d + ")"); let dataset = eval("(" + d + ")");

Loading…
Cancel
Save