17
17
``` javascript
18
18
// main.js
19
19
...
20
- import VueThemeManager from ' vue-theme-manager
20
+ import VueThemeManager from ' vue-theme-manager'
21
21
...
22
22
let themeOptions = {
23
23
activate: ' light' ,
@@ -62,7 +62,7 @@ import VueThemeManager from 'vue-theme-manager'
62
62
Vue .use (VueThemeManager,themeOptions);
63
63
```
64
64
65
- ```
65
+ ``` javascript
66
66
// nuxt.config.js
67
67
plugins: {
68
68
...
@@ -79,7 +79,7 @@ plugins:{
79
79
Plugin accepts ` object ` during initialization with props [ This is Optional] :
80
80
81
81
``` javascript
82
- Vue.use(VueThemeManager,{activate:' ' ,styles{} })
82
+ Vue .use (VueThemeManager,{activate: ,styles})
83
83
```
84
84
85
85
1 . ` activate:'string' ` ---this will be the activated theme when plugin is initialized. Note default theme is ` default ` [ This is optional]
@@ -199,13 +199,20 @@ this.$AppTheme.addTheme({textColor:'red',backgroundColor:'gold','splash',true});
199
199
*themeName = "String" intended name for theme @optional default is "default"
200
200
*activate = boolean --activate theme or not
201
201
*/
202
- this .$AppTheme .saveTheme (); // save theme to db ..this can be changed like this
202
+
203
+ this .$AppTheme .saveTheme (); // save theme to db
204
+
205
+ // this can also be changed like this
203
206
this .$AppTheme .addTheme (... ).saveTheme ();
204
207
208
+
209
+
205
210
this .$AppTheme .activateTheme (themeName);
206
211
// where themeName is a `String` which is already contained in the themeOptions
207
212
208
- this .$AppTheme .getTheme (array,themeName);
213
+
214
+
215
+ this .$AppTheme .getTheme (themeName,array);
209
216
// returns object of themeOptions
210
217
array = themeoptions to be gotten like [' textColor' ,' backgroundColor' ]
211
218
themeName = name of theme to get options from
0 commit comments