Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
docs(config): config
Browse files Browse the repository at this point in the history
config,readme
  • Loading branch information
Dushusir committed Aug 28, 2020
1 parent 6211e83 commit 552e37d
Show file tree
Hide file tree
Showing 8 changed files with 770 additions and 52 deletions.
16 changes: 11 additions & 5 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,17 @@ npm run build
```
## 加入共建

如果你想为 Luckysheet 实现一个重要功能,需要先撰写 RFC 文档,按照Luckysheet的 [RFC](https://github.com/mengshukeji/Luckysheet-rfcs) 机制进行操作,在经过社区讨论完善后才可以进行代码的提交。

## 联系
- 欢迎提交 PR 或者 [Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose)
- Email: [email protected]
1. 任何疑问或者建议,欢迎提交[Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose)
2. 如果您想为 Luckysheet 实现一个重要功能,需要先撰写 RFC 文档,按照Luckysheet的 [RFC](https://github.com/mengshukeji/Luckysheet-rfcs) 机制进行操作,在经过社区讨论完善后才可以进行代码的提交。
3. 如果您对Luckysheet感兴趣,非常欢迎加入开发组,一起来完善这个插件(下方扫码添加小编微信备注:共建),有4类任务可以认领
- BUG修复
- 新功能添加
- 文档
- 推广

您将收获:
- Luckysheet官方readme文档贡献者链接
- 参与大型开源项目,技术和视野提升

## 交流

Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,20 @@ Create a table
})
</script>
```
## Co-construction

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) to operate, and submit the code after community discussion and improvement.
## Co-construction

## Contact
- Welcome to submit PR or [Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose)
- Email: [email protected]
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.
3. If you are interested in Luckysheet, you are very welcome to join the development team to improve this plugin together (Email: [email protected]), 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

Expand Down
8 changes: 4 additions & 4 deletions docs/guide/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"rowlen":{}, //Table row height
"columnlen":{}, //Table column width
"rowhidden":{}, //hidden rows
"columnhidden":{}, //hidden columns
"colhidden":{}, //hidden columns
"borderInfo":{}, //borders
},
"celldata": [], //initialize the cell data used
Expand Down Expand Up @@ -204,15 +204,15 @@
}
```

### config.columnhidden
### config.colhidden
- Type:Object
- Default:{}
- Usage:Hidden column information, Columns:`columnhidden[Columns]: 0`,
- Usage:Hidden column information, Columns:`colhidden[Columns]: 0`,

`key` specify the number of columns,`value` is always `0`
- example:
```js
"columnhidden": {
"colhidden": {
"30": 0,
"31": 0
}
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ luckysheetfile = [ {sheet1设置}, {sheet2设置}, {sheet3设置} ]`
"rowlen":{}, //表格行高
"columnlen":{}, //表格列宽
"rowhidden":{}, //隐藏行
"columnhidden":{}, //隐藏列
"colhidden":{}, //隐藏列
"borderInfo":{}, //边框
},
"celldata": [], //初始化使用的单元格数据
Expand Down
53 changes: 47 additions & 6 deletions docs/zh/guide/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Luckysheet开放了更细致的自定义配置选项,分别有

------------

## 钩子函数
## 钩子函数(TODO)

钩子函数应用于二次开发时,会在各个常用鼠标或者键盘操作时植入钩子,调用开发者传入的函数,起到扩展Luckysheet功能的作用。

Expand All @@ -416,67 +416,108 @@ Luckysheet开放了更细致的自定义配置选项,分别有
- 类型:Function
- 默认值:null
- 作用:点击单元格前触发,即在点击单元格的时候,最先触发这个方法
- 参数:
- {Number} [r]: 单元格所在行数
- {Number} [c]: 单元格所在列数
- {Object} [v]: 单元格对象

------------
### cellClicked
- 类型:Function
- 默认值:null
- 作用:点击单元格后触发,即在点击单元格的时候,最后触发这个方法
- 参数:
- {Number} [r]: 单元格所在行数
- {Number} [c]: 单元格所在列数
- {Object} [v]: 单元格对象

------------
### cellEditBefore
- 类型:Function
- 默认值:null
- 作用:双击单元格后触发,即在双击单元格编辑内容的时候,最先触发这个方法
- 参数:
- {Number} [r]: 单元格所在行数
- {Number} [c]: 单元格所在列数
- {Object} [v]: 单元格对象

------------
### cellEdited
- 类型:Function
- 默认值:null
- 作用:双击单元格后触发,即在双击单元格编辑内容的时候,最后触发这个方法
- 参数:
- {Number} [r]: 单元格所在行数
- {Number} [c]: 单元格所在列数
- {Object} [oldV]: 修改前单元格对象
- {Object} [newV]: 修改后单元格对象

------------
### sheetClickBefore
- 类型:Function
- 默认值:null
- 作用:点击sheet页前触发
- 参数:
- {Number} [i]: sheet页的index
- {Object} [sheet]: sheet页的配置

------------
### sheetClicked
- 类型:Function
- 默认值:null
- 作用:点击sheet页后触发
- 参数:
- {Number} [i]: sheet页的index
- {Object} [sheet]: sheet页的配置

------------
### workbookCreateBefore
- 类型:Function
- 默认值:null
- 作用:表格创建之前触发。旧的钩子函数叫做`beforeCreateDom`

- 参数:
- {Object} [book]: 整个工作簿的配置(options)

------------
### workbookCreated
- 类型:Function
- 默认值:null
- 作用:表格创建之后触发

- 参数:
- {Object} [book]: 整个工作簿的配置(options)

------------
### workbookUpdated
- 类型:Function
- 默认值:null
- 作用:表格创建之后触发

- 参数:
- {Object} [book]: 整个工作簿的配置(options)

------------
### workbookDestroyBefore
- 类型:Function
- 默认值:null
- 作用:表格创建之后触发

- 参数:
- {Object} [book]: 整个工作簿的配置(options)

------------
### workbookDestroyed
- 类型:Function
- 默认值:null
- 作用:表格创建之后触发

- 参数:
- {Object} [book]: 整个工作簿的配置(options)

------------
### updated
- 类型:Function
- 默认值:null
- 作用:每次操作更新后执行的方法,即客户端每执行一次表格操作,Luckysheet将这次操作存到历史记录中后触发,撤销时因为也算一次操作,当然也会触发此钩子函数。
- 参数:
- {Object} [operate]: 本次操作的历史记录信息,根据不同的操作,会有不同的历史记录,参考源码 [历史记录](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/controlHistory.js)

------------
### fireMousedown
- 类型:Function
Expand Down
Loading

0 comments on commit 552e37d

Please sign in to comment.