shuishen
2022-12-01 f347ee585e2fbbfa566d99e27017824dffe774b9
配置更改
4 files modified
21052 ■■■■■ changed files
package-lock.json 21006 ●●●●● patch | view | raw | blame | history
package.json 1 ●●●● patch | view | raw | blame | history
src/views/lyout/index.vue 4 ●●●● patch | view | raw | blame | history
vue.config.js 41 ●●●● patch | view | raw | blame | history
package-lock.json
Diff too large
package.json
@@ -18,6 +18,7 @@
        "flv.js": "^1.6.2",
        "font-awesome": "^4.7.0",
        "lib-flexible": "^0.3.2",
        "postcss-px-to-viewport": "^1.1.1",
        "postcss-px2rem": "^0.3.0",
        "px2rem-loader": "^0.1.9",
        "qs.js": "^0.1.12",
src/views/lyout/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:24
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-12-01 09:13:02
 * @LastEditTime: 2022-12-01 09:29:17
 * @FilePath: \srs-police-affairs\src\views\lyout\index.vue
 * @Description: 
 * 
@@ -395,7 +395,7 @@
                line-height: 40px;
                text-align: center;
                background: $menu-tab-bg-color;
                box-shadow: inset 0 0 10px rgb(14, 98, 130);
                box-shadow: inset 0 0 10px $menu-tab-shadow;
                border-radius: 50%;
            }
        }
vue.config.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-09-07 09:37:07
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-11-12 10:23:57
 * @LastEditTime: 2022-12-01 14:31:03
 * @FilePath: \srs-police-affairs\vue.config.js
 * @Description: 
 * 
@@ -15,6 +15,7 @@
const webpack = require('webpack')
const CompressionPlugin = require('compression-webpack-plugin')
const pxtovw = require('postcss-px-to-viewport')
const productionGzipExtensions = ['js', 'css']
@@ -25,14 +26,36 @@
            scss: {
                prependData: `@import "~@/styles/scssFile.scss";`
            },
            postcss: {
                plugins: [   //配置px转rem进行适配
                    require('postcss-px2rem')({
                        // 根标签字号大小根据设计稿宽度/flexible.js里的份数得到,这里假定设计稿宽度为3840 3840/24 = 160px
                        remUnit: 80
                    }),
                ]
            }
            // postcss: {
            //     plugins: [   //配置px转rem进行适配
            //         require('postcss-px2rem')({
            //             // 根标签字号大小根据设计稿宽度/flexible.js里的份数得到,这里假定设计稿宽度为3840 3840/24 = 160px
            //             remUnit: 80
            //         }),
            //     ]
            // }
            // postcss: {
            //     //给postcss-loader传递选项
            //     plugins: [
            //         new pxtovw({
            //             unitToConvert: 'px', //需要转换的单位,默认为"px";
            //             viewportWidth: 1920, //设计稿的视口宽度
            //             viewportHeight: 1080, //设计稿的视口宽度
            //             unitPrecision: 5, //单位转换后保留的小数位数
            //             propList: ['*'], //要进行转换的属性列表,*表示匹配所有,!表示不转换
            //             viewportUnit: 'vw', //转换后的视口单位
            //             fontViewportUnit: 'vw', //转换后字体使用的视口单位
            //             selectorBlackList: [], //不进行转换的css选择器,继续使用原有单位
            //             minPixelValue: 1, //设置最小的转换数值
            //             mediaQuery: false, //设置媒体查询里的单位是否需要转换单位
            //             replace: true, //是否直接更换属性值,而不添加备用属性
            //             exclude: [/node_modules/], //忽略某些文件夹下的文件
            //             // landscape: true,
            //             // landscapeUnit: 'vw',
            //             // landscapeWidth: 1920
            //         })
            //     ]
            // }
        },
    },