feat: 更新依赖 @riwa/api-types 至 0.0.102,优化银行管理组件的表单逻辑
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
"@better-scroll/core": "2.5.1",
|
"@better-scroll/core": "2.5.1",
|
||||||
"@elysiajs/eden": "^1.4.5",
|
"@elysiajs/eden": "^1.4.5",
|
||||||
"@iconify/vue": "5.0.0",
|
"@iconify/vue": "5.0.0",
|
||||||
"@riwa/api-types": "http://192.168.1.7:9527/api/riwa-eden-0.0.98.tgz",
|
"@riwa/api-types": "http://192.168.1.7:9527/api/riwa-eden-0.0.102.tgz",
|
||||||
"@sa/axios": "workspace:*",
|
"@sa/axios": "workspace:*",
|
||||||
"@sa/color": "workspace:*",
|
"@sa/color": "workspace:*",
|
||||||
"@sa/hooks": "workspace:*",
|
"@sa/hooks": "workspace:*",
|
||||||
|
|||||||
12
pnpm-lock.yaml
generated
12
pnpm-lock.yaml
generated
@@ -18,8 +18,8 @@ importers:
|
|||||||
specifier: 5.0.0
|
specifier: 5.0.0
|
||||||
version: 5.0.0(vue@3.5.25(typescript@5.9.3))
|
version: 5.0.0(vue@3.5.25(typescript@5.9.3))
|
||||||
'@riwa/api-types':
|
'@riwa/api-types':
|
||||||
specifier: http://192.168.1.7:9527/api/riwa-eden-0.0.98.tgz
|
specifier: http://192.168.1.7:9527/api/riwa-eden-0.0.102.tgz
|
||||||
version: '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.98.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)))'
|
version: '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.102.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':
|
'@sa/axios':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:packages/axios
|
version: link:packages/axios
|
||||||
@@ -1083,9 +1083,9 @@ packages:
|
|||||||
'@quansync/fs@0.1.6':
|
'@quansync/fs@0.1.6':
|
||||||
resolution: {integrity: sha512-zoA8SqQO11qH9H8FCBR7NIbowYARIPmBz3nKjgAaOUDi/xPAAu1uAgebtV7KXHTc6CDZJVRZ1u4wIGvY5CWYaw==}
|
resolution: {integrity: sha512-zoA8SqQO11qH9H8FCBR7NIbowYARIPmBz3nKjgAaOUDi/xPAAu1uAgebtV7KXHTc6CDZJVRZ1u4wIGvY5CWYaw==}
|
||||||
|
|
||||||
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.98.tgz':
|
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.102.tgz':
|
||||||
resolution: {tarball: http://192.168.1.7:9527/api/riwa-eden-0.0.98.tgz}
|
resolution: {tarball: http://192.168.1.7:9527/api/riwa-eden-0.0.102.tgz}
|
||||||
version: 0.0.98
|
version: 0.0.102
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@elysiajs/eden': ^1.4.5
|
'@elysiajs/eden': ^1.4.5
|
||||||
|
|
||||||
@@ -5080,7 +5080,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
quansync: 0.3.0
|
quansync: 0.3.0
|
||||||
|
|
||||||
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.98.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/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.102.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:
|
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))
|
'@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))
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ const formRef = useTemplateRef<FormInst | null>('formRef');
|
|||||||
const form = ref<Body>({
|
const form = ref<Body>({
|
||||||
bankCode: '',
|
bankCode: '',
|
||||||
nameCn: '',
|
nameCn: '',
|
||||||
|
nameEn: '',
|
||||||
isActive: true,
|
isActive: true,
|
||||||
sortOrder: 0
|
sortOrder: 0
|
||||||
});
|
});
|
||||||
@@ -104,7 +105,7 @@ async function handleSubmit() {
|
|||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
|
||||||
<NFormItem label="是否启用" path="isActive">
|
<NFormItem label="是否启用" path="isActive">
|
||||||
<NSwitch v-model:value="form.isActive">
|
<NSwitch :value="form.isActive || false" @update:value="val => (form.isActive = val)">
|
||||||
<template #checked>启用</template>
|
<template #checked>启用</template>
|
||||||
<template #unchecked>禁用</template>
|
<template #unchecked>禁用</template>
|
||||||
</NSwitch>
|
</NSwitch>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { client, safeClient } from '@/service/api';
|
|||||||
defineOptions({ name: 'EditBank' });
|
defineOptions({ name: 'EditBank' });
|
||||||
|
|
||||||
type Data = Treaty.Data<typeof client.api.admin.bank_account.banks.get>['data'][number];
|
type Data = Treaty.Data<typeof client.api.admin.bank_account.banks.get>['data'][number];
|
||||||
type Body = CommonType.TreatyBody<typeof client.api.admin.bank_account.banks>;
|
type Body = CommonType.TreatyBody<typeof client.api.admin.bank_account.banks.post>;
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
data: Data;
|
data: Data;
|
||||||
@@ -20,9 +20,7 @@ const emit = defineEmits<{
|
|||||||
const formRef = useTemplateRef<FormInst | null>('formRef');
|
const formRef = useTemplateRef<FormInst | null>('formRef');
|
||||||
|
|
||||||
const form = ref<Body>({
|
const form = ref<Body>({
|
||||||
nameCn: props.data.nameCn,
|
...props.data
|
||||||
isActive: props.data.isActive,
|
|
||||||
sortOrder: props.data.sortOrder
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const rules: FormRules = {
|
const rules: FormRules = {
|
||||||
@@ -92,7 +90,7 @@ async function handleSubmit() {
|
|||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
|
||||||
<NFormItem label="是否启用" path="isActive">
|
<NFormItem label="是否启用" path="isActive">
|
||||||
<NSwitch v-model:value="form.isActive">
|
<NSwitch :value="form.isActive || false" @update:value="val => (form.isActive = val)">
|
||||||
<template #checked>启用</template>
|
<template #checked>启用</template>
|
||||||
<template #unchecked>禁用</template>
|
<template #unchecked>禁用</template>
|
||||||
</NSwitch>
|
</NSwitch>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ const columns: TableBaseColumns = [
|
|||||||
negativeText: '否',
|
negativeText: '否',
|
||||||
content: '确认删除该银行信息?',
|
content: '确认删除该银行信息?',
|
||||||
onPositiveClick: async () => {
|
onPositiveClick: async () => {
|
||||||
safeClient(() => client.api.admin.bank_account.banks({ id: row.id }).delete());
|
await safeClient(() => client.api.admin.bank_account.banks({ id: row.id }).delete());
|
||||||
message.success('删除成功');
|
message.success('删除成功');
|
||||||
tableInst.value?.reload();
|
tableInst.value?.reload();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user