//公共方法
const { proxy } = getCurrentInstance();
proxy.$commonData();
//这个没有问题
proxy.$commonData();
commonData 方法想在模版中使用,请问如何使用?
//公共方法
const { proxy } = getCurrentInstance();
proxy.$commonData();
//这个没有问题
proxy.$commonData();
commonData 方法想在模版中使用,请问如何使用?
10 回答11.7k 阅读
2 回答3.2k 阅读✓ 已解决
2 回答4.3k 阅读✓ 已解决
3 回答1.9k 阅读✓ 已解决
2 回答1.7k 阅读✓ 已解决
5 回答820 阅读
4 回答2.5k 阅读✓ 已解决
或者全局注册