forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloading.vue
More file actions
65 lines (61 loc) · 1.47 KB
/
loading.vue
File metadata and controls
65 lines (61 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<template>
<div>
<div class="layout-padding">
<p class="caption">
Notify the user something is going on under the covers.
There is also the <em>progress</em> Dialog type you can use.
</p>
<div class="group">
<button class="light push" @click="noMessage()">
Show
</button>
<button class="primary push" @click="withMessage()">
Show With Message
</button>
</div>
<p class="caption">
You can use a custom spinner.
</p>
<button class="light push" @click="customSpinner()">
Custom Spinner
</button>
<p class="caption">
...with a custom color and spinner size.
</p>
<button class="light push" @click="customColorSpinner()">
Custom Color and Size Spinner
</button>
</div>
</div>
</template>
<script>
import { Loading } from 'quasar'
function show (options) {
Loading.show(options)
setTimeout(() => {
Loading.hide()
}, 3000)
}
export default {
methods: {
noMessage () {
show()
},
customSpinner () {
show({spinner: 'facebook'})
},
customColorSpinner () {
show({
spinner: 'pie',
spinnerColor: '#027be3',
spinnerSize: 220,
message: 'Some important process is in progress. Hang on...',
messageColor: '#ef0'
})
},
withMessage () {
show({message: 'Some important process is in progress. Hang on...'})
}
}
}
</script>