天天看點

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
  }
}
           

繼續閱讀