score:0

try to pass function with computed property:

new vue({
  el: '#demo',
  data() {
    return {
      options: {
        maintainaspectratio: false,
        responsive: true,
      },
      func: ''
    }
  },
  computed: {
    getopts() {
      this.options.onclick = this.clickhandler
      return this.options
    }
  },
  methods: {
    clickhandler() {
      this.func = 'function passed'
    }
  }
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div id="demo">
  <p>{{ options.responsive }}</p>
  <p>{{ func }}</p>
  <button @click="getopts.onclick">click</button>
</div>


Related Query

More Query from same tag