tyler 2 years ago
parent
commit
c37066be05
4 changed files with 9 additions and 54 deletions
  1. 0 2
      package.json
  2. 0 2
      src/layout/components/AppMain.vue
  3. 8 9
      src/main.js
  4. 1 41
      vue.config.js

+ 0 - 2
package.json

@@ -15,7 +15,6 @@
     "test:ci": "npm run lint && npm run test:unit"
   },
   "dependencies": {
-    "amfe-flexible": "^2.2.1",
     "axios": "0.18.1",
     "clipboard": "2.0.4",
     "codemirror": "5.45.0",
@@ -69,7 +68,6 @@
     "lint-staged": "8.1.5",
     "mockjs": "1.0.1-beta3",
     "plop": "2.3.0",
-    "postcss-px-to-viewport": "^1.1.1",
     "runjs": "4.3.2",
     "sass": "1.26.2",
     "sass-loader": "8.0.2",

+ 0 - 2
src/layout/components/AppMain.vue

@@ -29,8 +29,6 @@ export default {
   width: 100%;
   position: relative;
   overflow: hidden;
-  display: flex;
-  justify-content: center;
 }
 
 .fixed-header+.app-main {

+ 8 - 9
src/main.js

@@ -10,26 +10,25 @@ import Vue from 'vue'
 
 import Cookies from 'js-cookie'
 
-import 'normalize.css/normalize.css' // a modern alternative to CSS resets
+import 'normalize.css/normalize.css'; // a modern alternative to CSS resets
 
 import Element from 'element-ui'
 import './styles/element-variables.scss'
 
 import moment from 'moment'
 
-import '@/styles/index.scss' // global css
+import '@/styles/index.scss'; // global css
 
 import App from './App'
-import store from './store'
 import router from './router'
+import store from './store'
 
-import i18n from './lang' // internationalization
-import './icons' // icon
-import './permission' // permission control
-import './utils/error-log' // error log
+import './icons'; // icon
+import i18n from './lang'; // internationalization
+import './permission'; // permission control
+import './utils/error-log'; // error log
 
-import * as filters from './filters' // global filters
-import "amfe-flexible/index"
+import * as filters from './filters'; // global filters
 /**
  * If you don't want to use mock-server
  * you want to use MockJs for mock api

+ 1 - 41
vue.config.js

@@ -143,45 +143,5 @@ module.exports = {
         }
       )
   },
-  css: {
-    loaderOptions: {
-      postcss: {
-        plugins: [
-          require('postcss-px-to-viewport')({
-            unitToConvert: 'px',   // 需要转换的单位
-            viewportWidth: 750,    // 视口宽度,等同于设计稿宽度
-            unitPrecision: 5,      // 精确到小数点后几位
-            /**
-            * 将会被转换的css属性列表,
-            * 设置为 * 表示全部,如:['*']
-            * 在属性的前面或后面设置*,如:['*position*'],*position* 表示所有包含 position 的属性,如 background-position-y
-            * 设置为 !xx 表示不匹配xx的那些属性,如:['!letter-spacing'] 表示除了letter-spacing 属性之外的其他属性
-            * 还可以同时使用 ! 和 * ,如['!font*'] 表示除了font-size、 font-weight ...这些之外属性之外的其他属性名头部是‘font’的属性
-            * */
-            propList: ['*'],
-            viewportUnit: 'vw',    // 需要转换成为的单位
-            fontViewportUnit: 'vw',// 需要转换称为的字体单位
-            /**
-            * 需要忽略的选择器,即这些选择器对应的属性值不做单位转换
-            * 设置为字符串,转换器在做转换时会忽略那些选择器中包含该字符串的选择器,如:['body']会匹配到 .body-class,也就意味着.body-class对应的样式设置不会被转换
-            * 设置为正则表达式,在做转换前会先校验选择器是否匹配该正则,如果匹配,则不进行转换,如[/^body$/]会匹配到 body 但是不会匹配到 .body
-            */
-            selectorBlackList: [],
-            minPixelValue: 1,      // 最小的像素单位值
-            mediaQuery: false,     // 是否转换媒体查询中设置的属性值
-            replace: true,         // 替换包含vw的规则,而不是添加回退
-            /**
-            * 忽略一些文件,如'node_modules'
-            * 设置为正则表达式,将会忽略匹配该正则的所有文件
-            * 如果设置为数组,那么该数组内的元素都必须是正则表达式
-            */
-            exclude: [],
-            landscape: false,      // 是否自动加入 @media (orientation: landscape),其中的属性值是通过横屏宽度来转换的
-            landscapeUnit: 'vw',   // 横屏单位
-            landscapeWidth: 1334   // 横屏宽度
-          })
-        ]
-      }
-    }
-  }
+ 
 }