©著作权归作者所有:来自51CTO博客作者成都阿信的原创作品,请联系作者获取转载授权,否则将追究法律责任
Sass<td>
<ng-container *ngIf="v1.customer_pet_sex == 0"> <!--女的-->
<img src="/assets/img/{{v1.kind == 2 ? 'cat-m': 'dog-m'}}.png"
class="pet_img" style="display: inline-block;margin-right: 4px;width: 20px;height: 20px;vertical-align:middle;">
</ng-container>
<ng-container *ngIf="v1.customer_pet_sex == 1"><!--男的-->
<img src="/assets/img/{{v1.kind == 2 ? 'cat-g': 'dog-g'}}.png"
class="pet_img" style="display: inline-block;margin-right: 4px;width: 20px;height: 20px;vertical-align:middle;">
</ng-container>
<div class="pet_name" style="display: inline-block">{{v1.customer_pet_name ? v1.customer_pet_name : ''}} | {{v1.customer_pet_species ? v1.customer_pet_species : ''}}</div>
</td>
handleMouseOver = (e) => {
setTimeout(() => {
this.setState({
detailShow: 'none',
});
}, 500);
};
handleMouseOut = () =>{
//document.getElementById("wxImg").style.display='none';
setTimeout(() => {
this.setState({
detailShow: 'none',
});
}, 500);
};
<div id="wxImg" style={imgStyle}
onMouseOver={this.handleMouseOver}
onMouseOut={this.handleMouseOut}>
<img src={shop4} alt="" style={{width: '100%',height: '180px',display: this.detailShow}} />
</div>
相关文章