You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`serverAlias` - **Default:**`api` - Models are keyed by `serverAlias`. Access the `$FeathersVuex` Plugin and its models in your components by `this.$FeathersVuex.api.${Model}`
@@ -298,11 +304,16 @@ const defaultOptions = {
298
304
-`debug {Boolean}` - **Default:**`false` - Enable some logging for debugging
299
305
-`addOnUpsert {Boolean}` - **Default:**`false` - If `true` add new records pushed by 'updated/patched' socketio events into store, instead of discarding them.
300
306
-`autoRemove {Boolean}` - **Default:**`false` - If `true` automatically remove records missing from responses (only use with feathers-rest)
301
-
-`enableEvents {Boolean}` - **Default:**`true` - If `false` socket event listeners will be turned off. See the services [handleEvents API](/service-plugin.html#configuration)
302
307
-`preferUpdate {Boolean}` - **Default:**`false` - If `true`, calling `model.save()` will do an `update` instead of a `patch`.
303
308
-`replaceItems {Boolean}` - **Default:**`false` - If `true`, updates & patches replace the record in the store. Default is false, which merges in changes.
304
309
-`skipRequestIfExists {Boolean}` - **Default:**`false` - For get action, if `true` the record already exists in store, skip the remote request.
305
310
-`nameStyle {'short'|'path'}` - **Default:**`'short'` - Use the full service path as the Vuex module name, instead of just the last section.
311
+
-`enableEvents {Boolean}` - **Default:**`true` - If `false` socket event listeners will be turned off. See the services
312
+
-`handleEvents {Object}`: For this to work `enableEvents` must be `true`
313
+
-`created {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to add to the store
314
+
-`patched {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
315
+
-`updated {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
316
+
-`removed {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `removed` events, return true to remove from the store
306
317
307
318
Also see the [Configs per Service](/service-plugin.html#configuration)
@@ -67,11 +67,16 @@ The following options can also be configured in [Global Configuration](getting-s
67
67
-`debug {Boolean}` - **Default:**`globalConfig: false` - Enable some logging for debugging
68
68
-`addOnUpsert {Boolean}` - **Default:**`globalConfig: false` - If `true` add new records pushed by 'updated/patched' socketio events into store, instead of discarding them.
69
69
-`autoRemove {Boolean}` - **Default:**`globalConfig: false` - If `true` automatically remove records missing from responses (only use with feathers-rest)
70
-
-`enableEvents {Boolean}` - **Default:**`globalConfig: true` - If `false` socket event listeners will be turned off
71
70
-`preferUpdate {Boolean}` - **Default:**`globalConfig: false` - If `true`, calling `model.save()` will do an `update` instead of a `patch`.
72
71
-`replaceItems {Boolean}` - **Default:**`globalConfig: false` - If `true`, updates & patches replace the record in the store. Default is false, which merges in changes.
73
72
-`skipRequestIfExists {Boolean}` - **Default:**`globalConfig: false` - For get action, if `true` the record already exists in store, skip the remote request.
74
73
-`nameStyle {'short'|'path'}` - **Default:**`globalConfig: 'short'` - Use the full service path as the Vuex module name, instead of just the last section.
74
+
-`enableEvents {Boolean}` - **Default:**`globalConfig: true` - If `false` socket event listeners will be turned off
75
+
-`handleEvents {Object}`: For this to work `enableEvents` must be `true`
76
+
-`created {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to add to the store
77
+
-`patched {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
78
+
-`updated {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
79
+
-`removed {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `removed` events, return true to remove from the store
75
80
76
81
The following options can only configured individually per service plugin
77
82
@@ -80,11 +85,6 @@ The following options can only configured individually per service plugin
-`instanceDefaults {Function}` - **Default:**`() => ({})` - Override this method to provide default data for new instances. If using Model classes, specify this as a static class property.
82
87
-`setupInstance {Function}` - **Default:**`instance => instance` - Override this method to setup data types or related data on an instance. If using Model classes, specify this as a static class property.
83
-
-`handleEvents {Object}`: For this to work `enableEvents` must not be `false`
84
-
-`created {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to add to the store
85
-
-`patched {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
86
-
-`updated {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
87
-
-`removed {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `removed` events, return true to remove from the store
88
88
89
89
-`state {Object}` - **Default:**: `null` - Pass custom `states` to the service plugin or modify existing ones
90
90
-`getters {Object}` - **Default:**`null` - Pass custom `getters` to the service plugin or modify existing ones
0 commit comments