diff --git a/README-zh.md b/README-zh.md index bb58550..ebe5d23 100644 --- a/README-zh.md +++ b/README-zh.md @@ -16,6 +16,10 @@ ![演示](/docs/.vuepress/public/img/LuckysheetDemo.gif) +## 插件 +- excel导入导出库: [Luckyexcel](https://github.com/mengshukeji/Luckyexcel) +- 图表插件: [chartMix](https://github.com/mengshukeji/chartMix) + ## 特性 ### 🛠️格式设置 @@ -85,6 +89,7 @@ + **矩阵计算** (通过右键菜单进行支持:对选区内的数据进行转置、旋转、数值计算) + **截图** (把选区的内容进行截图展示) + **复制到其他格式** (右键菜单的"复制为", 支持复制为json、array、对角线数据、去重等) ++ **EXCEL,CSV,TXT 导入及导出** (专为Luckysheet打造的导入导出插件,支持密码、水印、公式等的本地导入导出) ### ⏱️未来开发计划 + **插入图表和svg形状** (支持JPG,PNG,SVG,Pen tool的插入、修改和删除,并且随表格的变动而产生变化) @@ -93,7 +98,6 @@ + **单元格内多样式** (Alt+Enter单元格内换行、上标、下标、单元格内科定义每个文字的不同样式) + **树形菜单** (类似excel中的分级显示(分组)) + **表格新功能** (类似excel中表格的筛选器和切片器) -+ **EXCEL,CSV,TXT 导入及导出** (专为Luckysheet打造的导入导出插件,支持密码、水印、公式等的本地导入导出) + **文档** (完善文档和API) + **敬请期待...** (可以提出好的建议给我们) diff --git a/README.md b/README.md index b988d9e..c3003d8 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,10 @@ English| [简体中文](./README-zh.md) ![Demo](/docs/.vuepress/public/img/LuckysheetDemo.gif) +## Plugins +- Excel import and export library: [Luckyexcel](https://github.com/mengshukeji/Luckyexcel) +- Chart plugin: [chartMix](https://github.com/mengshukeji/chartMix) + ## Features ### 🛠️Formatting @@ -91,6 +95,7 @@ English| [简体中文](./README-zh.md) + **Matrix operation** (Operate selection through the right-click menu: transpose, rotate, numerical calculation) + **Screenshot** (Take a screenshot with selection) + **Copy to** (In the right-click menu, copy selection to json, array etc.) ++ **EXCEL,CSV,TXT import/export** (Specially adapted to Luckysheet) ### ⏱️Coming soon + **Insert picture and Shapes** (JPG,PNG,SVG,Pen tool and so on) @@ -99,7 +104,6 @@ English| [简体中文](./README-zh.md) + **Cell segmentation style** (Alt+Enter line break, sub,super, in-cell style) + **Tree menu** (Just like the outline (group) function of excel) + **Table new Features** (filter, slicer) -+ **EXCEL,CSV,TXT import/export** (Specially adapted to Luckysheet) + **Documentation** (Improve documentation and API) + **More...** (Please advise us) diff --git a/docs/zh/guide/api.md b/docs/zh/guide/api.md index f7e209e..726f1a4 100644 --- a/docs/zh/guide/api.md +++ b/docs/zh/guide/api.md @@ -66,9 +66,9 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开 - {Number} [row]: 单元格所在行数;从0开始的整数,0表示第一行 - {Number} [column]: 单元格所在列数;从0开始的整数,0表示第一列 - {String} [attr]: 属性类型,参考 [单元格属性表](/zh/guide/cell.html)的属性值 - - {String | Number | Object} [value]: 具体的设置值,一个属性会对应多个值,参考 [单元格属性表](/zh/guide/cell.html)的值示例,特殊情况:如果属性类型`attr`是单元格格式`ct`,则设置值`value`应提供`ct.fa`,比如设置A1单元格的格式为百分比格式: + - {String | Number | Object} [value]: 具体的设置值,一个属性会对应多个值,参考 [单元格属性表](/zh/guide/cell.html)的值示例,如果属性类型`attr`是单元格格式`ct`,则设置值`value`应提供ct对象,如:`{fa:"General", t:"g"}`,比如设置A1单元格的格式为百分比格式: - `luckysheet.setCellFormat(0, 0, "ct", "0.00%")` + `luckysheet.setCellFormat(0, 0, "ct", {fa:"0.00%", t:"n"})` - {PlainObject} [setting]: 可选参数 + {Number} [order]: 工作表索引;默认值为当前工作表索引 @@ -143,7 +143,7 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开 - **示例**: - 当前工作表查找`"value"`字符串并替换为`"out"` - `luckysheet.replaces("value", "out)` + `luckysheet.replace("value", "out")` ------------ @@ -1810,6 +1810,41 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开 `luckysheet.setSheetMove("left")` - 第二个工作表移动到第四个工作表的索引位置 `luckysheet.setSheetMove(3,{order:1})` +------------ + +### setSheetOrder(orderList [,setting]) + +- **参数**: + + - {Array} [orderList]: 工作表顺序,设置工作表的index和order来指定位置,如: + + ```json + [ + {index:'sheet_01',order: 2}, + {index:'sheet_02',order: 1}, + {index:'sheet_03',order: 0}, + ] + ``` + 数组中顺序并不重要,关键是指定sheet index和order的对应关系。 + + - {PlainObject} [setting]: 可选参数 + + {Function} [success]: 操作结束的回调函数 + +- **说明**: + + 重新排序所有工作表的位置,指定工作表顺序的数组。 + + +- **示例**: + + - 重排工作表,此工作簿含有3个工作表 + ```js + luckysheet.setSheetOrder([ + {index:'sheet_01',order: 2}, + {index:'sheet_02',order: 1}, + {index:'sheet_03',order: 0}, + ]) + ``` ------------