angular - 如何更改 ng2 智能表列宽?

标签 angular ng2-smart-table

这是我的三个专栏的示例。我想自定义宽度尺寸。

resetPassword: {
    title: this.gridTittle["ResetPassword"],
    type: 'custom',
    renderComponent: UserPasswordResetComponent,
    filter: false
},
userName: {
    title: this.gridTittle["UserName"],
},
roleTypeDescription: {
    title: this.gridTittle["UserType"],
    type: 'text',
    filter: false
},

最佳答案

您可以使用宽度属性。作为documentation , "列宽示例:'20px', '20%'".在您的代码中:

resetPassword: {
    title: this.gridTittle["ResetPassword"],
    type: 'custom',
    renderComponent: UserPasswordResetComponent,
    filter: false,
    width: 25%
},
userName: {
    title: this.gridTittle["UserName"],
    width: 25%
},
roleTypeDescription: {
    title: this.gridTittle["UserType"],
    type: 'text',
    filter: false,
    width: 50%
},

关于angular - 如何更改 ng2 智能表列宽?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51397002/

相关文章:

angular - 模块 'Ng2SmartTableModule' 声明的意外模块 'AppModule'

angular - 为什么我看不到 ngOnChanges 记录在我的应用程序中

javascript - 如何在 Angular 8 的路由上加载模块?

angular - 找不到模块 : Error: Can't resolve 'fs' in node_modules\dotenv\lib'

Angular2 ng2-智能表排序

javascript - 将值传递给扩展插件 ng2 智能表

angular - ng2-smart-table,对齐文本

angular - 在 DataTable Angular 中排序格式化日期

使用 Bootstrap 的 Angular 6 库

angular - 取消订阅服务内部的 Observables?