mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-23 23:45:08 +08:00
替换var 为const/let
删除未使用import 替换 == 为 ===
This commit is contained in:
@ -69,7 +69,7 @@ export default {
|
||||
childrenMenus() {
|
||||
const childrenMenus = [];
|
||||
this.routers.map((router) => {
|
||||
for (var item in router.children) {
|
||||
for (let item in router.children) {
|
||||
if (router.children[item].parentPath === undefined) {
|
||||
if(router.path === "/") {
|
||||
router.children[item].path = "/" + router.children[item].path;
|
||||
@ -135,10 +135,10 @@ export default {
|
||||
},
|
||||
// 当前激活的路由
|
||||
activeRoutes(key) {
|
||||
var routes = [];
|
||||
const routes = []
|
||||
if (this.childrenMenus && this.childrenMenus.length > 0) {
|
||||
this.childrenMenus.map((item) => {
|
||||
if (key == item.parentPath || (key == "index" && "" == item.path)) {
|
||||
if (key === item.parentPath || (key === "index" && "" === item.path)) {
|
||||
routes.push(item);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user