提示: You are running Vue in development mode.Make sure to turn on production mode when deploying for production.See more tips at https://vuejs.org/guide/deployment.html

翻译: 您正在开发中运行Vue模式。制造在为部署时,请确保启用生产模式生产。参见更多提示https://vuejs.org/guide/deployment.html

解决:

  • 如果你是laravel框架里面的vue组件,需要在resources/js/aap.js中的加入Vue.config.productionTip = false;

     require('./bootstrap');
     window.Vue = require('vue');
    // const files = require.context('./', true, /\.vue$/i);
    // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default));
    Vue.component('example-component', require('./components/ExampleComponent.vue').default);
    Vue.component('chat-room', require('./components/ChatRoom.vue').default);
    Vue.config.productionTip = false;          //加入这行代码      
    const app = new Vue({
        el: '#app',
    });
  • 其他

     <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
     <script> Vue.config.productionTip=false </script>

关注友儿不迷路

Last modification:December 9th, 2020 at 11:35 am
如果觉得我的文章对你有用,请随意赞赏