当前位置: 首页 > 工具软件 > ngx-datatable > 使用案例 >

angular5 ngx-datatable 使用自定义的css

戚高洁
2023-12-01
使用ngx-datatable,自定义css 需要:
在css文件中加入
@import '~@swimlane/ngx-datatable/release/index.css';
@import '~@swimlane/ngx-datatable/release/themes/material.css';
@import '~@swimlane/ngx-datatable/release/assets/icons.css';
 
然后在ts文件中加入 ViewEncapsulation
import { ViewEncapsulation } from '@angular/core';
@Component({
[...] // other code like template and style urls
encapsulation: ViewEncapsulation.None
})

 

然后在css文件中自定义的style就生效了

转载于:https://www.cnblogs.com/imagin/p/9236343.html

 类似资料: