2022年5月30日

Vue3提高效率小技巧

摘要: 问题1:Vue3使用了setup API,无法访问到this,虽然提供了getCurrentInstance API,但访问全局变量时感觉比Vue2使用方式更繁琐了,因此想了个捷径(小菜鸟想法) getCurrentInstance() 获取到全局对象挂载到window上,页面直接使用window. 阅读全文

posted @ 2022-05-30 09:55 吴知木 阅读(200) 评论(0) 推荐(0) 编辑

导航