Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit045b69c

Browse files
committed
fix plugins options issue
1 parent5610b89 commit045b69c

File tree

7 files changed

+18
-34
lines changed

7 files changed

+18
-34
lines changed

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ It's optional, and defaulted as:
8989
}]
9090
},
9191
widthRatio:.14,
92-
exportStyle:true,
9392
plugins: []
9493
}
9594
```
@@ -105,11 +104,12 @@ Plugin helps to extend the ability of transforming table to excel.
105104
Build-in plugins can be access like:
106105

107106
```js
108-
Table2Excel.plugins.fontPlugin
109-
Table2Excel.plugins.alignmentPlugin
107+
Table2Excel.plugins.fontPlugin,
108+
Table2Excel.plugins.fillPlugin,
109+
Table2Excel.plugins.formPlugin,
110+
Table2Excel.plugins.alignmentPlugin,
111+
Table2Excel.plugins.hyperlinkPlugin,
110112
Table2Excel.plugins.autoWidthPlugin
111-
Table2Excel.plugins.formPlugin
112-
Table2Excel.plugins.hyperlinkPlugin
113113
```
114114

115115
A plugin can be defined to join different phase of table to excel process, and in different phase, plugin is able to access different objects from context.

‎dist/table2excel.core.js‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎dist/table2excel.min.js‎

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/js/table2excel.core.js‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/js/table2excel.min.js‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"table2excel.js",
3-
"version":"0.6.6",
3+
"version":"0.6.7",
44
"description":"",
55
"main":"es5/index.js",
66
"scripts": {

‎src/table2excel.js‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ const DEFAULT_WORKBOOK_OPTIONS = {
1313
constDEFAULT_OPTIONS={
1414
workbook:DEFAULT_WORKBOOK_OPTIONS,
1515
widthRatio:WIDTH_RATIO,
16-
exportStyle:true,
17-
plugins:[]
16+
plugins:[...Object.values(plugins)]
1817
}
1918

2019
exportdefaultclassTable2Excel{
@@ -28,11 +27,6 @@ export default class Table2Excel {
2827

2928
this.options=Object.assign({},DEFAULT_OPTIONS,options)
3029

31-
// setup plugins
32-
if(this.options.exportStyle){
33-
this.options.plugins=[...Object.values(plugins), ...this.options.plugins]
34-
}
35-
3630
this.plugins={}
3731
PLUGIN_FUNCS.forEach(funName=>{
3832
this.plugins[funName]=this.options.plugins.filter(plugin=>plugin[funName]).map(plugin=>plugin[funName])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp