nsgm-cli 2.1.27 → 2.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -264,8 +264,6 @@ export const StyledTable = styled(Table)`
|
|
|
264
264
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
265
265
|
border-bottom: 1px solid #f0f0f0;
|
|
266
266
|
white-space: nowrap;
|
|
267
|
-
overflow: hidden;
|
|
268
|
-
text-overflow: ellipsis;
|
|
269
267
|
}
|
|
270
268
|
|
|
271
269
|
.ant-table-tbody > tr:last-child > td {
|
|
@@ -486,7 +486,7 @@ export default Page`;
|
|
|
486
486
|
.join(",\n");
|
|
487
487
|
}
|
|
488
488
|
generateTableColumns(fields) {
|
|
489
|
-
const columns = fields.map((field
|
|
489
|
+
const columns = fields.map((field) => {
|
|
490
490
|
let column = ` {\n title: t('${this.controller}:${this.controller}.fields.${field.name}'),\n dataIndex: '${field.name}',\n key: '${field.name}'`;
|
|
491
491
|
// 添加排序功能
|
|
492
492
|
if (field.type === "integer") {
|
|
@@ -508,10 +508,10 @@ export default Page`;
|
|
|
508
508
|
}
|
|
509
509
|
// 设置宽度
|
|
510
510
|
if (field.name === "id") {
|
|
511
|
-
column += `,\n width:
|
|
511
|
+
column += `,\n width: 80,\n align: 'center' as const`;
|
|
512
512
|
}
|
|
513
|
-
else if (
|
|
514
|
-
column += `,\n width:
|
|
513
|
+
else if (field.type === "integer" || field.type === "decimal") {
|
|
514
|
+
column += `,\n width: 100`;
|
|
515
515
|
}
|
|
516
516
|
column += "\n }";
|
|
517
517
|
return column;
|
|
@@ -520,8 +520,9 @@ export default Page`;
|
|
|
520
520
|
const actionColumn = ` {
|
|
521
521
|
title: t('${this.controller}:${this.controller}.fields.actions'),
|
|
522
522
|
dataIndex: '',
|
|
523
|
-
width:
|
|
523
|
+
width: 140,
|
|
524
524
|
align: 'center' as const,
|
|
525
|
+
fixed: 'right',
|
|
525
526
|
render: (_: any, record: any) => {
|
|
526
527
|
return (
|
|
527
528
|
<Space size="small">
|