Merge remote-tracking branch 'origin/main' into feature/0902_antd组件替换

This commit is contained in:
rd
2025-09-10 16:07:20 +08:00
5 changed files with 12 additions and 9 deletions

View File

@ -63,8 +63,12 @@ export default defineComponent({
} }
return _key; return _key;
}; };
const onClickItem = (name: string) => { const onClickItem = (item: typeMenuItem) => {
router.push({ name }); let targetRoute = item.routeName;
if (item.children?.length) {
targetRoute = item.children[0].routeName;
}
router.push({ name: targetRoute });
}; };
const renderMenuItem = (item: typeMenuItem, hideLabel = false) => { const renderMenuItem = (item: typeMenuItem, hideLabel = false) => {
const getMenuItemClass = () => { const getMenuItemClass = () => {
@ -79,7 +83,7 @@ export default defineComponent({
}; };
return ( return (
<Menu.Item class={`menu-item ${getMenuItemClass()}`} onClick={() => onClickItem(item.routeName)}> <Menu.Item class={`menu-item ${getMenuItemClass()}`} onClick={() => onClickItem(item)}>
{(() => { {(() => {
const isActive = getMenuItemClass() === 'active'; const isActive = getMenuItemClass() === 'active';
const iconName = Array.isArray(item.icon) const iconName = Array.isArray(item.icon)

View File

@ -70,15 +70,14 @@ export default async (config: SSEConfig, url: string = DEFAULT_SSE_URL): Promise
} }
}, },
onerror(error: Error) { onerror(error: Error) {
// console.error('SSE error:', error); // 请求失败时主动关闭SSE连接
abortController.abort();
handleError?.(error); handleError?.(error);
}, },
onclose() { onclose() {
// console.log('SSE connection closed');
handleClose?.(); handleClose?.();
}, },
async onopen(response: Response) { async onopen(response: Response) {
// console.log('onopen', response);
handleOpen?.(response); handleOpen?.(response);
}, },
}); });

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="bg-#fff rounded-8px w-100% py-0 px-20px mt-24px pb-24px"> <div class="bg-#fff rounded-8px w-100% py-0 px-20px pb-24px">
<div class="title-row"> <div class="title-row">
<span class="title">账号管理</span> <span class="title">账号管理</span>
<Button type="primary" ghost class="add-account-button" @click="handleAddAccount">添加子账号</Button> <Button type="primary" ghost class="add-account-button" @click="handleAddAccount">添加子账号</Button>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="bg-#fff rounded-8px w-100% py-0 px-20px mt-24px pb-24px"> <div class="bg-#fff rounded-8px w-100% py-0 px-20px pb-24px">
<div class="title-row"> <div class="title-row">
<span class="title">企业信息</span> <span class="title">企业信息</span>
</div> </div>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="bg-#fff rounded-8px w-100% py-0 px-20px mt-24px pb-24px"> <div class="bg-#fff rounded-8px w-100% py-0 px-20px pb-24px">
<div class="title-row"> <div class="title-row">
<span class="title">个人信息</span> <span class="title">个人信息</span>
</div> </div>