feat(sj_1.0.0): 调整按钮样式
This commit is contained in:
parent
6ce84996cf
commit
890b3c5fd7
@ -131,7 +131,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div class="flex-center gap-8px">
|
<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')}
|
{$t('common.edit')}
|
||||||
</NButton>
|
</NButton>
|
||||||
</div>
|
</div>
|
||||||
|
@ -175,29 +175,34 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
|||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmExecute'),
|
default: () => $t('common.confirmExecute'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
<NButton type="error" ghost size="small">
|
<NButton type="error" text ghost size="small">
|
||||||
{$t('common.execute')}
|
{$t('common.execute')}
|
||||||
</NButton>
|
</NButton>
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</NPopconfirm>
|
</NPopconfirm>
|
||||||
<NButton type="primary" ghost size="small" onClick={() => goToBatch(row.id!)}>
|
<n-divider vertical />
|
||||||
|
<NButton type="primary" ghost text size="small" onClick={() => goToBatch(row.id!)}>
|
||||||
{$t('common.batchList')}
|
{$t('common.batchList')}
|
||||||
</NButton>
|
</NButton>
|
||||||
<NButton type="warning" ghost size="small" onClick={() => edit(row.id!)}>
|
<n-divider vertical />
|
||||||
|
<NButton type="warning" ghost text size="small" onClick={() => edit(row.id!)}>
|
||||||
{$t('common.edit')}
|
{$t('common.edit')}
|
||||||
</NButton>
|
</NButton>
|
||||||
{hasAuth('R_ADMIN') ? (
|
{hasAuth('R_ADMIN') ? (
|
||||||
<NPopconfirm onPositiveClick={() => handleDelete(row.id!)}>
|
<>
|
||||||
{{
|
<n-divider vertical />
|
||||||
default: () => $t('common.confirmDelete'),
|
<NPopconfirm onPositiveClick={() => handleDelete(row.id!)}>
|
||||||
trigger: () => (
|
{{
|
||||||
<NButton type="error" ghost size="small">
|
default: () => $t('common.confirmDelete'),
|
||||||
{$t('common.delete')}
|
trigger: () => (
|
||||||
</NButton>
|
<NButton type="error" text ghost size="small">
|
||||||
)
|
{$t('common.delete')}
|
||||||
}}
|
</NButton>
|
||||||
</NPopconfirm>
|
)
|
||||||
|
}}
|
||||||
|
</NPopconfirm>
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
@ -54,7 +54,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
width: 64,
|
width: 64,
|
||||||
render: row => (
|
render: row => (
|
||||||
<div class="flex-center gap-8px">
|
<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')}
|
{$t('common.edit')}
|
||||||
</NButton>
|
</NButton>
|
||||||
</div>
|
</div>
|
||||||
|
@ -153,22 +153,28 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
title: $t('common.operate'),
|
title: $t('common.operate'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 130,
|
width: 130,
|
||||||
|
fixed: 'right',
|
||||||
render: row => (
|
render: row => (
|
||||||
<div class="flex-center gap-8px">
|
<div class="flex-center gap-8px">
|
||||||
<NButton type="primary" ghost size="small" onClick={() => edit(row.id!)}>
|
<NButton type="primary" ghost text size="small" onClick={() => edit(row.id!)}>
|
||||||
{$t('common.edit')}
|
{$t('common.edit')}
|
||||||
</NButton>
|
</NButton>
|
||||||
{hasAuth('R_ADMIN') ? (
|
{hasAuth('R_ADMIN') ? (
|
||||||
<NPopconfirm onPositiveClick={() => handleDelete(row.id!)}>
|
<>
|
||||||
{{
|
<n-divider vertical />
|
||||||
default: () => $t('common.confirmDelete'),
|
<NPopconfirm onPositiveClick={() => handleDelete(row.id!)}>
|
||||||
trigger: () => (
|
{{
|
||||||
<NButton type="error" ghost size="small">
|
default: () => $t('common.confirmDelete'),
|
||||||
{$t('common.delete')}
|
trigger: () => (
|
||||||
</NButton>
|
<span>
|
||||||
)
|
<NButton type="error" text ghost size="small">
|
||||||
}}
|
{$t('common.delete')}
|
||||||
</NPopconfirm>
|
</NButton>
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</NPopconfirm>
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
@ -164,7 +164,6 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
<NButton text type="warning" ghost size="small" onClick={() => edit(row.id!)}>
|
<NButton text type="warning" ghost size="small" onClick={() => edit(row.id!)}>
|
||||||
{$t('common.edit')}
|
{$t('common.edit')}
|
||||||
</NButton>
|
</NButton>
|
||||||
|
|
||||||
{hasAuth('R_ADMIN') ? (
|
{hasAuth('R_ADMIN') ? (
|
||||||
<>
|
<>
|
||||||
<n-divider vertical />
|
<n-divider vertical />
|
||||||
@ -179,7 +178,9 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
}}
|
}}
|
||||||
</NPopconfirm>
|
</NPopconfirm>
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : (
|
||||||
|
''
|
||||||
|
)}
|
||||||
|
|
||||||
<n-divider vertical />
|
<n-divider vertical />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user