0

I have the following code, but displays text and don't instantiate the steps.

How can i achieve that?

Template:

<template>
    <div>
        <ul>
            <li v-for="(step, index) in $store.state.steps" >
                <{{`step-${index+1}`}}></{{`step-${index+1}`}}>
            </li>
        </ul>
    </div>
</template>

Output:

<step-1></step-1>
<step-2></step-2>
<step-3></step-3>
<step-4></step-4>
<step-5></step-5>
<step-6></step-6>
<step-7></step-7> 
4

1 回答 1

1

Read documentation here https://vuejs.org/v2/guide/components-dynamic-async.html

<component v-bind:is="currentComponent"></component>
于 2018-12-17T10:22:12.627 回答