diff --git a/README.md b/README.md
index cd7484d..e52777d 100644
--- a/README.md
+++ b/README.md
@@ -235,22 +235,17 @@ export default {
-打赏的朋友欢迎**添加微信**或者进入前端开发交流群,交流前端开发中遇到的技术、问题和困惑。
+打赏的朋友欢迎**添加微信**,交流前端开发中遇到的技术、问题和困惑。
>【**仅添加**打赏过的用户,不定期删除屏蔽朋友圈的好友(为什么打赏了才能微信问问题?那别人为什么要先付出时间去解答你的问题?都是成年人了,人与人之间是价值交换,不是单向付出)】
> [常见问题](https://501351981.github.io/vue-office/examples/docs/guide/faq.html)
-
-
### 恳请各位大佬不吝点赞,开源不易,感谢支持~~
## 我的其他库
-- v-focus-next:一个Vue指令,使用该指令后,在表单中回车之后可以自动聚焦下一个表单元素,大大提升表单填写的流畅性。
-[《v-focus-next》](https://github.com/501351981/v-focus-next)
-
- HowToCode:前端编程之道,探讨如何写出高质量的前端代码,总结前端编程的各种方法论、原则、思维模型等。[《前端编程之道》](https://github.com/501351981/HowToCode)
diff --git a/core/packages/js-excel/package.json b/core/packages/js-excel/package.json
index d33dac7..4cee31b 100644
--- a/core/packages/js-excel/package.json
+++ b/core/packages/js-excel/package.json
@@ -1,7 +1,7 @@
{
"name": "@js-preview/excel",
"type" :"module",
- "version": "1.4.4",
+ "version": "1.4.5",
"description": "",
"main": "lib/index.js",
"files": [
diff --git a/core/packages/js-excel/src/main.js b/core/packages/js-excel/src/main.js
index cc69939..fd3d49d 100644
--- a/core/packages/js-excel/src/main.js
+++ b/core/packages/js-excel/src/main.js
@@ -67,7 +67,7 @@ class JsExcelPreview {
let swapFunc = this.xs.bottombar.swapFunc;
this.xs.bottombar.swapFunc = function (index) {
swapFunc.call(that.xs.bottombar, index);
- that.sheetIndex = index + 1;
+ that.sheetIndex = index;
setTimeout(()=>{
that.xs.reRender();
renderImage(that.ctx, that.mediasSource,that.workbookDataSource._worksheets[that.sheetIndex], that.offset);
@@ -100,7 +100,7 @@ class JsExcelPreview {
this.mediasSource = medias;
this.workbookDataSource = workbookSource;
this.offset = null;
- this.sheetIndex = 1;
+ this.sheetIndex = 0;
clearCache();
this.xs.loadData(workbookData);
renderImage(this.ctx, this.mediasSource,this.workbookDataSource._worksheets[this.sheetIndex], this.offset);
@@ -132,7 +132,10 @@ class JsExcelPreview {
preview(src){
return new Promise(((resolve, reject) => {
getData(src, this.requestOptions).then((res)=>{
- this.renderExcel(res).then(resolve);
+ this.renderExcel(res).then(resolve).catch(e =>{
+ this.xs.loadData({});
+ reject(e);
+ });
}).catch(e => {
this.xs.loadData({});
reject(e);