有人知道如何提供设置函数中的变量吗?
export default {
name: "MyComponent",
provide: {
myVariableThatIWantToProvide // This is not working
},
setup() {
const myVariableThatIWantToProvide = ref('test');
return {
myVariableThatIWantToProvide
};
}
};
</script>
米琪卡哇伊
相关分类