Skip to content

Commit 7c3357a

Browse files
chore: Adjust docs for vue 3
1 parent c5966a3 commit 7c3357a

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Dependabot](https://img.shields.io/badge/dependabot-enabled-success)](https://github.com/technowledgy/vue-postgrest/blob/main/package.json)
66
[![License](https://img.shields.io/npm/l/vue-postgrest)](https://github.com/technowledgy/vue-postgrest/blob/main/LICENSE)
77
[![npm](https://img.shields.io/npm/v/vue-postgrest)](https://www.npmjs.com/package/vue-postgrest)
8-
![vue](https://img.shields.io/badge/vue-2.x-brightgreen)
8+
![vue](https://img.shields.io/badge/vue-3.x-brightgreen)
99

1010
</div>
1111

@@ -28,10 +28,10 @@ yarn add vue-postgrest
2828
Import and install the Plugin in your `main.js`:
2929

3030
``` javascript
31-
import Vue from 'vue'
31+
import { createApp } from 'vue'
3232
import Postgrest from 'vue-postgrest'
3333

34-
Vue.use(Postgrest)
34+
createApp(...).use(Postgrest)
3535
```
3636

3737
You can use the `<postgrest>` component:

docs/api/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ The `vue-postgrest` module exports a plugin, a mixin and several helper function
2424
- **Example:**
2525

2626
``` js
27-
import Vue from 'vue'
27+
import { createApp } from 'vue'
2828
import VuePostgrest from 'vue-postgrest'
2929

30-
Vue.use(VuePostgrest)
30+
createApp(...).use(VuePostgrest)
3131
```
3232

3333
### pg - Mixin
@@ -143,7 +143,7 @@ Instances of PrimaryKeyError are thrown, when no primary keys are found for the
143143

144144
## Plugin Options
145145

146-
Global options can be set when initializing Vue-Postgrest with `Vue.use`.
146+
Global options can be set when initializing VuePostgrest with `app.use`.
147147

148148
### apiRoot
149149

@@ -164,7 +164,7 @@ Global options can be set when initializing Vue-Postgrest with `Vue.use`.
164164
``` js
165165
import VuePostgrest from 'vue-postgrest'
166166

167-
Vue.use(VuePostgrest, {
167+
app.use(VuePostgrest, {
168168
apiRoot: '/api/'
169169
})
170170
```
@@ -184,7 +184,7 @@ Global options can be set when initializing Vue-Postgrest with `Vue.use`.
184184
``` js
185185
import VuePostgrest from 'vue-postgrest'
186186

187-
Vue.use(VuePostgrest, {
187+
app.use(VuePostgrest, {
188188
apiRoot: '/api/',
189189
headers: {
190190
Prefer: 'timezone=' + Intl.DateTimeFormat().resolvedOptions().timeZone

docs/guide/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ npm install vue-postgrest
1515
The default export provides the plugin to use in your `main.js`. When installing the plugin, you can pass the root URI of your PostgREST server as a plugin option. All requests to the API made by the mixin, component or instance methods will use this URI as base.
1616

1717
``` js
18-
import Vue from 'vue'
18+
import { createApp } from 'vue'
1919
import VuePostgrest from 'vue-postgrest'
2020

21-
Vue.use(VuePostgrest, {
21+
createApp(...).use(VuePostgrest, {
2222
apiRoot: '/api/v1/'
2323
})
2424
```

docs/start/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ yarn add vue-postgrest
1010
Import and install the Plugin in your `main.js`:
1111

1212
``` javascript
13-
import Vue from 'vue'
13+
import { createApp } from 'vue'
1414
import Postgrest from 'vue-postgrest'
1515

16-
Vue.use(Postgrest)
16+
createApp(...).use(Postgrest)
1717
```
1818

1919
You can use the `<postgrest>` component:

0 commit comments

Comments
 (0)