Subscribe on changes!

How to get the config.globalProperties and mixins property on setup hook?

avatar
Aug 6th 2021

Version

3.2.0-beta.7

Reproduction link

https://v3.cn.vuejs.org/api/composition-api.html#setup

Steps to reproduce

Because i can't use this on setup hook, so how do i get the the config.globalProperties.xxx or mixins property from another component on setup hook?

What is expected?

can get it

What is actually happening?

avatar
Aug 6th 2021

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.

avatar
Sep 28th 2021
<script setup>
import { getCurrentInstance, onMounted } from 'vue'

onMounted(() => {
  getCurrentInstance().proxy.$xxx()
})
</script>