Skip to content

Commit 1275edc

Browse files
committed
configurable option
1 parent 29dfc22 commit 1275edc

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

index.js

+13-11
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ export default {
1717

1818
Vue.mixin({
1919
created() {
20-
if (options.hasOwnProperty('bg')) {
21-
vm.bg = options.bg
22-
}
23-
if (options.hasOwnProperty('icon')) {
24-
vm.icon = options.icon
25-
}
26-
if (options.hasOwnProperty('size')) {
27-
vm.size = options.size
28-
}
29-
if (options.hasOwnProperty('icon_color')) {
30-
vm.icon_color = options.icon_color
20+
if (options!==null && options !== undefined) {
21+
if (options.hasOwnProperty('bg')) {
22+
vm.bg = options.bg
23+
}
24+
if (options.hasOwnProperty('icon')) {
25+
vm.icon = options.icon
26+
}
27+
if (options.hasOwnProperty('size')) {
28+
vm.size = options.size
29+
}
30+
if (options.hasOwnProperty('icon_color')) {
31+
vm.icon_color = options.icon_color
32+
}
3133
}
3234
}
3335
})

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuejs-loading-screen",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "Blocking screen while process worked",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)