天天看点

vue3+ts 无法启用Vue-devtools解决方案

1.在main.ts文件中加入

const win: any = window
if (process.env.NODE_ENV === 'development') {
  if ('__VUE_DEVTOOLS_GLOBAL_HOOK__' in win) {
    win.__VUE_DEVTOOLS_GLOBAL_HOOK__.Vue = app
  }
}
           

继续阅读