Browse Source

docs(update): about

1.about docs 2.edit contribute guide
master
mengshukeji 5 years ago
parent
commit
82b1013dfd
  1. 18
      docs/.vuepress/config.js
  2. 2
      docs/guide/FAQ.md
  3. 7
      docs/guide/config.md
  4. 8
      docs/guide/sheet.md
  5. 18
      docs/zh/about/README.md
  6. 49
      docs/zh/about/company.md
  7. 28
      docs/zh/about/sponsor.md
  8. 2
      docs/zh/guide/FAQ.md
  9. 20
      docs/zh/guide/config.md
  10. 95
      docs/zh/guide/contribute.md
  11. 8
      docs/zh/guide/sheet.md
  12. 2
      src/controllers/menuButton.js
  13. 3589
      src/index.html

18
docs/.vuepress/config.js

@ -79,7 +79,15 @@ module.exports = {
nav: [
{ text: '首页', link: '/zh/' },
{ text: '指南', link: '/zh/guide/' },
{ text: '演示', link: 'https://mengshukeji.github.io/LuckysheetDemo/' }
{ text: '演示', link: 'https://mengshukeji.github.io/LuckysheetDemo/' },
{
text: '了解更多',
ariaLabel: '了解更多',
items: [
{ text: '关于', link: '/zh/about/' }
]
},
],
// 侧边栏
sidebar: {
@ -91,7 +99,13 @@ module.exports = {
'operate',
'api',
'resource',
'FAQ'
'FAQ',
'contribute'
],
'/zh/about/': [
'',
'sponsor',
'company'
],
},
},

2
docs/guide/FAQ.md

