weex
weex copied to clipboard
slot 问题
playground 最新版本
<template>
<div class="div">
<banner></banner>
<panel>
<text slot="leftContent">生活</text>
<text>center</text>
<text slot="rightContent">更多</text>
</panel>
</div>
</template>
<template>
<div class="title">
<div class="titleLeft">
<slot name="leftContent"></slot>
</div>
<div class="titleCenter">
<slot></slot>
</div>
<div class="titleRight">
<slot name="rightContent"></slot>
</div>
</div>
</template>

渲染始终在最后一个 slot
Weex 现在不支持多个 <slot> 也不支持 <slot name> 这样的写法,所以上述代码的运行结果不可预期……
将来的 Vue 2.0 将支持比较完整的 slot 语法,尽请关注
谢谢你的反馈