title: Can I dynamically change parent's function name in the child component instance with my settings in data?
body: <p>Beginner looking for help. thank you so much.</p>
  <p>Can I dynamically change parent's function name in the child component instance with my settings in data?</p>
  <p>it works fine with this: &lt;my-component btntext=&quot;TEXT&quot; @emitfn=&quot;fn1&quot;&gt;</p>
  <p>but I need to do this: &lt;my-component btntext=&quot;TEXT&quot; @emitfn=&quot;emitname&quot;&gt; and Vue gives me error...</p>
  <p>here's my code:</p>
  <pre><code>&lt;div id=&quot;root&quot;&gt;
      &lt;my-component btntext=&quot;TEXT&quot; @emitfn=&quot;emitname&quot;&gt;&lt;/my-component&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  Vue.component('myComponent', {
      props: ['btntext'],
      template: '&lt;button @click=&quot;childFN&quot;&gt;{{btntext}}&lt;/button&gt;',
      methods: {
          childFN: function(){
              this.$emit(&quot;emitfn&quot;);
          }
      },
      data: function(){
          return {
              emitname: 'fn1'
          }
      }
  });
  
  var vm = new Vue({
      el: '#root',
      methods: {
          fn1: function(){
              alert('fn1');
          },
          fn2: function(){
              alert('fn2');
          }
      }
  });
  &lt;/script&gt;
  </code></pre>