소스 검색

修改配置文件

魏熙美 5 년 전
부모
커밋
9b007e0d8a
2개의 변경된 파일2개의 추가작업 그리고 5개의 파일을 삭제
  1. 2
    0
      config/config.js
  2. 0
    5
      src/components/AuthButton/index.jsx

+ 2
- 0
config/config.js 파일 보기

@@ -83,6 +83,8 @@ export default {
83 83
   targets: {
84 84
     ie: 11,
85 85
   },
86
+  publicPath: './',
87
+  history: 'hash',
86 88
   devtool: isAntDesignProPreview ? 'source-map' : false,
87 89
   // umi routes: https://umijs.org/zh/guide/router.html
88 90
   routes,

+ 0
- 5
src/components/AuthButton/index.jsx 파일 보기

@@ -6,10 +6,6 @@ let current = [];
6 6
 const AuthButton = ({ children, name, noRight }) => {
7 7
   const btn = allBtns.filter(x => x.code === name)[0]
8 8
 
9
-  console.log('allBtns: ', allBtns)
10
-  console.log('btn: ', btn)
11
-  console.log('current: ', current)
12
-
13 9
   // 没维护的按钮, 或者不需要权限的按钮直接通过
14 10
   // if (!btn || !btn.roles || !btn.roles.length) {
15 11
   //   return <>{children}</>
@@ -22,7 +18,6 @@ const AuthButton = ({ children, name, noRight }) => {
22 18
   }
23 19
 
24 20
   const hasRight = btn.rolesList.some(x => current.some(y => x.roleId === y))
25
-  console.log('hasRight: ', hasRight)
26 21
   return hasRight ? <>{children}</> : <>{noRight}</>
27 22
 }
28 23