Skip to content

Commit 009ef01

Browse files
committed
📝 upgrade example with mapLoadableMethods
1 parent ebcab8a commit 009ef01

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

example/App.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515
</template>
1616

1717
<script>
18-
import { loadable, mapLoadableActions } from '../src/vue-loadable'
18+
import { mapActions } from 'vuex';
19+
import { loadable, mapLoadableMethods } from '../src/vue-loadable'
1920
2021
const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time))
2122
2223
export default {
2324
name: 'App',
2425
methods: {
25-
...mapLoadableActions(['w']),
26+
...mapLoadableMethods(
27+
mapActions(['w'])
28+
),
2629
2730
x: loadable(async function () {
2831
await sleep(3 * 1000)

0 commit comments

Comments
 (0)