mirror of
https://github.com/acepanel/panel.git
synced 2026-02-07 15:27:16 +08:00
feat: 数据库管理优化1
This commit is contained in:
@@ -73,6 +73,35 @@ const columns: any = [
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
key: 'remark',
|
||||
minWidth: 250,
|
||||
resizable: true,
|
||||
ellipsis: { tooltip: true },
|
||||
render(row: any) {
|
||||
return h(NInput, {
|
||||
size: 'small',
|
||||
value: row.remark,
|
||||
onBlur: () => handleRemark(row),
|
||||
onUpdateValue(v) {
|
||||
row.remark = v
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
key: 'status',
|
||||
width: 100,
|
||||
render(row: any) {
|
||||
return h(
|
||||
NTag,
|
||||
{ type: row.status === 'valid' ? 'success' : 'error' },
|
||||
{ default: () => (row.status === 'valid' ? '有效' : '无效') }
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '更新日期',
|
||||
key: 'updated_at',
|
||||
@@ -165,6 +194,12 @@ const handleDelete = async (id: number) => {
|
||||
})
|
||||
}
|
||||
|
||||
const handleRemark = (row: any) => {
|
||||
database.serverRemark(row.id, row.remark).then(() => {
|
||||
window.$message.success('修改成功')
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
window.$bus.on('database-server:refresh', () => {
|
||||
refresh()
|
||||
|
||||
Reference in New Issue
Block a user