网站首页
编程语言
数据库
系统相关
其他分享
编程问答
OtherComponent
2024-06-15
Vue3动态组件的基本用法
和Vue2动态组件写法不同的是,:is传递的内容需要先定义,再给:is使用<template><div><component:is="currentComponent"></component></div></template><scriptsetup>importMyComponentfrom'./MyComponent.vue';