How to set data from slot-scope to component


#1

I have some problems with slot-scope ,

<template>
  <some-component>
    <div slot-scope="{someMethod, someData}">
      // the problem is i need someMethod in my current component, not in template
    </div>
  </some-component>
</template>


<script>
export default {
 created() {
   // i need to access someMethod and someData here
   this.someMethod();
 }
}
</script>

Is it possible? What is the best practice way?


#2

That’s not possible.