[Vuejs]-Display string on multiple lines

3👍

Try to use ol element and v-for to render each li

 <v-card
    class="mt-15 pa-4  mx-auto"
    max-width="1000"
    multi-line
>
    <ol>
        <li v-for="item in consoleOutput" :key="item">{{item}}</li>
    </ol>
</v-card>

1👍

I think you can do like this.

 <v-container>
  <v-card
      class="mt-15 pa-4  mx-auto"
      max-width="1000"
      multi-line>
      <div v-for="item in consoleOutput.toString().split(',')" :key="item">        
        {{item}}
      </div>
  </v-card>
</v-container>

Please confirm this URL.
https://stackblitz.com/edit/vue-gmadqd?file=src%2Fcomponents%2FHelloWorld.vue

👤BTSM

Leave a comment