ng2-smart-table:如何使用css?

时间:2018-04-09 08:19:04

标签: css angular ng2-smart-table

任何人都可以帮助我如何将CSS用于ng2-smart-table组件?

我想要自定义分页,标题,thead,tbody

提前谢谢 安德烈

1 个答案:

答案 0 :(得分:4)

在设置对象中使用以下配置

attr: {
        class: 'table table-bordered'
      }, //this is for getting default table class

 :host /deep/ ng2-smart-table { 
    font-size: 16px; 
}//this for custom css

示例:

settings = {
  columns: {
    id: {
      title: 'ID'
    },
    name: {
      title: 'Full Name'
    },
    username: {
      title: 'User Name'
    },
    email: {
      title: 'Email'
    }
  },
attr: {
        class: 'table table-bordered'
      }
};
相关问题