Skip to content

Commit fc396fe

Browse files
committed
update readme.
1 parent 230785b commit fc396fe

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,21 @@ Vue.use(loading)
2222

2323
```vue
2424
<template>
25+
<h1>Welcome to Vue Loading Screen</h1>
2526
</template>
27+
28+
<script>
29+
methods: {
30+
fetchData () {
31+
this.$isLoading(true) // show loading screen
32+
this.$axios.post(url).then((response) => {
33+
this.$isLoading(false) // hide loading screen
34+
console.log(response)
35+
})
36+
}
37+
},
38+
mounted () {
39+
this.fetchData()
40+
}
41+
</script>
2642
```

0 commit comments

Comments
 (0)