首页 > 其他分享 >vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe

vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe

时间:2023-01-12 14:03:21浏览次数:71  
标签:development sure vue js production mode 警告 2.5

前言

刚开始搭建VUE前端出一个警告 不影响运行

- Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as they will not be parsed.

vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_ci

vue-2.5.17.js:8553 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-2.5.17.js:597 [Vue warn]: Error compiling template:

vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_Vue_02
vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_vue.js_03
是不是很烦
代码感觉没问题 就是报这个警告
总结三点原因 以后有再写

1.代码不规范
  1. VUE需要的<div id='app'></div>没有完全包裹HTML代码
    vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_vue.js_04
    原因:<div>缺失 解决<div id='app'></div>
    vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_ci_05
2.div标签范围太大
  1. 一样的错<div id='app'></div> 范围太大
    vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_javascript_06
    解决: 注意<div>范围vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_elementui_07
3.引入script标签位置
  1. 第三点是刚发生的(在某处不知名代码 粘贴别人的前台 你里边有这种引入 就会警告 注:上两点是我故意复现,这个才是我最气的,明明很规范,就是警告 警告截图看标题)
    vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_Vue_08
    vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_elementui_09
    解决:把他放到头部
    vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_Vue_10
    然后就好了
    vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_Vue_11

祝你幸福
送你一首歌《Valder Fields》Tamas Wells
附图:米家铜葫芦
vue-2.5.17.js:8553 You are running Vue in development mode. Make sure to turn on production mode whe_ci_12

标签:development,sure,vue,js,production,mode,警告,2.5
From: https://blog.51cto.com/u_15939406/6004108

相关文章