这是我的三列的示例。我想自定义宽度大小。

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/

10-11 12:55