How can I call a method after the loops(more than 1 loop) complete on vue js?

Viewed 1444

My vue component like this :

<template>
    <div class="row">
        <div class="col-md-3" v-for="item1 in items1">
            ...
        </div>
        <div class="col-md-3" v-for="item2 in items2">
            ...
        </div>
        <div class="col-md-3" v-for="item3 in items3">
            ...
        </div>
    </div>
</template>
<script>
    export default {
        ...
        computed: {
            items1() {
                const n = ... // this is object
                return n
            },
            items2() {
                const n = ... // this is object
                return n
            },
            items3() {
                const n = ... // this is object
                return n
            }
        },
        ...
    }
</script>

If the three loop complete, I want to call a method

So the method is executed when the three loop completes

How can I do it?

1 Answers
Related