@ -42,7 +42,7 @@ luckysheet.transToData(celldata)
## **<span style="font-size:20px;">Q</span>** Is the remote loading data loadUrl or updateUrl?
**<span style="font-size:20px;">A</span>**: [loadUrl](/guide/config.html#loadurl). Configure loadUrl, Luckysheet will request the entire table data through ajax, and updateUrl will be used as the interface address for collaborative editing in real-time saving.
Note: Initial data needs to be configured with loadUrl and loadSheetUrl parameters, while for collaborative editing, the four parameters of loadUrl, loadSheetUrl, updateUrl and allowUpdate can be configured to take effect.
Note: Initial data needs to be configured with loadUrl parameter, while for collaborative editing, the four parameters of loadUrl, updateUrl and allowUpdate can be configured to take effect.
------------

7
docs/guide/config.md

@ -58,7 +58,6 @@ The following are all supported setting parameters
- Customize the bottom sheet bar [showsheetbarConfig](#showsheetbarConfig)
- The bottom count bar [showstatisticBar](#showstatisticBar)
- Custom Count Bar [showstatisticBarConfig](#showstatisticBarConfig)
- Allow editing [allowEdit](#allowEdit)
- Allow adding rows [enableAddRow](#enableAddRow)
- Allow back to top [enableAddBackTop](#enableAddBackTop)
- User Info [userInfo](#userInfo)
@ -347,12 +346,6 @@ Note that you also need to configure `loadUrl` and `loadSheetUrl` to take effect
}
}
```
------------
### allowEdit
- Type: Boolean
- Default: true
- Usage: Whether to allow front-end editing
------------
### enableAddRow
- Type: Boolean

8
docs/guide/sheet.md

@ -42,7 +42,6 @@ eg: options.data:
"luckysheet_conditionformat_save": {},//condition format
"frozen": {}, //freeze row and column configuration
"chart": [], //Chart configuration
"allowEdit": true, //is editable
"zoomRatio":1, // zoom ratio
"image":[], //image
"showGridLines": 1, //Whether to show grid lines
@ -1276,12 +1275,6 @@ eg: options.data:
```
:::
------------
### allowEdit
- type:Boolean
- default:true
- usage: is this sheet editable
------------
### zoomRatio
- type:Number
@ -1375,7 +1368,6 @@ At this point, the lucky sheet file contains many local parameters that are not
"frozen": {}, //Freeze row and column configuration
"freezen": {}, //Storage freeze row and column rendering data
"chart": [], //Chart configuration
"allowEdit": true, //Editable
"zoomRatio":1, // Zoom ratio
"image":[], //image
"showGridLines": 1, //Whether to show grid lines

18
docs/zh/about/README.md

@ -0,0 +1,18 @@
# 认识团队
Luckysheet是由个人主导、几个志同道合的小伙伴一同开发的项目。
## 核心团队活跃成员
- [@wbfsa](https://github.com/wbfsa)
- [@wpxp123456](https://github.com/wpxp123456)
- [@tonytonychopper123](https://github.com/tonytonychopper123)
- [@Dushusir](https://github.com/Dushusir)
- [@c19c19i](https://weibo.com/u/3884623955)
## 社区伙伴
- [@danielcai1987](https://github.com/danielcai1987)
- [@qq6690876](https://github.com/qq6690876)
- [@javahuang](https://github.com/javahuang)
- [@TimerGang](https://github.com/TimerGang)
- [@gsw945](https://github.com/gsw945)
- [@swen-xiong](https://github.com/swen-xiong)

49
docs/zh/about/company.md

@ -0,0 +1,49 @@
# 社区案例
我们搜集到了很多来自社区的案例反馈,还发现了以前我们没有预想到的Luckysheet使用场景。
积极聆听社区的声音,在大家的支持和反馈中不断更新迭代,已是我们的责任。
## 公司案例
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://www.zpy360.com/" target="_blank">
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/Zhiping_Cloud.png">
</a>
<p>雄安智评云数字科技有限公司</p>
</td>
<td align="center" valign="middle">
<a href="https://code-the-future.com/" target="_blank">
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/code_the_future.png">
</a>
<p>Code the Future</p>
</td>
<td align="center" valign="middle">
<a href="http://www.jackyun.com/" target="_blank">
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/jackyun.png">
</a>
<p>吉客云</p>
</td>
<td align="center" valign="middle">
<a href="https://www.huawei.com/cn/" target="_blank">
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/huawei.png">
</a>
<p>华为</p>
</td>
</tr>
<tr>
<td align="center" valign="middle">
</td>
<td align="center" valign="middle">
</td>
<td align="center" valign="middle">
</td>
<td align="center" valign="middle">
</td>
</tr>
</tbody>
</table>

28
docs/zh/about/sponsor.md

@ -0,0 +1,28 @@
# 赞助
## 赞助方式
Luckysheet稳定健康的持续更新,离不开大家的支持。
如果你感觉这个项目对你有用或者有所启发,可以请作者喝杯果汁:
注意事项:
1. 付款留言请备注:昵称,您的网站地址
2. 默认会将您加入到下方的赞助者列表。如果您想匿名赞助,付款留言请备注:匿名
3. 如果您忘记留言昵称或者网站地址,请联系小编email: alexads@foxmail.com或者微信:dushusir2。
| 微信 | 支付宝 |
|---|---|
| <img src="https://minio.cnbabylon.com/public/luckysheet/wechat.jpg" width="140" />| <img src="https://minio.cnbabylon.com/public/luckysheet/alipay.jpg" width="130" /> |
### [Paypal Me](https://www.paypal.me/wbfsa)
## 赞助者列表
(按时间顺序排列)
- *勇 ¥ 30
- 虚我 ¥ 200
- 甜党 ¥ 50
- Alphabet(Google)-gcf ¥ 1
- **平 ¥ 100
- **东 ¥ 10
- debugger ¥ 20
- 烦了烦 ¥ 10

2
docs/zh/guide/FAQ.md

@ -44,7 +44,7 @@ luckysheet.transToData(celldata)
## **<span style="font-size:20px;">Q</span>** 远端加载数据是loadUrl还是updateUrl?
**<span style="font-size:20px;">A</span>** : [loadUrl](/zh/guide/config.html#loadurl)。配置了loadUrl,Luckysheet会通过ajax请求整个表格数据,而updateUrl会作为协同编辑实时保存的接口地址。
注意:初始化数据需要配置loadUrl和loadSheetUrl参数,而协同编辑则在配置loadUrl、loadSheetUrl、updateUrl和allowUpdate四个参数才能生效。
注意:初始化数据需要配置loadUrl参数,而协同编辑则在配置loadUrl、updateUrl和allowUpdate四个参数才能生效。
------------

20
docs/zh/guide/config.md

@ -59,7 +59,6 @@ Luckysheet开放了更细致的自定义配置选项,分别有
- 自定义底部sheet页 [showsheetbarConfig](#showsheetbarConfig)
- 底部计数栏 [showstatisticBar](#showstatisticBar)
- 自定义计数栏 [showstatisticBarConfig](#showstatisticBarConfig)
- 允许编辑 [allowEdit](#allowEdit)
- 允许添加行 [enableAddRow](#enableAddRow)
- 允许回到顶部 [enableAddBackTop](#enableAddBackTop)
- 用户信息 [userInfo](#userInfo)
@ -120,7 +119,7 @@ Luckysheet开放了更细致的自定义配置选项,分别有
//status为1的sheet页,重点是需要提供初始化的数据celldata
{
"name": "Cell",
"index": "sheet_001",
"index": "sheet_01",
"order": 0,
"status": 1,
"celldata": [{"r":0,"c":0,"v":{"v":1,"m":"1","ct":{"fa":"General","t":"n"}}}]
@ -128,13 +127,13 @@ Luckysheet开放了更细致的自定义配置选项,分别有
//其他status为0的sheet页,无需提供celldata,只需要配置项即可
{
"name": "Data",
"index": "sheet_002",
"index": "sheet_02",
"order": 1,
"status": 0
},
{
"name": "Picture",
"index": "sheet_003",
"index": "sheet_03",
"order": 2,
"status": 0
}
@ -150,7 +149,7 @@ Luckysheet开放了更细致的自定义配置选项,分别有
### loadSheetUrl
- 类型:String
- 默认值:""
- 作用:配置`loadSheetUrl`接口地址,用于异步加载其它单元格数据。参数为`gridKey`(表格主键) 和 `index`(sheet主键合集,格式为`["sheet_01","sheet_02","sheet_0"]`)。
- 作用:配置`loadSheetUrl`接口地址,用于异步加载其它单元格数据。参数为`gridKey`(表格主键) 和 `index`(sheet主键合集,格式为`["sheet_01","sheet_02","sheet_03"]`)。
源码的请求写法是:
```js
@ -178,7 +177,7 @@ Luckysheet开放了更细致的自定义配置选项,分别有
"v": { "v": 1, "m": "1", "ct": { "fa": "General", "t": "n" } }
}
],
"sheet_0": [
"sheet_03": [
{
"r": 0,
"c": 0,
@ -204,10 +203,9 @@ Luckysheet开放了更细致的自定义配置选项,分别有
- 默认值:""
- 作用:操作表格后,实时保存数据的websocket地址,此接口也是共享编辑的接口地址。
有个注意点,要想开启共享编辑,必须满足以下个条件:
有个注意点,要想开启共享编辑,必须满足以下3个条件:
+ `allowUpdate`为`true`
+ 配置了`loadUrl`
+ 配置了`loadSheetUrl`
+ 配置了`updateUrl`
注意,发送给后端的数据默认是经过pako压缩过后的。后台拿到数据需要先解压。
@ -436,12 +434,6 @@ Luckysheet开放了更细致的自定义配置选项,分别有
}
```
------------
### allowEdit
- 类型:Boolean
- 默认值:true
- 作用:是否允许前台编辑
------------
### enableAddRow
- 类型:Boolean

95
docs/zh/guide/contribute.md

@ -1,9 +1,9 @@
# Luckysheet 贡献指南
# 贡献指南
欢迎!我们很高兴您能来到这里,并非常期待您能有兴趣参与 Luckysheet 贡献。当然,在您参与 Luckysheet 贡献之前,请确保通读以下全文:
欢迎!我们很高兴您能来到这里,并非常期待您能有兴趣参与 Luckysheet 贡献。当然,在您参与 Luckysheet 贡献之前,请确保通读以下全文:
#### 我们的行为准则
## 我们的行为准则
1. 我们保证尊重所有参与贡献的人,不限于提出问题、文档和代码贡献、解决bug以及其它贡献的人;
@ -12,15 +12,15 @@
4. 我们有权并有责任删除或编辑与此行为准则不符的内容,不限于代码、Issues、wiki、文档以及其它。不遵守行为准则的参与者可能会被移除团队;
5. 我们接受任何人的监督,任何人可通过问题反馈,向我们报告发现的与此行为准则不符的事实存在。
#### 如何参与贡献?
## 如何参与贡献?
* 贡献文档:浏览文档可以加深您对 Luckysheet 的了解,一旦发现文档写得不清晰或逻辑混乱的地方,可以订正、修改、补充,您可以通过 [中文论坛](https://support.qq.com/products/288322?)或者 [谷歌论坛](https://groups.google.com/g/luckysheet)给予反馈
* 贡献文档:浏览文档可以加深您对 Luckysheet 的了解,一旦发现文档写得不清晰或逻辑混乱的地方,可以订正、修改、补充,您可以通过 [中文论坛](https://support.qq.com/products/288322)或者 [谷歌论坛](https://groups.google.com/g/luckysheet)给予反馈
* 贡献代码:欢迎大家为 Luckysheet 社区贡献代码,欢迎您认领Open状态的 [Issues](https://github.com/mengshukeji/Luckysheet/issues) 和未完成的特性,提交PR,成为贡献者之一如果您在使用过程中发现有些功能无法满足您的需求或出现问题,请在Issues中记录
* 参与Issue讨论:您可以在任一 [Issues](https://github.com/mengshukeji/Luckysheet/issues) 下发表您的建议
* Review代码:您可以在 [Github](https://github.com/mengshukeji/Luckysheet)上看到所有贡献者提交的PR,您可以Review他们的代码并发表您的建议
#### 如何提交 Issues
## 如何提交 Issues
在您提交特性/改进前,应该注意以下几点:
@ -34,20 +34,20 @@
* 创建 [Issues](https://github.com/mengshukeji/Luckysheet/issues) ,描述清楚问题
* 如果你要解决该issue则将issue assign到自己名下,如果你仅仅是提交Bug/特性/改进,并没有时间去贡献代码,则assignne设置为空
* 如果是比较大的特性/改进,尽量先输出设计文档,供其他人review
* 编码,编码完成后,提交代码
* 如果是比较大的特性/改进,尽量先输出设计文档,走 [Luckysheet RFC](https://github.com/mengshukeji/Luckysheet-rfcs) 流程,供其他人review
* 编码完成后,提交代码
#### 如何认领 Issues
## 如何认领 Issues
在 Luckysheet 的 [Issues](https://github.com/mengshukeji/Luckysheet/issues) 列表中,有很多由其他人创建的issue并未被修复,如果你感兴趣的话,可以认领这些issue。认领步骤如下:
* 在该issue下留言,表达想认领该任务的想法,另注明 **@I can solve it** 即可
* 如果提交者没有意见,则将该issue assign到自己名下并及时更新进度
* 如果是比较大的特性,尽量先输出设计文档,供其他人review
* 如果是比较大的特性,尽量先输出设计文档,走 [Luckysheet RFC](https://github.com/mengshukeji/Luckysheet-rfcs) 流程,供其他人review
* 开发代码并提交代码至github
#### 如何提交代码
## 如何提交代码
1. fork 到自己的仓库
@ -55,67 +55,68 @@
2. git clone 到本地
```
```shell
git clone https://github.com/<your_github_name>/Luckysheet.git
```
3. 上游建立连接
```shell
cd Luckysheet
git remote add upstream https://github.com/mengshukeji/Luckysheet.git
```
cd Luckysheet
git remote add upstream https://github.com/mengshukeji/Luckysheet.git
```
4. 检查远程仓库设置
```
git remote -v
origin https://github.com/<your_github_name>/Luckysheet.git (fetch)
origin https://github.com/<your_github_name>/Luckysheet.git (push)
upstream https://github.com/mengshukeji/Luckysheet.git (fetch)
upstream https://github.com/mengshukeji/Luckysheet.git (push)
```shell
git remote -v
origin https://github.com/<your_github_name>/Luckysheet.git (fetch)
origin https://github.com/<your_github_name>/Luckysheet.git (push)
upstream https://github.com/mengshukeji/Luckysheet.git (fetch)
upstream https://github.com/mengshukeji/Luckysheet.git (push)
```
5. 获取 Luckysheet 仓库代码,并更新本地master分支代码为最新
```
```shell
git fetch upstream
git pull upstream master
```
6. 新建分支
>一般以issue id作为分支名,如:Luckysheet-123
```
git checkout -b dev
一般以issue id作为分支名,如:Luckysheet-123
```shell
git checkout -b Luckysheet-123
```
**确保分支Luckysheet-123是基于官方master分支的最新代码**
分支创建完成后即可进行代码更改。
7. 提交代码到远程分支
>commit 信息的格式必须与Issue标题保持一致且以[issue id]开头,即:[Luckysheet-123] xxx
```
commit 信息的格式必须与Issue标题保持一致且以[issue id]开头,即:[Luckysheet-123] xxx
```shell
git commit -a -m "[Luckysheet-123] xxx"
git push origin Luckysheet-123
```
8. 提交PR
* 打开自己的github仓库页面,如:`https://github.com/<your_github_name>/Luckysheet`
* 切换分支,切换到提交的分支 `Luckysheet-123`
* 创建新PR,点击 `New pull request`或者`Compare & pull request`
* 点击Create pull request按钮进行创建PR
>提交PR需要注意以下几点:
> 1. PR的标题必须以issue id开头,最好与commit信息保持一致
>2. 可以填写部分描述信息也可以不填
>3. 如果点击`Create pull request`后提示代码冲突,则请将`Luckysheet-123`分支的代码 与master分支同步一致后在进行提交
* 打开自己的github仓库页面,如:`https://github.com/<your_github_name>/Luckysheet`
* 切换分支,切换到提交的分支 `Luckysheet-123`
* 创建新PR,点击 `New pull request`或者`Compare & pull request`
* 点击Create pull request按钮进行创建PR
### 提交PR需要注意以下几点:
1. PR的标题必须以issue id开头,最好与commit信息保持一致
2. 可以填写部分描述信息也可以不填
3. 如果点击`Create pull request`后提示代码冲突,则请将`Luckysheet-123`分支的代码 与master分支同步一致后在进行提交
#### 代码规范
## 代码规范
>一般性的代码规范示例
> 一般性的代码规范示例
* 保持块深度最小。尽可能避免嵌套If条件
```
```js
// CORRECT
if (!comparison) return
@ -138,7 +139,7 @@ if (comparison) {
```
* 不要使用操作数进行链比较
```
```js
// CORRECT
if (cb) cb()
@ -151,8 +152,7 @@ cb && cb()
```
* 所有变量都应该按字母顺序在块的开头声明
```
```js
// CORRECT
function foo () {
const foo = 'bar'
@ -178,12 +178,10 @@ function foo () {
return foo
}
```
* 尽快返回
```
```js
// CORRECT
if (condition) return 'foo'
if (condition2) return 'bar'
@ -202,12 +200,11 @@ if (condition) {
}
return variable
```
#### 如何贡献文档
## 如何贡献文档
#### 如何成为Luckysheet Committer
## 如何成为Luckysheet Committer
任何人只要对 Luckysheet 项目做了贡献,那您就是官方承认的 Luckysheet 项目的Contributor了,从Contributor成长为Committer并没有一个确切的标准, 也没有任何预期的时间表,但是Committer的候选人一般都是长期活跃的贡献者,成为Committer并没有要求必须有巨大的架构改进贡献, 或者多少行的代码贡献,贡献代码、贡献文档、参与邮件列表的讨论、帮助回答问题等等都提升自己影响力的方式。

8
docs/zh/guide/sheet.md

@ -43,7 +43,6 @@ options.data示例如下:
"luckysheet_conditionformat_save": {},//条件格式
"frozen": {}, //冻结行列配置
"chart": [], //图表配置
"allowEdit": true, //是否允许编辑
"zoomRatio":1, // 缩放比例
"image":[], //图片
"showGridLines": 1, //是否显示网格线
@ -1281,12 +1280,6 @@ options.data示例如下:
```
:::
------------
### allowEdit
- 类型:Boolean
- 默认值:true
- 作用: 此sheet页是否允许编辑
------------
### zoomRatio
- 类型:Number
@ -1436,7 +1429,6 @@ Luckysheet在初始化完成之后进行的一系列操作,会将更多本地
"frozen": {}, //冻结行列配置
"freezen": {}, //冻结行列的渲染数据存储
"chart": [], //图表配置
"allowEdit": true, //是否允许编辑
"zoomRatio":1, // 缩放比例
"image":[], //图片
"showGridLines": 1, //是否显示网格线

2
src/controllers/menuButton.js

@ -1924,7 +1924,7 @@ const menuButton = {
let itemdata = [
{"text": locale_findAndReplace.find+" ...", "value": "search", "example": '<i class="iconfont luckysheet-iconfont-sousuo" aria-hidden="true"></i>'},
{"text": locale_findAndReplace.replace+" ...", "value": "replace", "example": '<i class="iconfont luckysheet-iconfont-tihuan" aria-hidden="true"></i>'},
{"text": locale_findAndReplace.goto+" ...", "value": "goto", "example": '<i class="iconfont luckysheet-iconfont-zhuandao1" aria-hidden="true"></i>'},
// {"text": locale_findAndReplace.goto+" ...", "value": "goto", "example": '<i class="iconfont luckysheet-iconfont-zhuandao1" aria-hidden="true"></i>'},
{"text": "", "value": "split", "example": ""},
{"text": locale_findAndReplace.location+" ...", "value": "location", "example": '<i class="iconfont luckysheet-iconfont-dingwei" aria-hidden="true"></i>'},
{"text": locale_findAndReplace.formula, "value": "locationFormula", "example": locale_findAndReplace.locationExample},

3589
src/index.html

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save