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

Commit

Permalink
Merge branch 'temp' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-f committed Dec 23, 2020
2 parents 973eec8 + a59c7e5 commit 92c7a27
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 63 deletions.
11 changes: 10 additions & 1 deletion docs/guide/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ In this case, after Luckysheet is modified in real time, the changes can be seen
**<span style="font-size:20px;">A</span>** You need to introduce a chart plugin to use it. You should configure the chart plugin to use when the workbook is initialized. Refer to

- Plugins configuration [plugins](/guide/config.html#plugins)
- 或 官方demo [/src/index.html](https://github.com/mengshukeji/Luckysheet/blob/master/src/index.html)
- 或 官方demo [src/index.html](https://github.com/mengshukeji/Luckysheet/blob/master/src/index.html)

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

Expand Down Expand Up @@ -291,4 +291,13 @@ luckysheet.setRangeShow("A2",{show:false})

**<span style="font-size:20px;">A</span>** In the source code [src/controllers/hander.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/handler.js), search for `event.which == "3"` to find the code executed by the right-click event.

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

## **<span style="font-size:20px;">Q</span>** How to add a custom toolbar?

**<span style="font-size:20px;">A</span>** No configuration is currently provided, you can refer to the implementation of the print button in the toolbar to modify the source code:
1. Search for `luckysheet-icon-print` globally to find the implementation of the print button, in [src/controllers/constant.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/constant.js) add a similar template string, you need to customize a unique id
2. Modify [src/controllers/resize.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/resize.js) and add a new record in the toobarConfig object
3. Modify [src/controllers/menuButton.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/menuButton.js) to add an event listener

------------
6 changes: 5 additions & 1 deletion docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ There are two ways to introduce dependencies
<script src="https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js"></script>
```

Note that `https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js` will pull the latest luckysheet code. If you want to specify the luckysheet version, please add the version number after the luckysheet , Such as: `https://cdn.jsdelivr.net/npm/[email protected]/dist/luckysheet.umd.js`
Note that the path of `https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js` means that the latest luckysheet code will be pulled, but if Luckysheet has just been released, the jsdelivr website may not have time Synchronize from npm, so using this path will still pull to the previous version. We recommend that you directly specify the latest version.

To specify the Luckysheet version, please add the version number after all CDN dependent files, such as: `https://cdn.jsdelivr.net/npm/[email protected]/dist/luckysheet.umd.js`.

> How do I know which version is the latest version? View the latest [release record](https://github.com/mengshukeji/Luckysheet/releases) or [package.json](https://github.com/mengshukeji/Luckysheet/blob/master/package.json)` version` field.
If it is not convenient to access jsdelivr.net, you can also import it locally

Expand Down
1 change: 1 addition & 0 deletions docs/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Use note:
1. When script is introduced globally, all APIs are mounted under the window.luckysheet object, which can be printed and seen in the browser console; when npm is introduced, all APIs are also mounted under the luckysheet object
2. The first parameter of the `success` callback function is the return value of the API method
3. If you need a new API, please submit it to github [Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose), and decide whether to open the new API according to the number of likes
4. The required `order` parameter in the API method is the value of `order` in the worksheet object, not `index`

## Cell operation

Expand Down
13 changes: 12 additions & 1 deletion docs/zh/guide/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ Luckysheet教程里采用的CDN链接是 [jsdelivr](https://www.jsdelivr.com/pac
**<span style="font-size:20px;">A</span>** 需要引入图表插件才能使用,工作簿初始化的时候应该配置图表插件使用,参考

- 插件配置 [plugins](/zh/guide/config.html#配置项)
- 或 官方demo [/src/index.html](https://github.com/mengshukeji/Luckysheet/blob/master/src/index.html)
- 或 官方demo [src/index.html](https://github.com/mengshukeji/Luckysheet/blob/master/src/index.html)

通常,参考demo配置完后就可以和demo一样正常使用了,但是还是会偶现`chartmix is not defined`,这时需要在谷歌浏览器控制台的network里检查下图表的依赖是否都加载了,有5项依赖需要关注:`vue / vuex / element-ui / echarts / chartmix.umd.js`

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

Expand Down Expand Up @@ -292,4 +294,13 @@ luckysheet.setRangeShow("A2",{show:false})

**<span style="font-size:20px;">A</span>** 在源码的 [src/controllers/hander.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/handler.js) 搜索`event.which == "3"`即可找到右键事件触发执行的代码。

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

## **<span style="font-size:20px;">Q</span>** 如何添加自定义工具栏?

**<span style="font-size:20px;">A</span>** 暂未提供配置,可以参照工具栏打印按钮的实现来修改源码:
1. 全局搜索 `luckysheet-icon-print`即可找到打印按钮的实现,在 [src/controllers/constant.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/constant.js) 中增加一个类似的模板字符串,需要自定义一个唯一id
2. 修改 [src/controllers/resize.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/resize.js) ,在toobarConfig对象中新增一条记录
3. 修改 [src/controllers/menuButton.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/menuButton.js) ,新增一个事件监听

------------
6 changes: 5 additions & 1 deletion docs/zh/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ npm run build
<script src="https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js"></script>
```

注意,`https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js`这个路径会拉取到最新的luckysheet代码,想要指定luckysheet版本,请在luckysheet后面加上版本号,如:`https://cdn.jsdelivr.net/npm/[email protected]/dist/luckysheet.umd.js`
注意,`https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js`这个路径意思是会拉取到最新的luckysheet代码,但是如果Luckysheet刚刚发布,jsdelivr网站可能还没来得及从npm上同步过去,故而使用这个路径还是会拉到上一个版本,我们推荐您直接指定最新版本。

想要指定Luckysheet版本,请在所有的CDN依赖文件后面加上版本号,如:`https://cdn.jsdelivr.net/npm/[email protected]/dist/luckysheet.umd.js`

> 如何知道最新版本是哪一版?查看最新 [release记录](https://github.com/mengshukeji/Luckysheet/releases) 或者 [package.json](https://github.com/mengshukeji/Luckysheet/blob/master/package.json)`version`字段。
如果不方便访问 jsdelivr.net,还可以采用本地方式引入

Expand Down
1 change: 1 addition & 0 deletions docs/zh/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开
1. script全局引入时,所有API均挂载到window.luckysheet对象下面,可以在浏览器控制台打印看到;npm引入时,API也全部挂载在luckysheet对象下
2. `success`回调函数第一个参数为API方法的返回值
3. 需要新的API请到github [Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose)中提交,根据点赞数决定是否开放新API
4. API方法中所需的`order`参数为工作表对象中的`order`的值,而不是`index`

## 单元格操作

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guide/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ Luckysheet开放了更细致的自定义配置选项,分别有

------------
### rangePasteBefore
(TODO)

- 类型:Function
- 默认值:null
- 作用:选区粘贴前
Expand Down
58 changes: 0 additions & 58 deletions src/css/luckysheet-core.css
Original file line number Diff line number Diff line change
Expand Up @@ -522,64 +522,6 @@
/* opacity: .54; */
}


/* .luckysheet-icon-img {
background: url(menuSprite.svg);
content: url(menuSprite.svg);
}
.luckysheet-icon-img-container {
height: 424px;
position: absolute;
width: 590px;
}
.luckysheet-icon-img-container {
height: 1886px;
position: absolute;
width: 108px;
}
.luckysheet-icon-img {
background: url(sprite38.svg);
content: url(sprite38.svg);
}
.luckysheet-icon-print {
left: -54px;
top: -90px;
}
.luckysheet-icon-undo {
left: -90px;
top: -1642px;
}
.luckysheet-icon-redo {
left: 0;
top: -1188px;
}
.luckysheet-icon-paintformat {
left: -90px;
top: -550px;
}
.luckysheet-icon-decimal-decrease {
left: -36px;
top: -1444px;
} */

/* .toolbar-decimal-icon {
margin-bottom: -4px;
} */

/* .luckysheet-icon-decimal-increase {
left: -36px;
top: -1660px;
} */

#luckysheet-icon-fmt-other .luckysheet-toolbar-menu-button-caption {
overflow: hidden;
text-overflow: ellipsis;
Expand Down

0 comments on commit 92c7a27

Please sign in to comment.