有些元素,比如 ul 里面只能直接包含 li元素,像这样:
<ul>
<li></li>
</ul>
而不能:
<ul>
<your-component>
</ul>
这样就不能复用your-component这个组件了,如果要达到我们的目的,我们就要使用is特性像这样:
<ul>
<li is="your-component"></li>
</ul>
有些元素,比如 ul 里面只能直接包含 li元素,像这样:
<ul>
<li></li>
</ul>
而不能:
<ul>
<your-component>
</ul>
这样就不能复用your-component这个组件了,如果要达到我们的目的,我们就要使用is特性像这样:
<ul>
<li is="your-component"></li>
</ul>