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
The `FeathersVuexFind` component retrieves data from the API server, puts it in the Vuex store, then transparently retrieves the live, reactive data from the store and displays it to the user.
<FeathersVuexGetv-slot="{ item: user }"service="users":id="id":params="params":watch="[id, params]">
90
89
{{ user }}
91
-
</template>
92
90
</FeathersVuexGet>
93
91
</template>
94
92
@@ -163,8 +161,8 @@ The `<FeathersVuexGet>` component has these unique props.
163
161
When using these components, the scope data will become available to the first element nested inside the `FeathersVuexFind` or `FeathersVuexGet` tags. It's accessible using the `scope-data="props"` attribute:
@@ -187,11 +185,11 @@ It's also possible to modify the scope data by passing a function as the `edit-s
187
185
188
186
### Destructuring props
189
187
190
-
Use the object destructuring syntax to pull specific variables out of the `slot-scope` object. In the following example, instead of using `slot-scope="props"`, it directly accesses the `items` prop through destructuring:
188
+
Use the object destructuring syntax to pull specific variables out of the `slot-scope` object. In the following example, instead of using `v-slot="props"`, it directly accesses the `items` prop through destructuring:
@@ -202,8 +200,8 @@ Use the object destructuring syntax to pull specific variables out of the `slot-
202
200
You can also rename scope props through the Object destructuring syntax. The `slot-scope` in the next example shows how to give the items a more-descriptive name:
@@ -216,8 +214,8 @@ You can also rename scope props through the Object destructuring syntax. The `
216
214
In this example, only the `service` attribute is provided. There is no `query` nor `id` provided, so no queries are made. So `props.items` in this example returns an empty array.
217
215
218
216
```html
219
-
<FeathersVuexFindservice="todos">
220
-
<divslot-scope="props">
217
+
<FeathersVuexFind v-slot="props"service="todos">
218
+
<div>
221
219
{{props.items}}
222
220
</div>
223
221
</FeathersVuexFind>
@@ -228,8 +226,8 @@ In this example, only the `service` attribute is provided. There is no `query` n
228
226
This example fetches data from the API server because a query was provided. Internally, this same `query` is used for both the `find` action and the `find` getter. Read other examples to see how to use distinct queries. Be aware that if you use pagination directives like `$skip` or `$limit`, you must use two queries to get the records you desire.
0 commit comments