底边框加小凸点
底邊框的實現方式:
.tab-item {width: 100px;float: left;height: 36px;line-height: 36px;text-align: center;cursor: pointer;position: relative;&.active{&:after{content: '';position: absolute;bottom: 0;left: 50%;width: 48px;height: 2px;margin-left:-24px;background: #E50113;}}
}
我實現的方式:
.tab-item {margin:0 26px;float: left; // 沒有浮動的話,會有間隙的,那么會換行!height: 36px;line-height: 36px;`函數執行:
this['queryEfenceInfo'+this.selectedSearchEfenceType.val]();
eg:queryEfenceInfo1();
queryEfenceInfo2();`//text-align: center;cursor: pointer;position: relative;&.active{border-bottom:2px solid #E50113;}
}
ngClass:
[ngClass]="{'active': tab.val==selectedTabVal}"
ngStyle:
[ngStyle]="{'display':(selectedTabVal===1)?'none':'block','right':(selectedTabVal===3)?'5px':'15px'}"
// 函數執行:
this['query'+this.selectedSearchEfenceType.val]();
eg:
query1();
query2();elecType 是0,1,2,3,等
this.selectedType = this.types[this.current.type || 0];
some函數:
在這里插入代碼片 // nz-row要加的,要不然沒有h的! <div nz-row><div nz-col [nzSpan]="6"></div><div nz-col [nzSpan]="18"></div> </div>nz-datepick:在選擇日期的時候,會執行一次startDateChange函數,確定的時候,也會執行一次這個函數==》兩次都是選擇的時間值
打開后沒有選擇,確定,也會執行函數:null
select 選擇已經選中的項,也會執行change事件!所以要加判斷的!
總結
- 上一篇: 狂神说java-Mybatis
- 下一篇: 核心价值观