diff --git a/README-zh.md b/README-zh.md index 1442653..e32b568 100644 --- a/README-zh.md +++ b/README-zh.md @@ -21,6 +21,10 @@ - excel导入导出库: [Luckyexcel](https://github.com/mengshukeji/Luckyexcel) - 图表插件: [chartMix](https://github.com/mengshukeji/chartMix) +## 支持 +Luckysheet是MIT许可的开源项目,其持续的开发完全有赖于许多出色支持者的支持。如果您想加入他们,请考虑: +- [kickstarter](https://www.kickstarter.com/projects/luckysheet/luckysheet) + ## 特性 ### 🛠️格式设置 diff --git a/README.md b/README.md index 687f861..79854a0 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,10 @@ English| [简体中文](./README-zh.md) - Excel import and export library: [Luckyexcel](https://github.com/mengshukeji/Luckyexcel) - Chart plugin: [chartMix](https://github.com/mengshukeji/chartMix) +## Support +Luckysheet is an MIT-licensed open source project with its ongoing development made possible entirely by the support of many awesome backers. If you'd like to join them, please consider: +- [kickstarter](https://www.kickstarter.com/projects/luckysheet/luckysheet) + ## Features ### 🛠️Formatting diff --git a/docs/guide/api.md b/docs/guide/api.md index e3b46a6..59b02cd 100644 --- a/docs/guide/api.md +++ b/docs/guide/api.md @@ -2026,6 +2026,26 @@ Use note: ------------ +### scroll([setting]) + +[todo] + + +- **参数**: + + - {PlainObject} [setting]: optional parameters + + {Number} [scrollWidth]: horizontal scroll value. The default is the current horizontal scroll position. + + {Number} [scrollHeight]: Vertical scroll value. The default is the current vertical scroll position. + + {Number} [targetRow]: Scroll vertically to the specified row number. The default is the current vertical scroll position. + + {Number} [targetColumn]: scroll horizontally to the specified column number. The default is the current horizontal scroll position. + + {Function} [success]: The callback function after the table is refreshed successfully + +- **说明**: + + Scroll current worksheet position + +------------ + ### resize([setting]) - **Parameter**: diff --git a/docs/guide/sheet.md b/docs/guide/sheet.md index f0e528b..872bbdc 100644 --- a/docs/guide/sheet.md +++ b/docs/guide/sheet.md @@ -17,6 +17,8 @@ eg: options.data: "hide": 0,//Whether worksheet hide "row": 36, //the number of rows in a sheet "column": 18, //the number of columns in a sheet + "defaultRowHeight": 19, //Customized default row height + "defaultColWidth": 73, //Customized default column width "celldata": [], //Initial the cell data "config": { "merge":{}, //merged cells @@ -76,9 +78,9 @@ eg: options.data: ------------ ### index -- type:Number -- default:0 -- usage:Worksheet index, starting from 0 +- type:String +- default:"" +- usage:The worksheet index is used as a unique key value, and a random string is automatically assigned when a worksheet is added. Note that `index` is not the order of worksheets, and is distinguished from `order`. ------------ ### status @@ -90,7 +92,7 @@ eg: options.data: ### order - type:Number - default:0 -- usage: The index of the worksheets is starting from 0. it will increase when a worksheet is added. +- usage:The subscript of the worksheet represents the order in which the worksheet is displayed in the sheet bar at the bottom. It will increase when a worksheet is added, starting from 0 ------------ ### hide @@ -108,7 +110,19 @@ eg: options.data: ### column - type:Number - default:18 -- usage: The number of cell columns +- usage: Number of cell columns + +------------ +### defaultRowHeight +- type:Number +- default:19 +- usage: Customized default row height, unit is px + +------------ +### defaultColWidth +- type:Number +- default:73 +- usage: Customized default column width, unit is px ------------ ### celldata diff --git a/docs/zh/guide/api.md b/docs/zh/guide/api.md index ee084fa..a53bd87 100644 --- a/docs/zh/guide/api.md +++ b/docs/zh/guide/api.md @@ -1973,6 +1973,26 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开 ------------ +### scroll([setting]) + +[todo] + + +- **参数**: + + - {PlainObject} [setting]: 可选参数 + + {Number} [scrollWidth]:横向滚动值。默认为当前横向滚动位置。 + + {Number} [scrollHeight]:纵向滚动值。默认为当前纵向滚动位置。 + + {Number} [targetRow]:纵向滚动到指定的行号。默认为当前纵向滚动位置。 + + {Number} [targetColumn]:横向滚动到指定的列号。默认为当前横向滚动位置。 + + {Function} [success]: 表格刷新成功后的回调函数 + +- **说明**: + + 滚动当前工作表位置 + +------------ + ### resize([setting]) - **参数**: @@ -2278,6 +2298,7 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开 按照scrollWidth, scrollHeight刷新canvas展示数据。 + > 推荐使用新API: [scroll](#scroll([setting])) ------------ ### setcellvalue(r, c, d, v) diff --git a/docs/zh/guide/sheet.md b/docs/zh/guide/sheet.md index e16f3c0..ab1fbaa 100644 --- a/docs/zh/guide/sheet.md +++ b/docs/zh/guide/sheet.md @@ -13,10 +13,12 @@ options.data示例如下: "color": "", //工作表颜色 "index": 0, //工作表索引 "status": 1, //激活状态 - "order": 0, //工作表的顺序 + "order": 0, //工作表的下标 "hide": 0,//是否隐藏 "row": 36, //行数 "column": 18, //列数 + "defaultRowHeight": 19, //自定义行高 + "defaultColWidth": 73, //自定义列宽 "celldata": [], //初始化使用的单元格数据 "config": { "merge":{}, //合并单元格 @@ -77,9 +79,9 @@ options.data示例如下: ------------ ### index -- 类型:Number -- 默认值:0 -- 作用:工作表索引,从0开始 +- 类型:String +- 默认值:"" +- 作用:工作表索引,作为唯一key值使用,新增工作表时会自动赋值一个随机字符串。注意`index`不是工作表顺序,和`order`区分开。 ------------ ### status @@ -91,7 +93,7 @@ options.data示例如下: ### order - 类型:Number - 默认值:0 -- 作用: 工作表的索引,新增工作表时会递增,从0开始 +- 作用: 工作表的下标,代表工作表在底部sheet栏展示的顺序,新增工作表时会递增,从0开始 ------------ ### hide @@ -111,6 +113,18 @@ options.data示例如下: - 默认值:18 - 作用: 单元格列数 +------------ +### defaultRowHeight +- 类型:Number +- 默认值:19 +- 作用: 自定义的默认行高,单位为px + +------------ +### defaultColWidth +- 类型:Number +- 默认值:73 +- 作用: 自定义的默认列宽,单位为px + ------------ ### celldata - 类型:Array @@ -1263,7 +1277,7 @@ Luckysheet在初始化完成之后进行的一系列操作,会将更多本地 "color": "", //工作表颜色 "index": 0, //工作表索引 "status": 1, //激活状态 - "order": 0, //工作表的顺序 + "order": 0, //工作表的下标 "hide": 0,//是否隐藏 "row": 36, //行数 "column": 18, //列数 diff --git a/src/controllers/constant.js b/src/controllers/constant.js index 71344c8..a8fc92c 100644 --- a/src/controllers/constant.js +++ b/src/controllers/constant.js @@ -315,7 +315,7 @@ function rightclickHTML(){
@@ -360,12 +360,11 @@ function rightclickHTML(){