diff --git a/deploy.bat b/deploy.bat index e41a76f..a7d776b 100644 --- a/deploy.bat +++ b/deploy.bat @@ -24,5 +24,8 @@ npm publish # only publish npm run build +git add . +npm run commit npm version patch +git push -u origin master npm publish diff --git a/docs/guide/api.md b/docs/guide/api.md index 23fcca3..6f93f47 100644 --- a/docs/guide/api.md +++ b/docs/guide/api.md @@ -1823,7 +1823,6 @@ Use note: ### getAllSheets() -[todo] - **Explanation**: @@ -1844,6 +1843,13 @@ Use note: Returns a one-dimensional array `luckysheetfile` of all table data structures. Unlike the `getAllSheets` method, the worksheet parameters obtained by this method will contain many internal variables. The most obvious difference is that the table data operation will maintain `luckysheetfile[i]. data`, and the initialization data uses `options.data[i].celldata`, so `luckysheetfile` can be used for debugging, but the initialization table is not applicable. + In addition, a `load = 1` will be added to the loaded worksheet parameters, this parameter needs to be set to 0 when initializing the data. Therefore, to initialize the workbook with the data obtained by `getLuckysheetfile()`, two tasks need to be done: + + - Convert celldata to data, refer to: [transToData](/zh/guide/api.html#transtodata-celldata-setting) + - Load reset to 0 or delete this field + + Now there is `getAllSheets` to complete this work, no need to manually convert the data. + - **Usage**: - Get all the debugging information of the first worksheet diff --git a/docs/zh/guide/api.md b/docs/zh/guide/api.md index 461fef8..9fce0ab 100644 --- a/docs/zh/guide/api.md +++ b/docs/zh/guide/api.md @@ -1806,6 +1806,13 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开 返回所有表格数据结构的一维数组`luckysheetfile`,不同于`getAllSheets`方法,此方法得到的工作表参数会包含很多内部使用变量,最明显的区别是表格数据操作会维护`luckysheetfile[i].data`,而初始化数据采用的是`options.data[i].celldata`,所以`luckysheetfile`可用于调试使用,但是不适用初始化表格。 + 除此之外,加载过的工作表参数中会增加一个`load = 1`,这个参数在初始化数据的时候需要置为0才行。所以,将`getLuckysheetfile()`得到的数据拿来初始化工作簿,需要做两个工作: + + - celldata转为data,参考:[transToData](/zh/guide/api.html#transtodata-celldata-setting) + - load重置为0或者删除此字段 + + 现在已有`getAllSheets`来完成这个工作,无需再手动转化数据。 + - **示例**: - 取得第一个工作表的所有调试信息 diff --git a/docs/zh/guide/config.md b/docs/zh/guide/config.md index 5621fb8..3778e8b 100644 --- a/docs/zh/guide/config.md +++ b/docs/zh/guide/config.md @@ -213,6 +213,8 @@ Luckysheet开放了更细致的自定义配置选项,分别有 + 配置了`loadSheetUrl` + 配置了`updateUrl` + 注意,发送给后端的数据默认是经过pako压缩过后的。后台拿到数据需要先解压。 + 通过共享编辑功能,可以实现Luckysheet实时保存数据和多人同步数据,每一次操作都会发送不同的参数到后台,具体的操作类型和参数参见[表格操作](/zh/guide/operate.html) ------------ diff --git a/src/assets/iconfont/demo_index.html b/src/assets/iconfont/demo_index.html index d1f50f4..0354cb6 100644 --- a/src/assets/iconfont/demo_index.html +++ b/src/assets/iconfont/demo_index.html @@ -30,6 +30,30 @@