常用的初始设置

启动项目自动打开浏览器

项目根目录下找到package.json,在文件中script脚本命令的serve行加入--open,重新运行项目

"scripts": {
    "serve": "vue-cli-service serve --open",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },

设置了代理配置中也有设置open的选线,这里更多是用于上线后的配置

取消全局居中

初始化项目中自动设置全局居中,在App.vue的style中取消

#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* text-align: center; */
  color: #2c3e50;
  /*margin-top: 60px;*/
}

猜你喜欢

转载自www.cnblogs.com/for-you/p/12550557.html