loader-module 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -0
- package/dist/demo.html +8 -0
- package/dist/loader-module.common.js +839 -0
- package/dist/loader-module.common.js.map +1 -0
- package/dist/loader-module.umd.js +849 -0
- package/dist/loader-module.umd.js.map +1 -0
- package/dist/loader-module.umd.min.js +2 -0
- package/dist/loader-module.umd.min.js.map +1 -0
- package/package.json +41 -0
- package/src/LoaderVuex.vue +46 -0
- package/src/components/Loader.vue +46 -0
- package/src/index.js +43 -0
- package/src/loaderModule.js +33 -0
- package/src/store/loaderModule.js +27 -0
- package/vue.config.js +8 -0
- package/webpack.config.js +19 -0
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# loader-module
|
|
2
|
+
|
|
3
|
+
Vue loader component with Vuex integration for Backend2 applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add loader-module
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Register the module in your Vuex store:
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
import { loaderModule } from 'loader-module'
|
|
17
|
+
|
|
18
|
+
const store = new Vuex.Store({
|
|
19
|
+
modules: {
|
|
20
|
+
loaderModule
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Use the component in your application:
|
|
26
|
+
|
|
27
|
+
```vue
|
|
28
|
+
<template>
|
|
29
|
+
<div>
|
|
30
|
+
<loader-vuex/>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import { LoaderVuex } from 'loader-module'
|
|
36
|
+
|
|
37
|
+
export default {
|
|
38
|
+
components: {
|
|
39
|
+
LoaderVuex
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Use the actions in your components:
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
// To show the loader
|
|
49
|
+
this.$store.dispatch('loaderModule/show')
|
|
50
|
+
|
|
51
|
+
// To hide the loader
|
|
52
|
+
this.$store.dispatch('loaderModule/hide')
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Props
|
|
56
|
+
|
|
57
|
+
The `LoaderVuex` component accepts these props:
|
|
58
|
+
|
|
59
|
+
- `opacity` (Number): Opacity of the overlay (default: 0.7)
|
|
60
|
+
- `zIndex` (Number): z-index of the overlay (default: 5)
|
|
61
|
+
- `size` (Number): Size of the loader in pixels (default: 64)
|
|
62
|
+
- `color` (String): Color of the loader (default: 'primary')
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT
|