feat(sj_1.0.0): 调整按钮样式
This commit is contained in:
parent
890b3c5fd7
commit
f843eacb70
@ -87,6 +87,12 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
||||
return <NTag type={tagMap[row.taskBatchStatus!]}>{label}</NTag>;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'createDt',
|
||||
title: $t('common.createDt'),
|
||||
align: 'center',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
key: 'operationReason',
|
||||
title: $t('page.jobBatch.operationReason'),
|
||||
@ -113,7 +119,7 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
||||
{{
|
||||
default: () => $t('common.confirmStop'),
|
||||
trigger: () => (
|
||||
<NButton type="error" ghost size="small">
|
||||
<NButton type="error" text ghost size="small">
|
||||
{$t('common.stop')}
|
||||
</NButton>
|
||||
)
|
||||
@ -127,7 +133,7 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
||||
{{
|
||||
default: () => $t('common.confirmRetry'),
|
||||
trigger: () => (
|
||||
<NButton type="warning" ghost size="small">
|
||||
<NButton type="error" text ghost size="small">
|
||||
{$t('common.retry')}
|
||||
</NButton>
|
||||
)
|
||||
|
@ -112,14 +112,15 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
width: 130,
|
||||
render: row => (
|
||||
<div class="flex-center gap-8px">
|
||||
<NButton type="primary" ghost size="small" onClick={() => rollback(row)}>
|
||||
<NButton type="primary" text ghost size="small" onClick={() => rollback(row)}>
|
||||
{$t('common.rollback')}
|
||||
</NButton>
|
||||
<n-divider vertical />
|
||||
<NPopconfirm onPositiveClick={() => handleDelete(row)}>
|
||||
{{
|
||||
default: () => $t('common.confirmDelete'),
|
||||
trigger: () => (
|
||||
<NButton type="error" ghost size="small">
|
||||
<NButton type="error" text ghost size="small">
|
||||
{$t('common.delete')}
|
||||
</NButton>
|
||||
)
|
||||
|
@ -132,7 +132,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
{{
|
||||
default: () => $t('common.confirmDelete'),
|
||||
trigger: () => (
|
||||
<NButton type="error" ghost size="small">
|
||||
<NButton type="error" text ghost size="small">
|
||||
{$t('common.delete')}
|
||||
</NButton>
|
||||
)
|
||||
|
@ -147,10 +147,10 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
title: $t('common.operate'),
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 130,
|
||||
width: 120,
|
||||
render: row => (
|
||||
<div class="flex-center gap-8px">
|
||||
<NButton type="primary" ghost size="small" onClick={() => edit(row.id!)}>
|
||||
<NButton type="primary" text ghost size="small" onClick={() => edit(row.id!)}>
|
||||
{$t('common.edit')}
|
||||
</NButton>
|
||||
</div>
|
||||
|
@ -150,61 +150,73 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
<div class="flex-center gap-8px">
|
||||
{/* 非[完成,最大次数], 显示[执行]按钮 */}
|
||||
{row.retryStatus !== 1 && row.retryStatus !== 2 ? (
|
||||
<>
|
||||
<NPopconfirm onPositiveClick={() => handleExecute(row.groupName!, row.uniqueId!)}>
|
||||
{{
|
||||
default: () => $t('common.confirmExecute'),
|
||||
trigger: () => (
|
||||
<NButton type="info" ghost size="small">
|
||||
<NButton type="info" text ghost size="small">
|
||||
{$t('common.execute')}
|
||||
</NButton>
|
||||
)
|
||||
}}
|
||||
</NPopconfirm>
|
||||
<n-divider vertical />
|
||||
</>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{/* 非[完成,最大次数], 显示[完成]按钮 */}
|
||||
{row.retryStatus !== 1 && row.retryStatus !== 2 ? (
|
||||
<>
|
||||
<NPopconfirm onPositiveClick={() => handleFinish(Number(row.id!), row.groupName!)}>
|
||||
{{
|
||||
default: () => $t('common.confirmFinish'),
|
||||
trigger: () => (
|
||||
<NButton type="warning" ghost size="small">
|
||||
<NButton type="warning" text ghost size="small">
|
||||
{$t('common.finish')}
|
||||
</NButton>
|
||||
)
|
||||
}}
|
||||
</NPopconfirm>
|
||||
<n-divider vertical />
|
||||
</>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{/* 重试中, 显示[停止]按钮 */}
|
||||
{row.retryStatus === 0 ? (
|
||||
<>
|
||||
<NPopconfirm onPositiveClick={() => handlePause(Number(row.id!), row.groupName!)}>
|
||||
{{
|
||||
default: () => $t('common.confirmPause'),
|
||||
trigger: () => (
|
||||
<NButton type="success" ghost size="small">
|
||||
<NButton type="success" text ghost size="small">
|
||||
{$t('common.pause')}
|
||||
</NButton>
|
||||
)
|
||||
}}
|
||||
</NPopconfirm>
|
||||
<n-divider vertical />
|
||||
</>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{/* 暂停, 显示[开始]按钮 */}
|
||||
{row.retryStatus === 3 ? (
|
||||
<>
|
||||
<NPopconfirm onPositiveClick={() => handleResume(Number(row.id!), row.groupName!)}>
|
||||
{{
|
||||
default: () => $t('common.confirmResume'),
|
||||
trigger: () => (
|
||||
<NButton type="info" ghost size="small">
|
||||
<NButton type="info" text ghost size="small">
|
||||
{$t('common.resume')}
|
||||
</NButton>
|
||||
)
|
||||
}}
|
||||
</NPopconfirm>
|
||||
<n-divider vertical />
|
||||
</>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
@ -213,7 +225,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
{{
|
||||
default: () => $t('common.confirmDelete'),
|
||||
trigger: () => (
|
||||
<NButton type="error" ghost size="small">
|
||||
<NButton type="error" text ghost size="small">
|
||||
{$t('common.delete')}
|
||||
</NButton>
|
||||
)
|
||||
|
@ -107,14 +107,15 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
width: 130,
|
||||
render: row => (
|
||||
<div class="flex-center gap-8px">
|
||||
<NButton type="primary" ghost size="small" onClick={() => edit(row.id!)}>
|
||||
<NButton type="primary" ghost size="small" text onClick={() => edit(row.id!)}>
|
||||
{$t('common.edit')}
|
||||
</NButton>
|
||||
<n-divider vertical />
|
||||
<NPopconfirm onPositiveClick={() => handleDelete(row.id!)}>
|
||||
{{
|
||||
default: () => $t('common.confirmDelete'),
|
||||
trigger: () => (
|
||||
<NButton type="error" ghost size="small">
|
||||
<NButton type="error" text ghost size="small">
|
||||
{$t('common.delete')}
|
||||
</NButton>
|
||||
)
|
||||
|
@ -102,7 +102,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
width: 130,
|
||||
render: row => (
|
||||
<div class="flex-center gap-8px">
|
||||
<NButton type="primary" ghost size="small" onClick={() => detail(row.id!)}>
|
||||
<NButton type="primary" ghost text size="small" onClick={() => detail(row.id!)}>
|
||||
{$t('common.detail')}
|
||||
</NButton>
|
||||
{row?.taskBatchStatus === 1 || row?.taskBatchStatus === 2 ? (
|
||||
@ -110,7 +110,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
{{
|
||||
default: () => $t('common.confirmStop'),
|
||||
trigger: () => (
|
||||
<NButton type="error" ghost size="small">
|
||||
<NButton type="error" text ghost size="small">
|
||||
{$t('common.stop')}
|
||||
</NButton>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user