vue-is-loading
Advanced tools
Comparing version
{ | ||
"name": "vue-is-loading", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A Vue 3 JavaScript port of https://github.com/VitorLuizC/vue-loadable", | ||
@@ -11,2 +11,3 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"lodash": "^4.17.21", | ||
"vue": "^3" | ||
@@ -13,0 +14,0 @@ }, |
@@ -101,3 +101,3 @@ # vue-is-loading | ||
```vue | ||
```javascript | ||
const agreeToTos = ref(false); | ||
@@ -109,2 +109,8 @@ | ||
); | ||
``` | ||
``` | ||
## Changelog | ||
### 1.0.1 | ||
- Fixes `loadable` to work with Vue's Composition API with `<script setup>`. |
@@ -47,4 +47,4 @@ import { getCurrentInstance } from 'vue'; | ||
return function() { | ||
const methods = this || instance.ctx; | ||
const context = this || instance.appContext.config.globalProperties; | ||
const methods = get(instance, 'ctx', this); | ||
const context = get(instance, 'appContext.config.globalProperties', this); | ||
@@ -51,0 +51,0 @@ methods.$setLoading(state); |
6423
2.36%114
5.56%2
100%+ Added
+ Added