From 3d012017435faf21235e3f7bf9d662767e80cd1d Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Tue, 14 Jul 2020 17:31:13 +0800 Subject: [PATCH] update Former-commit-id: 768fa86ed1b5b97d316a454821d5dfbeb9245005 Former-commit-id: c18538e27c27a9fd341a3938521d5cd44658ea32 --- .../WebMVC/wwwroot/router/shared/layout.html | 72 +++++++++++-------- 1 file changed, 43 insertions(+), 29 deletions(-) diff --git a/projects/WebMVC/wwwroot/router/shared/layout.html b/projects/WebMVC/wwwroot/router/shared/layout.html index 3716a7bf..d9a67fd2 100644 --- a/projects/WebMVC/wwwroot/router/shared/layout.html +++ b/projects/WebMVC/wwwroot/router/shared/layout.html @@ -35,7 +35,7 @@ @@ -164,7 +172,7 @@ hasPermission(permission) { return Enumerable.from(this.model.permissions).any(o => o == permission); }, - isPageActive() { + getPageClass() { var cls = 'nav-link'; for (var i = 0; i < arguments.length; i++) { if (this.$route.path == arguments[i]) { @@ -173,12 +181,18 @@ } return cls; }, - isEntityActive(entity) { + getLinkClass(entity) { var cls = 'nav-link'; if (this.$route.query.entity === entity) { return cls + ' active'; } return cls; + }, + getGroupLiClass() { + return 'nav-item has-treeview' + Enumerable.from(arguments).any(o => o === this.$route.query.entity) ? ' menu-open' : ''; + }, + getGroupLinkClass() { + return 'nav-link' + Enumerable.from(arguments).any(o => o === this.$route.query.entity) ? ' active' : '';; } } }