Browse Source

修改样式

Renxy 1 year ago
parent
commit
cba538d5d6
2 changed files with 3 additions and 2 deletions
  1. 1 1
      .umirc.ts
  2. 2 1
      public/rem.js

+ 1 - 1
.umirc.ts

@@ -46,7 +46,7 @@ export default defineConfig({
     },
     {
       name: '项目选择',
-      path: '/projects/:projectId',
+      path: '/projects',
       component: './Projects',
     },
     {

+ 2 - 1
public/rem.js

@@ -7,9 +7,10 @@
 
   function refreshRem() {
     var width = docEl.getBoundingClientRect().width;
+    console.log('=======width=======================', width);
 
     //与淘宝做法不同,直接采用简单的rem换算方法1rem=100px
-    var rem = (width * 100) / 2560;
+    var rem = (2560 * 100) / 2560;
     //兼容UC开始
     rootStyle = 'html{font-size:' + rem + 'px !important}';
     rootItem =