vue-devtools:Vue.js Devtools inspection is not available because it's in production mode or explicit

  1. vue-devtools安装以后,勾选了“允许访问文件网址”之后还是无法使用
  2. 有时需要启动多个vue项目有的项目可以用,有的项目虽然左上角V图标是亮着的,但是控制台却不出来vue,(有时,时出来时不出来也有可能是缓存或电脑卡吧。。。)

1、勾选了“允许访问文件网址”,还是无法使用:

Vue.js is detected on this page. Devtools inspection is not available because it's in production mode or explicitly disabled by the author

在vue-devtools的github中有这样一句说明:

If the page uses a production/minified build of Vue.js, devtools inspection is disabled by default so the Vue pane won't show up.

因此,引用的vue.js应该使用vue.js(开发版本)而不是vue.min.js(生成版本)。
2、Vue.config.devtools = true;
import Vue from 'vue'
import Router from 'vue-router'
import App from '../App.vue'
Vue.config.devtools = true;
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'App',
      component: App
    }
  ]
})

参考引用 http://www.cnblogs.com/zdsBlog/p/6891679.html
参考引用 https://blog.csdn.net/u014182411/article/details/78810927

posted @ 2022-06-23 18:10  ·一库  阅读(0)  评论(0)    收藏  举报