feat: 更新 @riwa/api-types 依赖至 0.0.74;修改多个视图中的“是否激活”字段为“是否启用”

This commit is contained in:
2026-01-04 21:05:38 +07:00
parent 4c8fc46ad4
commit f53a72de4a
7 changed files with 23 additions and 33 deletions

View File

@@ -138,7 +138,7 @@ const columns: TableBaseColumns = [
title: '操作',
fixed: 'right',
key: 'operation',
width: 200,
width: 140,
operations: (row: any) => [
{
contentText: '编辑',
@@ -180,15 +180,15 @@ const filterColumns: TableFilterColumns = [
key: 'name'
},
{
title: '是否激活',
title: '是否启用',
key: 'isActive',
component: NSelect,
componentProps: {
placeholder: '请选择状态',
clearable: true,
options: [
{ label: '激活', value: true },
{ label: '未激活', value: false }
{ label: '启用', value: true },
{ label: '未启用', value: false }
]
}
}

View File

@@ -79,11 +79,7 @@ function handleSubmit() {
formInst.value?.validate(async errors => {
if (!errors) {
syncNumberToString();
await safeClient(() =>
client.api.admin.trading_pairs.post({
...form.value
})
);
await safeClient(() => client.api.admin.trading_pairs.post(form.value));
emit('close');
}
});

View File

@@ -84,8 +84,8 @@ function handleSubmit() {
if (!errors) {
syncNumberToString();
await safeClient(() =>
client.api.admin.trading_pairs({ symbol: props.data.symbol }).patch({
...form.value
client.api.admin.trading_pairs.patch(form.value, {
query: { symbol: props.data.symbol }
})
);
emit('close');

View File

@@ -110,20 +110,12 @@ const columns: TableBaseColumns = [
align: 'center'
},
{
title: '是否激活',
title: '是否启用',
key: 'isActive',
width: 140,
align: 'center',
render: row => {
return h(
NTag,
{
type: row.isActive ? 'success' : 'error'
},
{
default: () => (row.isActive ? '激活' : '未激活')
}
);
return row.isActive ? '是' : '否';
}
},
{
@@ -157,7 +149,9 @@ const columns: TableBaseColumns = [
positiveText: '确认',
negativeText: '取消',
onPositiveClick: async () => {
await safeClient(() => client.api.admin.trading_pairs({ symbol: row.symbol }).delete());
await safeClient(() =>
client.api.admin.trading_pairs.delete(undefined, { query: { symbol: row.symbol } })
);
tableInst.value?.reload();
}
});
@@ -196,15 +190,15 @@ const filterColumns: TableFilterColumns = [
}
},
{
title: '是否激活',
title: '是否启用',
key: 'isActive',
component: NSelect,
componentProps: {
placeholder: '请选择状态',
clearable: true,
options: [
{ label: '激活', value: true },
{ label: '未激活', value: false }
{ label: '', value: true },
{ label: '', value: false }
]
}
}

View File

@@ -34,7 +34,7 @@ const columns: TableBaseColumns = [
key: 'bankCode'
},
{
title: '是否激活',
title: '是否启用',
key: 'isActive',
render(row: any) {
return row.isActive ? '是' : '否';