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

@@ -50,7 +50,7 @@
"@better-scroll/core": "2.5.1",
"@elysiajs/eden": "^1.4.5",
"@iconify/vue": "5.0.0",
"@riwa/api-types": "http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz",
"@riwa/api-types": "http://192.168.1.8:9527/api/riwa-api-types-0.0.74.tgz",
"@sa/axios": "workspace:*",
"@sa/color": "workspace:*",
"@sa/hooks": "workspace:*",

12
pnpm-lock.yaml generated
View File

@@ -18,8 +18,8 @@ importers:
specifier: 5.0.0
version: 5.0.0(vue@3.5.25(typescript@5.9.3))
'@riwa/api-types':
specifier: http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz
version: http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))
specifier: http://192.168.1.8:9527/api/riwa-api-types-0.0.74.tgz
version: http://192.168.1.8:9527/api/riwa-api-types-0.0.74.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))
'@sa/axios':
specifier: workspace:*
version: link:packages/axios
@@ -1083,9 +1083,9 @@ packages:
'@quansync/fs@0.1.6':
resolution: {integrity: sha512-zoA8SqQO11qH9H8FCBR7NIbowYARIPmBz3nKjgAaOUDi/xPAAu1uAgebtV7KXHTc6CDZJVRZ1u4wIGvY5CWYaw==}
'@riwa/api-types@http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz':
resolution: {tarball: http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz}
version: 0.0.70
'@riwa/api-types@http://192.168.1.8:9527/api/riwa-api-types-0.0.74.tgz':
resolution: {tarball: http://192.168.1.8:9527/api/riwa-api-types-0.0.74.tgz}
version: 0.0.74
peerDependencies:
'@elysiajs/eden': ^1.4.5
@@ -5080,7 +5080,7 @@ snapshots:
dependencies:
quansync: 0.3.0
'@riwa/api-types@http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
'@riwa/api-types@http://192.168.1.8:9527/api/riwa-api-types-0.0.74.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
dependencies:
'@elysiajs/eden': 1.4.5(elysia@1.4.19(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3))

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 ? '是' : '否';