<template>
<div id="dynamic-component-demo" class="demo">
<button
v-for="tab in tabs"
:key="tab"
:class="['tab-button', { active:currentTab === tab }]"
@click="currentTab = tab">
{
{
tab }}
</button>
<component :is="currentTabComponent" class="tab"></component>
</div>
</template>
<script>
const app = Vue<
把html的文件放在App.vue文件里,没有成功
最新推荐文章于 2024-05-30 21:29:09 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)