vue组件is特性

有些元素,比如 ul 里面只能直接包含 li元素,像这样:

<ul>
    <li></li>
</ul>

而不能:

<ul>
    <your-component>
</ul>

这样就不能复用your-component这个组件了,如果要达到我们的目的,我们就要使用is特性像这样:

<ul>
    <li is="your-component"></li>
</ul>

猜你喜欢

转载自blog.csdn.net/A13330069275/article/details/80857684
今日推荐