sone-ui-component-3.2.4 2.1.51 → 2.1.52
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/package.json +1 -1
- package/packages/luckySheet/src/main.vue +11 -6
- package/src/index.js +7 -4
- package/src/utils/util.js +1 -1
- package/lib/demo.html +0 -10
- package/lib/locale/lang/en.js +0 -26
- package/lib/locale/lang/zh-CN.js +0 -26
- package/lib/sone-ui.common.js +0 -38123
- package/lib/sone-ui.common.js.map +0 -1
- package/lib/sone-ui.css +0 -1
- package/lib/sone-ui.umd.js +0 -38123
- package/lib/sone-ui.umd.js.map +0 -1
- package/lib/sone-ui.umd.min.js +0 -24
- package/lib/sone-ui.umd.min.js.map +0 -1
package/package.json
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
<script>
|
|
13
13
|
import { deepClone, throttle } from "sone-ui-component/src/utils/util";
|
|
14
|
-
|
|
15
14
|
const initialData = [
|
|
16
15
|
{
|
|
17
16
|
name: "sheet1", //工作表名称
|
|
@@ -38,6 +37,10 @@ export default {
|
|
|
38
37
|
type: Array,
|
|
39
38
|
default: () => initialData,
|
|
40
39
|
},
|
|
40
|
+
options: {
|
|
41
|
+
type: Object,
|
|
42
|
+
default: () => {},
|
|
43
|
+
},
|
|
41
44
|
},
|
|
42
45
|
data() {
|
|
43
46
|
return {};
|
|
@@ -55,18 +58,20 @@ export default {
|
|
|
55
58
|
},
|
|
56
59
|
methods: {
|
|
57
60
|
getData() {
|
|
58
|
-
|
|
61
|
+
let data = this.$refs.luckysheet?.contentWindow?.getData();
|
|
62
|
+
return data;
|
|
59
63
|
},
|
|
60
64
|
exitEditMode() {
|
|
61
65
|
this.$refs.luckysheet?.contentWindow?.exitEditMode();
|
|
62
66
|
},
|
|
63
67
|
// 获取坐标值
|
|
64
68
|
getCellIndex() {
|
|
65
|
-
|
|
69
|
+
let index = this.$refs.luckysheet?.contentWindow?.getCellIndex();
|
|
70
|
+
return index;
|
|
66
71
|
},
|
|
67
72
|
// 设置单元格的值
|
|
68
|
-
setCellValue() {
|
|
69
|
-
this.$refs.luckysheet?.contentWindow?.setCellValue();
|
|
73
|
+
setCellValue(row, col, value) {
|
|
74
|
+
this.$refs.luckysheet?.contentWindow?.setCellValue(row, col, value);
|
|
70
75
|
},
|
|
71
76
|
intEditor: throttle(async function() {
|
|
72
77
|
await this.$nextTick();
|
|
@@ -74,7 +79,7 @@ export default {
|
|
|
74
79
|
typeof this.$refs.luckysheet.contentWindow.createEditor === "function"
|
|
75
80
|
) {
|
|
76
81
|
this.$refs.luckysheet.contentWindow.createEditor(
|
|
77
|
-
deepClone(this.value)
|
|
82
|
+
this.value ? deepClone(this.value) : deepClone(initialData),
|
|
78
83
|
this.disabled
|
|
79
84
|
);
|
|
80
85
|
} else {
|
package/src/index.js
CHANGED
|
@@ -17,7 +17,8 @@ import Editor from '../packages/editor/index.js';
|
|
|
17
17
|
import InputNumber from '../packages/inputNumber/index.js';
|
|
18
18
|
import Cascader from '../packages/cascader/index.js';
|
|
19
19
|
import Autocomplete from '../packages/autocomplete/index.js';
|
|
20
|
-
import FileUpload from '../packages/fileUpload/index.js';
|
|
20
|
+
import FileUpload from '../packages/fileUpload/index.js';
|
|
21
|
+
import LuckySheet from '../packages/luckySheet/index.js';
|
|
21
22
|
import locale from 'sone-ui-component/src/locale';
|
|
22
23
|
import 'sone-ui-component/src/utils/directives.js';
|
|
23
24
|
const components = [
|
|
@@ -37,7 +38,8 @@ const components = [
|
|
|
37
38
|
InputNumber,
|
|
38
39
|
Cascader,
|
|
39
40
|
Autocomplete,
|
|
40
|
-
FileUpload
|
|
41
|
+
FileUpload,
|
|
42
|
+
LuckySheet
|
|
41
43
|
];
|
|
42
44
|
|
|
43
45
|
const install = function(Vue, opts = {}) {
|
|
@@ -57,7 +59,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
export default {
|
|
60
|
-
version: '2.1.
|
|
62
|
+
version: '2.1.52',
|
|
61
63
|
locale: locale.use,
|
|
62
64
|
i18n: locale.i18n,
|
|
63
65
|
install,
|
|
@@ -78,5 +80,6 @@ export default {
|
|
|
78
80
|
InputNumber,
|
|
79
81
|
Cascader,
|
|
80
82
|
Autocomplete,
|
|
81
|
-
FileUpload
|
|
83
|
+
FileUpload,
|
|
84
|
+
LuckySheet
|
|
82
85
|
};
|
package/src/utils/util.js
CHANGED
package/lib/demo.html
DELETED
package/lib/locale/lang/en.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
if (typeof define === "function" && define.amd) {
|
|
3
|
-
define('sone/locale/en', ['module', 'exports'], factory);
|
|
4
|
-
} else if (typeof exports !== "undefined") {
|
|
5
|
-
factory(module, exports);
|
|
6
|
-
} else {
|
|
7
|
-
var mod = {
|
|
8
|
-
exports: {}
|
|
9
|
-
};
|
|
10
|
-
factory(mod, mod.exports);
|
|
11
|
-
global.SONE.lang = global.SONE.lang || {};
|
|
12
|
-
global.SONE.lang.en = mod.exports;
|
|
13
|
-
}
|
|
14
|
-
})(this, function (module, exports) {
|
|
15
|
-
'use strict';
|
|
16
|
-
|
|
17
|
-
exports.__esModule = true;
|
|
18
|
-
exports.default = {
|
|
19
|
-
sone: {
|
|
20
|
-
empty: {
|
|
21
|
-
description: 'No Data'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
module.exports = exports['default'];
|
|
26
|
-
});
|
package/lib/locale/lang/zh-CN.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
if (typeof define === "function" && define.amd) {
|
|
3
|
-
define('sone/locale/zh-CN', ['module', 'exports'], factory);
|
|
4
|
-
} else if (typeof exports !== "undefined") {
|
|
5
|
-
factory(module, exports);
|
|
6
|
-
} else {
|
|
7
|
-
var mod = {
|
|
8
|
-
exports: {}
|
|
9
|
-
};
|
|
10
|
-
factory(mod, mod.exports);
|
|
11
|
-
global.SONE.lang = global.SONE.lang || {};
|
|
12
|
-
global.SONE.lang.zhCN = mod.exports;
|
|
13
|
-
}
|
|
14
|
-
})(this, function (module, exports) {
|
|
15
|
-
'use strict';
|
|
16
|
-
|
|
17
|
-
exports.__esModule = true;
|
|
18
|
-
exports.default = {
|
|
19
|
-
sone: {
|
|
20
|
-
empty: {
|
|
21
|
-
description: '暂无数据'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
module.exports = exports['default'];
|
|
26
|
-
});
|