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







你可能感興趣的文章

[進階 js 06] 體驗 JS 引擎的一天,理解 Execution Context 與 Variable Object

[進階 js 06] 體驗 JS 引擎的一天,理解 Execution Context 與 Variable Object

Nodemon工具 使用方法

Nodemon工具 使用方法

[Day06] Applicative

[Day06] Applicative






留言討論