浏览代码

tab点击优化

seimin 5 月之前
父节点
当前提交
c920853d64

+ 1 - 0
src/app/components/bind-extension-number/bind-extension-number.component.ts

@@ -126,6 +126,7 @@ export class BindExtensionNumberComponent implements OnInit {
126
 
126
 
127
   // 修改选项卡-是否启动
127
   // 修改选项卡-是否启动
128
   changeFlag(flag, item){
128
   changeFlag(flag, item){
129
+    this.activeScopeTab = item;
129
     if(flag){
130
     if(flag){
130
       this.scopeTabs.forEach(v => {
131
       this.scopeTabs.forEach(v => {
131
         if(v.value != item.value){
132
         if(v.value != item.value){

+ 1 - 0
src/app/components/configurationCenter/configuration-message/configuration-message.component.ts

@@ -158,6 +158,7 @@ export class ConfigurationMessageComponent implements OnInit {
158
 
158
 
159
   //checkbox选中或者取消
159
   //checkbox选中或者取消
160
   selectThis(e, index) {
160
   selectThis(e, index) {
161
+    this.selectTab(index);
161
     //遮罩切换
162
     //遮罩切换
162
     this.tabs[index].disable = !this.tabs[index].checkboxFlag;
163
     this.tabs[index].disable = !this.tabs[index].checkboxFlag;
163
     //所有checkbox有一个选中,总开关开启
164
     //所有checkbox有一个选中,总开关开启

+ 1 - 1
src/app/components/order-scope/order-scope.component.html

@@ -7,7 +7,7 @@
7
     <div class="content">
7
     <div class="content">
8
       <div class="scopeTab">
8
       <div class="scopeTab">
9
         <div class="scopeTabItem" [ngClass]="{ active: item.value == activeScopeTab.value }" *ngFor="let item of scopeTabs" (click)="activeScopeTab = item">
9
         <div class="scopeTabItem" [ngClass]="{ active: item.value == activeScopeTab.value }" *ngFor="let item of scopeTabs" (click)="activeScopeTab = item">
10
-          <label nz-checkbox [(ngModel)]="item.checked">{{item.name}}</label>
10
+          <label nz-checkbox [(ngModel)]="item.checked" (ngModelChange)="activeScopeTab = item">{{item.name}}</label>
11
         </div>
11
         </div>
12
       </div>
12
       </div>
13
       <!-- 运维 -->
13
       <!-- 运维 -->