How to declare a list of slots with dynamic names and dynamic components in a VueJS template?

前端 未结 1 1996
时光取名叫无心
时光取名叫无心 2021-02-07 17:46

Suppose I have a component with data:

data: function () {
  return {
    slots: [
      { Id: 1, slotName: \'apple\', comp         


        
1条回答
  •  旧巷少年郎
    2021-02-07 18:36

    You can use v-for into a template component

    You just need to specify the key on the component.

    
      
    
    

    0 讨论(0)
提交回复
热议问题