From a3a8c23b196980732a795713a5eb5fe0c7075bf9 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Wed, 11 Jul 2018 21:47:13 +0800
Subject: [PATCH] Revert "提交"

---
 src/app/routes/delon/acl/acl.component.ts |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/src/app/routes/delon/acl/acl.component.ts b/src/app/routes/delon/acl/acl.component.ts
new file mode 100644
index 0000000..9b0b471
--- /dev/null
+++ b/src/app/routes/delon/acl/acl.component.ts
@@ -0,0 +1,41 @@
+import { Component } from '@angular/core';
+import { ACLService } from '@delon/acl';
+import { MenuService } from '@delon/theme';
+
+@Component({
+  selector: 'app-acl',
+  templateUrl: './acl.component.html',
+})
+export class ACLComponent {
+  full = true;
+  roleA = '';
+  roleB = '';
+
+  constructor(public aclSrv: ACLService, private menuSrv: MenuService) {}
+
+  private reMenu() {
+    this.menuSrv.resume();
+  }
+
+  toggleFull() {
+    this.full = !this.full;
+    this.aclSrv.setFull(this.full);
+    this.reMenu();
+  }
+
+  toggleRoleA() {
+    this.full = false;
+    this.roleA = this.roleA === 'role-a' ? '' : 'role-a';
+    this.aclSrv.setFull(this.full);
+    this.aclSrv.setRole([this.roleA]);
+    this.reMenu();
+  }
+
+  toggleRoleB() {
+    this.full = false;
+    this.roleB = this.roleB === 'role-b' ? '' : 'role-b';
+    this.aclSrv.setFull(this.full);
+    this.aclSrv.setRole([this.roleB]);
+    this.reMenu();
+  }
+}

--
Gitblit v1.8.0