@jspreadsheet/vue 11.11.3 → 11.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, getCurrentInstance } from 'vue';
|
|
1
|
+
import { h, getCurrentInstance, camelize } from 'vue';
|
|
2
2
|
import jss from "jspreadsheet";
|
|
3
3
|
|
|
4
4
|
export const Worksheet = {
|
|
@@ -10,9 +10,11 @@ export const Spreadsheet = {
|
|
|
10
10
|
mounted() {
|
|
11
11
|
const { attrs, slots } = getCurrentInstance();
|
|
12
12
|
|
|
13
|
-
let options = {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
let options = {};
|
|
14
|
+
for (const key in attrs) {
|
|
15
|
+
options[camelize(key)] = attrs[key];
|
|
16
|
+
}
|
|
17
|
+
|
|
16
18
|
if (slots && typeof(slots.default) === 'function') {
|
|
17
19
|
options.worksheets = slots.default().reduce((acc, vnode) => {
|
|
18
20
|
if (vnode.type.name === "Worksheet") {
|
|
@@ -78,4 +80,4 @@ export const Picker = {
|
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
|
|
81
|
-
export default { Worksheet, Spreadsheet, jspreadsheet };
|
|
83
|
+
export default { Worksheet, Spreadsheet, Picker, jspreadsheet };
|