Skip to content
This repository was archived by the owner on Feb 24, 2023. It is now read-only.

Commit 2acae33

Browse files
author
Łukasz Florczak
committed
Put all settings in one options object
1 parent 68f9b8e commit 2acae33

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Agile.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@
6363
default: true
6464
},
6565
66+
options: {
67+
type: Object,
68+
default: function () {
69+
return null
70+
}
71+
},
72+
6673
pauseOnDotsHover: {
6774
type: Boolean,
6875
default: false
@@ -125,6 +132,13 @@
125132
},
126133
127134
mounted () {
135+
// Read settings from options object
136+
if (this.options) {
137+
for (let key in this.options) {
138+
this[key + '_'] = this.options[key]
139+
}
140+
}
141+
128142
// Protection against contradictory settings
129143
if (this.autoplay_) {
130144
this.infinite_ = true

0 commit comments

Comments
 (0)