Passing props dynamically to dynamic component in VueJS

后端 未结 5 1391
南笙
南笙 2020-12-02 05:44

I\'ve a dynamic view:

with an associated Vue ins

5条回答
  •  一整个雨季
    2020-12-02 06:07

    I have the same challenge, fixed by the following:

     
       {{ title }}
    
    

    and the script is

    export default { 
      …
      props:['title'],
      data() {
        return {
          currentComponent: 'component-name',
        }
      },
      computed: {
        resetProps() {
          return { ...this.$attrs };
        },
    }
    

    I'm came from reactjs and I found this solve my issue

提交回复
热议问题