Skip to content

Commit 24392e6

Browse files
committed
feat: 更换为let const
1 parent f96fd1c commit 24392e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/store/modules/permission.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
6262
route.name = toCamelCase(route.path, true)
6363
// 处理三级及以上菜单路由缓存问题,将path名字赋值给name
6464
if (route.path.indexOf("/") !== -1) {
65-
var pathArr = route.path.split("/")
65+
const pathArr = route.path.split("/");
6666
route.name = toCamelCase(pathArr[pathArr.length - 1], true)
6767
}
6868
route.hidden = !route.visible
@@ -91,7 +91,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
9191
}
9292

9393
function filterChildren(childrenMap, lastRouter = false) {
94-
var children = []
94+
let children = [];
9595
childrenMap.forEach((el, index) => {
9696
if (el.children && el.children.length) {
9797
if (!el.component && !lastRouter) {

0 commit comments

Comments
 (0)