切换卡

slot的使用

<button ms-for='(index,button) in @buttons' ms-click='@active(index)' type='button' slot='btn' >{{button}}</button> <div slot="tab" ms-visible="0 == @activeIndex"> <p>这是面板1</p> </div> <div slot="tab" ms-visible="1 == @activeIndex"> {{@aa}} <button ms-click="@change" type="button">change</button> </div> <div slot="tab" ms-visible="2 == @activeIndex"> 这是面板3 </div>