// 预先配置好了组件,如何通过循环渲染出来
tabsItem: [
{
label: "事项办理",
name: "first",
template: itemDo,
},
{
label: "失业就业登记_张三",
name: "second",
template: unemployment,
},
{
label: "业务办理1",
name: "third",
template: workContent,
},
],
<el-tab-pane
:label="item.label"
:name="item.name"
v-for="(item, index) in tabsItem"
:key="index"
>
// 使用component :is='绑定自定义组件即可'
<component :is="item.template"></component>
</el-tab-pane>
<component :is=“item.template“></component>提前配置组件循环渲染
最新推荐文章于 2024-01-10 12:34:14 发布