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

Commit

Permalink
fix(function update fix): fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tubiaoge committed Oct 21, 2020
2 parents 00b351f + 76dbb5c commit 28835bb
Show file tree
Hide file tree
Showing 12 changed files with 378 additions and 62 deletions.
1 change: 1 addition & 0 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ After `npm run build`, all files in the `dist` folder are copied to the project
<link rel='stylesheet' href='./plugins/css/pluginsCss.css' />
<link rel='stylesheet' href='./plugins/plugins.css' />
<link rel='stylesheet' href='./css/luckysheet.css' />
<link rel='stylesheet' href='./assets/iconfont/iconfont.css' />
<script src="./plugins/js/plugin.js"></script>
<script src="./luckysheet.umd.js"></script>
```
Expand Down
131 changes: 131 additions & 0 deletions docs/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,54 @@ Use note:

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

### setRowHeight(rowInfo [,setting])

(TODO)

- **Parameter**

- {Object} [rowInfo]: Correspondence between number of rows and height

- {PlainObject} [setting]: optional parameters
+ {Number} [order]: Worksheet subscript; the default value is the current worksheet subscript
+ {Function} [success]: callback function for the end of the operation

- **Explanation**

Set the height of the specified ~~row~~

- **Usage**:

- Set the height of the first row to 50px and the height of the second row to 60px

`luckysheet.setRowHeight({0:50,1:60})`

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

### setColumnWidth(columnInfo [,setting])

(TODO)

- **Parameter**

- {Number} [columnInfo]: Correspondence between the number of columns and the width

- {PlainObject} [setting]: optional parameters
+ {Number} [order]: Worksheet subscript; the default value is the current worksheet subscript
+ {Function} [success]: callback function for the end of the operation

- **Explanation**

Set the width of the specified column

- **Usage**:

- Set the width of the first column to 50px and the width of the second column to 60px

`luckysheet.setColumnWidth({0:50,1:60})`

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

## Selection operation

### getRange()
Expand Down Expand Up @@ -2013,6 +2061,32 @@ Use note:

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

### setSheetZoom(zoom [,setting])

[todo]


- **Parameter**

- {Number} [zoom]: Worksheet zoom ratio

- {PlainObject} [setting]: optional parameters
+ {Function} [success]: callback function for the end of the operation

- **Explanation**

Set worksheet zoom ratio


- **Usage**:

- Set the current worksheet zoom ratio to 0.5
```js
luckysheet.setSheetZoom(0.5)
```

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

### showGridLines([setting])

- **Parameter**
Expand Down Expand Up @@ -2295,6 +2369,63 @@ Use note:

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

## Data Verification

### setDataVerification(option, [setting])

[todo]

- **Parameter**

- {Object} [option]: Configuration information for data verification
- {PlainObject} [setting]: optional parameters
+ {Array | Object | String} [range]: The selection area for data verification, The format of the supported selection is `"A1:B2"`, `"sheetName!A1:B2"` or `{row:[0,1] ,column:[0,1]}`, can only be a single selection; the default is the current selection
+ {Number} [order]: Worksheet subscript; the default value is the current worksheet subscript
+ {Function} [success]: callback function for the end of the operation

- **Explanation**

Specify the worksheet range to set the data verification function and set the parameters

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

### deleteDataVerification([setting])

[todo, to be confirmed whether it is reasonable]

- **Parameter**

- {PlainObject} [setting]: optional parameters
+ {Array | Object | String} [range]: The selection area for data verification, The format of the supported selection is `"A1:B2"`, `"sheetName!A1:B2"` or `{row:[0,1] ,column:[0,1]}`, can only be a single selection; the default is the current selection
+ {Number} [order]: Worksheet subscript; the default value is the current worksheet subscript
+ {Function} [success]: callback function for the end of the operation

- **Explanation**

Specify the worksheet range to delete the data verification function

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

## Worksheet Protection


### setProtection(option, [setting])

[todo]

- **Parameter**

- {Object} [option]: Configuration information for worksheet protection
- {PlainObject} [setting]: optional parameters
+ {Number} [order]: Worksheet subscript; the default value is the current worksheet subscript
+ {Function} [success]: callback function for the end of the operation

- **Explanation**

Specify the worksheet to set the worksheet protection

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

## Public method

### transToCellData(data [,setting])<div id='transToCellData'></div>
Expand Down
19 changes: 19 additions & 0 deletions docs/guide/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,25 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
- {String} [oldColor]: Before modification, the current worksheet color
- {String} [newColor]: After modification, the current worksheet color

------------
### sheetZoomBefore
- Type: Function
- Default: null
- Usage: Before worksheet zoom
- Parameter:
- {Number} [i]: `index` of current worksheet
- {String} [zoom]: Current worksheet zoom ratio

------------
### sheetZoomAfter
- Type: Function
- Default: null
- Usage: After worksheet zoom
- Parameter:
- {Number} [i]: `index` of current worksheet
- {String} [oldZoom]: Before modification, the current worksheet zoom ratio
- {String} [newZoom]: After modification, the current worksheet zoom ratio

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

## Workbook
Expand Down
1 change: 1 addition & 0 deletions docs/zh/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ npm run build
<link rel='stylesheet' href='./plugins/css/pluginsCss.css' />
<link rel='stylesheet' href='./plugins/plugins.css' />
<link rel='stylesheet' href='./css/luckysheet.css' />
<link rel='stylesheet' href='./assets/iconfont/iconfont.css' />
<script src="./plugins/js/plugin.js"></script>
<script src="./luckysheet.umd.js"></script>
```
Expand Down
132 changes: 132 additions & 0 deletions docs/zh/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,54 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开

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

