how to work with Bootstrap table?

Asked

Viewed 75 times

1

Look at the figure

inserir a descrição da imagem aqui

How do I leave the date next to the word Dollar?

That is the code!

<div class="row">
        12/12/2000
    </div>
        <div class="row">
          <table class="table">
            <tr>
                <td v-for="(moeda, key, index) in bancodedados.valores" :key="index">{{moeda.nome}}</td>
            </tr>
            <tr>
                <td v-for="(valor, key, index) in bancodedados.valores" :key="index">R$ {{valor.valor}}</td>
            </tr>
            <tr>

            </tr>
        </table>
    </div>

</div>

If I make this attempt the page breaks;

<div class="row">
  <table class="table">
    <tr>
        <td rowspan="2">12/12/2000</td>
    </tr>
    <tr>
        <td v-for="(moeda, key, index) in bancodedados.valores" :key="index">{{moeda.nome}}</td>
    </tr>
    <tr>
        <td v-for="(valor, key, index) in bancodedados.valores" :key="index">R$ {{valor.valor}}</td>
    </tr>
    <tr>

    </tr>
</table>

inserir a descrição da imagem aqui

  • In a new column?

  • If I put it in a new column it won’t change anything, it’s the same.

  • Ever tried to place a column on the first TR with rowspan: <td rowspan="2">12/12/2000</td>

  • I updated the page, take a look, the page broke

  • 1

    It wasn’t the way I said it was to put the TD inside the TR where the dollar shows up.

  • was perfect, thank you very much, can put as a suggestion right.

Show 1 more comment

2 answers

1

Try to do it this way, it should work.

<div class="row">
<table class="table">
<tr>
    <td rowspan="2">12/12/2000</td>
    <td v-for="(moeda, key, index) in bancodedados.valores" :key="index">
{{moeda.nome}}</td>
</tr>
<tr>
    <td v-for="(valor, key, index) in bancodedados.valores" :key="index">R$ 
{{valor.valor}}</td>
</tr>
<tr>

</tr>
</table>

1


You can create a column within the first row and use rowspan which will merge the first column in the first two rows:

<div class="row">
  <table class="table">
    <tr>
        <td rowspan="2">12/12/2000</td>
        <td v-for="(moeda, key, index) in bancodedados.valores" :key="index">{{moeda.nome}}</td>
    </tr>
    <tr>
        <td v-for="(valor, key, index) in bancodedados.valores" :key="index">R$ {{valor.valor}}</td>
    </tr>
    <tr>

    </tr>
   </table>
</div>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.