Vue: Allow Component Tag in Transition Group

Created on 5 Mar 2017  ·  2Comments  ·  Source: vuejs/vue

Allow this kind of feature for transition-group or transition

<transition-group tag="todo-layout-container">
    <!-- Which will render a component rather a tag -->
</transition-group>

and will compile to

<todo-layout-container>

</todo-layout-container>

and compiles to what is inside of the todo-layout-container

let Todo = Vue.extend({
   name: 'todo-layout-container',
   methods: {
      //Per todo methods
   }
});
feature request transition

Most helpful comment

Also, it would be helpful to add support for passing props/event/attributes.
Something like

<transition-group tag="todo-layout-container"
                  :props="someValue" 
                  @event="someMethod()" 
                  class="css-class"
>

  <!-- Which will render a component rather a tag -->

</transition-group>

will compile to

<todo-layout-container :props="someValue" @event="someMethod()" class="css-class">

</todo-layout-container>

All 2 comments

That would be great! No more unwanted div's used just for transitions.

Also, it would be helpful to add support for passing props/event/attributes.
Something like

<transition-group tag="todo-layout-container"
                  :props="someValue" 
                  @event="someMethod()" 
                  class="css-class"
>

  <!-- Which will render a component rather a tag -->

</transition-group>

will compile to

<todo-layout-container :props="someValue" @event="someMethod()" class="css-class">

</todo-layout-container>
Was this page helpful?
0 / 5 - 0 ratings