动态组件 tag

发布于 7 年前作者 xiuying25622 次浏览最后编辑 7 年前来自 ask

请问组件名称能够支持动态化吗?

比如我想实现下面的功能,有更简介高效的做法吗?

<component-a wx:if="{{type === 'a'}}"/>
<component-b wx:if="{{type === 'b'}}"/>
<component-c wx:if="{{type === 'c'}}"/>
0 回复
暂无回复