Record it vue slot

Steps for usage:

         1. Set up a slot in the component (panda) among the definition of a good name. (<Slot name = 'myname'> </ slot>)

       2. When reference to the component if supplemental content, can continue to write div layout within the component, simply to define an attribute slot box, attribute values ​​corresponding name attribute value of built-in components slot.

       <panda>

        <Div slot = 'myname'> additional contents </ div>

      </panda>,

Guess you like

Origin www.cnblogs.com/cxxb/p/11317057.html
Recommended