• 2024-06-15Vue3动态组件的基本用法
     和Vue2动态组件写法不同的是,:is传递的内容需要先定义,再给:is使用<template><div><component:is="currentComponent"></component></div></template><scriptsetup>importMyComponentfrom'./MyComponent.vue';