Skip to content

Commit 143d2fe

Browse files
authored
Update README.md
1 parent 558a215 commit 143d2fe

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,47 @@ Using to block whlie client processed work. Please checkout [Demo](https://helma
44
![Screenshot](./src/assets/screenshot.png)
55

66
## Installation
7+
8+
For vue 2
9+
710
```
811
npm i --save vuejs-loading-screen
912
```
1013

14+
or with vue 3
15+
16+
```
17+
npm i --save vue3-loading-screen
18+
```
19+
1120
## Usage
21+
22+
Vue2:
23+
1224
```js
1325
import Vue from 'vue'
1426
import loading from 'vuejs-loading-screen'
1527

1628
Vue.use(loading)
1729
```
1830

31+
Vue3:
32+
33+
```js
34+
import {createApp} from 'vue'
35+
import App from './App.vue'
36+
import Loading from 'vue3-loading-screen'
37+
38+
cosnt app = createApp(App)
39+
40+
app.use(Loading, /*{...}*/)
41+
42+
app.mount('#app')
43+
44+
```
45+
46+
From now you can use `$isLoading` as globally function to trigger show/hide loading screen.
47+
1948
```vue
2049
<template>
2150
<h1>Welcome to VueLoading Screen</h1>

0 commit comments

Comments
 (0)