Browse Source

chore: 打包配置

TwoKe945 1 year ago
parent
commit
51789dff2a
5 changed files with 20 additions and 25 deletions
  1. 1 1
      app/index.html
  2. 13 14
      app/src/assets/css/base.css
  3. 2 4
      app/src/assets/css/main.css
  4. 1 3
      app/vite.config.js
  5. 3 3
      utils/request.js

+ 1 - 1
app/index.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
-<html lang="en">
+<html lang="zh-CN">
   <head>
   <head>
     <meta charset="UTF-8" />
     <meta charset="UTF-8" />
     <link rel="icon" href="/favicon.ico" />
     <link rel="icon" href="/favicon.ico" />

+ 13 - 14
app/src/assets/css/base.css

@@ -23,22 +23,21 @@ a,a:hover{color:#333;}
 input {
 input {
   border: none;
   border: none;
   -moz-appearance: none;
   -moz-appearance: none;
-  -webkit-appearance: none; /*解决ios上按钮的圆角问题*/
-  border-radius: 0; /*解决ios上输入框圆角问题*/
-  outline: medium; /*去掉鼠标点击的默认黄色边框*/
+  -webkit-appearance: none;
+  border-radius: 0;
+  outline: medium;
   background-color: transparent;
   background-color: transparent;
 
 
-  &:-webkit-autofill {
+  
+}
+input:-webkit-autofill {
     -webkit-box-shadow: 0 0 0px 1000px white inset;
     -webkit-box-shadow: 0 0 0px 1000px white inset;
   }
   }
-
-  &[type=number] {
-    -moz-appearance: textfield;
-  }
-
-  &[type=number]::-webkit-inner-spin-button,
-  &[type=number]::-webkit-outer-spin-button {
-    -webkit-appearance: none;
-    margin: 0;
-  }
+input[type=number] {
+  -moz-appearance: textfield;
+}
+input[type=number]::-webkit-inner-spin-button,
+input[type=number]::-webkit-outer-spin-button {
+  -webkit-appearance: none;
+  margin: 0;
 }
 }

+ 2 - 4
app/src/assets/css/main.css

@@ -1,11 +1,11 @@
 @import "./base.css";
 @import "./base.css";
 
 
 @font-face {
 @font-face {
-  font-family: 'abel';/*声明一个名为iconfont的字体变量*/
+  font-family: 'abel';
   src: url('../fonts/Abel-Regular.ttf') format('truetype');
   src: url('../fonts/Abel-Regular.ttf') format('truetype');
 }
 }
 @font-face {
 @font-face {
-  font-family: 'YouSheBiaoTiHei';/*声明一个名为iconfont的字体变量*/
+  font-family: 'YouSheBiaoTiHei';
   src: url('../fonts/YouSheBiaoTiHei.ttf') format('truetype');
   src: url('../fonts/YouSheBiaoTiHei.ttf') format('truetype');
 }
 }
 
 
@@ -14,8 +14,6 @@ html,body {
   width: 100vw;
   width: 100vw;
   font-family: 'abel';
   font-family: 'abel';
   color: #fff;
   color: #fff;
-  /* background: url("@/assets/images/homebg.png") center no-repeat; */
-  /* background-size: 100% 100%; */
   background-color: #070b13;
   background-color: #070b13;
 }
 }
 
 

+ 1 - 3
app/vite.config.js

@@ -11,7 +11,7 @@ export default defineConfig({
     vue2(),
     vue2(),
     vue2Jsx(),
     vue2Jsx(),
     legacy({
     legacy({
-      targets: ["ie >= 11"],
+      targets: ['IE 11'],
       additionalLegacyPolyfills: ["regenerator-runtime/runtime"],
       additionalLegacyPolyfills: ["regenerator-runtime/runtime"],
     }),
     }),
   ],
   ],
@@ -41,8 +41,6 @@ export default defineConfig({
     },
     },
   },
   },
   build: {
   build: {
-    // 设置最终构建的浏览器兼容目标
-    target: "es2015",
     // 构建后是否生成 source map 文件
     // 构建后是否生成 source map 文件
     sourcemap: false,
     sourcemap: false,
     //  chunk 大小警告的限制(以 kbs 为单位)
     //  chunk 大小警告的限制(以 kbs 为单位)

+ 3 - 3
utils/request.js

@@ -2,8 +2,8 @@ import axios from 'axios'
 
 
 // 创建一个axios实例
 // 创建一个axios实例
 const instance = axios.create({
 const instance = axios.create({
-  baseURL: 'http://183.66.101.53:8787/api'
-  // baseURL: '/api'
+  // baseURL: 'http://183.66.101.53:8787/api'
+  baseURL: '/api'
 })
 })
 
 
 // 配置请求拦截器
 // 配置请求拦截器
@@ -25,4 +25,4 @@ instance.interceptors.response.use(config => {
 }, err => {
 }, err => {
   return Promise.reject(err)
   return Promise.reject(err)
 })
 })
-export default instance;
+export default instance;