Browse Source

样式优化

seimin 3 years ago
parent
commit
56c57020ab
3 changed files with 24 additions and 21 deletions
  1. 20 21
      config/index.js
  2. 3 0
      src/views/indes.vue
  3. 1 0
      src/views/wxChartList.vue

+ 20 - 21
config/index.js

@@ -1,33 +1,33 @@
1
-'use strict'
1
+"use strict";
2 2
 // Template version: 1.3.1
3 3
 // see http://vuejs-templates.github.io/webpack for documentation.
4 4
 
5
-
6
-const path = require('path')
7
-const host=require('../src/request/host')
5
+const path = require("path");
6
+const host = require("../src/request/host");
8 7
 module.exports = {
9 8
   dev: {
10 9
     // 新加的一行
11
-    env: require('./dev.env'),
10
+    env: require("./dev.env"),
12 11
     // Paths
13
-    assetsSubDirectory: 'static',
14
-    assetsPublicPath: '/',
12
+    assetsSubDirectory: "static",
13
+    assetsPublicPath: "/",
15 14
     proxyTable: {
16
-      '/service': { //自定义名字,代表的是以下target中的内容
17
-        target: host.host+'/service/', //微信
15
+      "/service": {
16
+        //自定义名字,代表的是以下target中的内容
17
+        target: host.host + "/service/", //微信
18 18
         // target: 'http://weixintest.ngser.dashitech.com/service/',//微信
19 19
 
20 20
         // target: 'http://192.168.3.100:8080/service/',//微信
21 21
         // target: 'http://localhost/service/',//微信
22 22
         changeOrigin: true, //是否允许跨域
23 23
         pathRewrite: {
24
-          '^/service': ''
24
+          "^/service": ""
25 25
         }
26 26
       }
27 27
     },
28 28
 
29 29
     // Various Dev Server settings
30
-    host: '0.0.0.0', // can be overwritten by process.env.HOST
30
+    host: "0.0.0.0", // can be overwritten by process.env.HOST
31 31
     // host: '192.168.3.170', // can be overwritten by process.env.HOST
32 32
     // host: '192.168.31.32', // can be overwritten by process.env.HOST
33 33
     // host: '192.168.31.32', // can be overwritten by process.env.HOST
@@ -39,14 +39,13 @@ module.exports = {
39 39
     // notifyOnErrors: true,
40 40
     // poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
41 41
 
42
-
43 42
     /**
44 43
      * Source Maps
45 44
      */
46 45
 
47 46
     // https://webpack.js.org/configuration/devtool/#development
48 47
     // 住了一行
49
-    devtool: 'source-map',
48
+    devtool: "source-map",
50 49
 
51 50
     // If you have problems debugging vue-files in devtools,
52 51
     // set this to false - it *may* help
@@ -59,12 +58,12 @@ module.exports = {
59 58
 
60 59
   build: {
61 60
     // Template for index.html
62
-    index: path.resolve(__dirname, '../dist/index.html'),
61
+    index: path.resolve(__dirname, "../dist/index.html"),
63 62
 
64 63
     // Paths
65
-    assetsRoot: path.resolve(__dirname, '../dist'),
66
-    assetsSubDirectory: 'static',
67
-    assetsPublicPath: './',
64
+    assetsRoot: path.resolve(__dirname, "../dist"),
65
+    assetsSubDirectory: "static",
66
+    assetsPublicPath: "./",
68 67
 
69 68
     /**
70 69
      * Source Maps
@@ -72,14 +71,14 @@ module.exports = {
72 71
 
73 72
     productionSourceMap: false, // 把该项的配置修改为 false,关闭 source map
74 73
     // https://webpack.js.org/configuration/devtool/#production
75
-    devtool: '#source-map',
74
+    devtool: "#source-map",
76 75
 
77 76
     // Gzip off by default as many popular static hosts such as
78 77
     // Surge or Netlify already gzip all static assets for you.
79 78
     // Before setting to `true`, make sure to:
80 79
     // npm install --save-dev compression-webpack-plugin
81
-    productionGzip: true, // 开启 gzip 功能, 开启 GZIP 压缩,进一步压缩 js 和 css 文件的体积
82
-    productionGzipExtensions: ['js', 'css'],
80
+    productionGzip: false, // 开启 gzip 功能, 开启 GZIP 压缩,进一步压缩 js 和 css 文件的体积
81
+    productionGzipExtensions: ["js", "css"],
83 82
 
84 83
     // Run the build command with an extra argument to
85 84
     // View the bundle analyzer report after build finishes:
@@ -87,4 +86,4 @@ module.exports = {
87 86
     // Set to `true` or `false` to always turn it on or off
88 87
     bundleAnalyzerReport: process.env.npm_config_report
89 88
   }
90
-}
89
+};

+ 3 - 0
src/views/indes.vue

@@ -147,6 +147,9 @@ export default {
147 147
           that.newRapirLoading = false;
148 148
           if (res.data.list.length > 0) {
149 149
             that.newRapirNoData = false;
150
+            res.data.list.forEach(v => {
151
+              v.createTime = formatDate(new Date(v.createTime), "MM-dd hh:mm");
152
+            });
150 153
             that.dataList = res.data.list;
151 154
           } else {
152 155
             that.newRapirNoData = true;

+ 1 - 0
src/views/wxChartList.vue

@@ -544,6 +544,7 @@ export default {
544 544
       border-bottom: 0.01rem solid #e6e6e6;
545 545
       padding: 0.24rem 0.48rem;
546 546
       p {
547
+        overflow: hidden;
547 548
         padding-left: 0.43rem;
548 549
         &.desc {
549 550
           padding-left: 0;