in v-for you cannot use this.type to get data()
you should use a custom property to bind your data() in list item

data() {
    return {
        type: 'institution',
    }
},
<tbody>
    <tr v-for="(item) in participantData"
        type="this.type"
        :key="item.name">
        <td class="text-green-700 font-bold">
          <router-link :to=`/profile/${type}/${item.id}`>{{ item.name }}</router-link>
        </td>
        <td class="">{{ (item.totalEfficacy*100).toFixed(0) }} %</td>
        <td>{{ item.participation }}</td>
    </tr>
</tbody>
#Vue







你可能感興趣的文章

使用 visx 製作資料圖表-台灣六都即時空氣品質指標

使用 visx 製作資料圖表-台灣六都即時空氣品質指標

用 JavaScript 學習資料結構和演算法:陣列(Array)篇

用 JavaScript 學習資料結構和演算法:陣列(Array)篇

Notification

Notification






留言討論