### setRowHeight(rowInfo [,setting])

(TODO)

- **参数**

- {Object} [rowInfo]: 行数和高度对应关系

- {PlainObject} [setting]: 可选参数
+ {Number} [order]: 工作表下标;默认值为当前工作表下标
+ {Function} [success]: 操作结束的回调函数

- **说明**

设置指定行的高度

- **示例**:

- 设置第一行高度为50px,第二行高度为60px

`luckysheet.setRowHeight({0:50,1:60})`

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

### setColumnWidth(columnInfo [,setting])

(TODO)

- **参数**

- {Number} [columnInfo]: 列数和宽度对应关系

- {PlainObject} [setting]: 可选参数
+ {Number} [order]: 工作表下标;默认值为当前工作表下标
+ {Function} [success]: 操作结束的回调函数

- **说明**

设置指定列的宽度

- **示例**:

- 设置第一列宽度为50px,第二列宽度为60px

`luckysheet.setColumnWidth({0:50,1:60})`

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

## 选区操作

### getRange()
Expand Down Expand Up @@ -1954,6 +2002,32 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开

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

### setSheetZoom(zoom [,setting])

[todo]


- **参数**

- {Number} [zoom]: 工作表缩放比例

- {PlainObject} [setting]: 可选参数
+ {Function} [success]: 操作结束的回调函数

- **说明**

设置工作表缩放比例


- **示例**:

- 设置当前工作表缩放比例为0.5
```js
luckysheet.setSheetZoom(0.5)
```

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

### showGridLines([setting])

- **参数**
Expand Down Expand Up @@ -2219,6 +2293,63 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开

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

## 数据验证

### setDataVerification(option, [setting])

[todo]

- **参数**

- {Object} [option]: 数据验证的配置信息
- {PlainObject} [setting]: 可选参数
+ {Array | Object | String} [range]: 数据验证的选区范围,支持选区的格式为`"A1:B2"`、`"sheetName!A1:B2"`或者`{row:[0,1],column:[0,1]}`,只能为单个选区;默认为当前选区
+ {Number} [order]: 工作表下标;默认值为当前工作表下标
+ {Function} [success]: 操作结束的回调函数

- **说明**

指定工作表范围设置数据验证功能,并设置参数

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

### deleteDataVerification([setting])

[todo,待确认是否合理]

- **参数**

- {PlainObject} [setting]: 可选参数
+ {Array | Object | String} [range]: 数据验证的选区范围,支持选区的格式为`"A1:B2"`、`"sheetName!A1:B2"`或者`{row:[0,1],column:[0,1]}`,只能为单个选区;默认为当前选区
+ {Number} [order]: 工作表下标;默认值为当前工作表下标
+ {Function} [success]: 操作结束的回调函数

- **说明**

指定工作表范围删除数据验证功能

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

## 工作表保护


### setProtection(option, [setting])

[todo]

- **参数**

- {Object} [option]: 工作表保护的配置信息
- {PlainObject} [setting]: 可选参数
+ {Number} [order]: 工作表下标;默认值为当前工作表下标
+ {Function} [success]: 操作结束的回调函数

- **说明**

指定工作表设置工作表保护功能

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

## 公共方法

### transToCellData(data [,setting])<div id='transToCellData'></div>
Expand Down Expand Up @@ -2261,6 +2392,7 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开

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


## 旧版API

::: warning
Expand Down
19 changes: 19 additions & 0 deletions docs/zh/guide/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,25 @@ Luckysheet开放了更细致的自定义配置选项,分别有
- {String} [oldColor]: 修改前当前sheet页颜色
- {String} [newColor]: 修改后当前sheet页颜色

------------
### sheetZoomBefore
- 类型:Function
- 默认值:null
- 作用:sheet缩放前
- 参数:
- {Number} [i]: sheet页的`index`
- {String} [zoom]: 当前sheet页缩放比例

------------
### sheetZoomAfter
- 类型:Function
- 默认值:null
- 作用:sheet缩放后
- 参数:
- {Number} [i]: sheet页的`index`
- {String} [oldZoom]: 修改前当前sheet页缩放比例
- {String} [newZoom]: 修改后当前sheet页缩放比例

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

## 工作簿
Expand Down
Loading

0 comments on commit 28835bb

Please sign in to comment.