Merge remote-tracking branch 'origin/main' into feature/0902_antd组件替换
This commit is contained in:
@ -63,8 +63,12 @@ export default defineComponent({
|
||||
}
|
||||
return _key;
|
||||
};
|
||||
const onClickItem = (name: string) => {
|
||||
router.push({ name });
|
||||
const onClickItem = (item: typeMenuItem) => {
|
||||
let targetRoute = item.routeName;
|
||||
if (item.children?.length) {
|
||||
targetRoute = item.children[0].routeName;
|
||||
}
|
||||
router.push({ name: targetRoute });
|
||||
};
|
||||
const renderMenuItem = (item: typeMenuItem, hideLabel = false) => {
|
||||
const getMenuItemClass = () => {
|
||||
@ -79,7 +83,7 @@ export default defineComponent({
|
||||
};
|
||||
|
||||
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 iconName = Array.isArray(item.icon)
|
||||
|
||||
@ -70,15 +70,14 @@ export default async (config: SSEConfig, url: string = DEFAULT_SSE_URL): Promise
|
||||
}
|
||||
},
|
||||
onerror(error: Error) {
|
||||
// console.error('SSE error:', error);
|
||||
// 请求失败时主动关闭SSE连接
|
||||
abortController.abort();
|
||||
handleError?.(error);
|
||||
},
|
||||
onclose() {
|
||||
// console.log('SSE connection closed');
|
||||
handleClose?.();
|
||||
},
|
||||
async onopen(response: Response) {
|
||||
// console.log('onopen', response);
|
||||
handleOpen?.(response);
|
||||
},
|
||||
});
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<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">
|
||||
<span class="title">账号管理</span>
|
||||
<Button type="primary" ghost class="add-account-button" @click="handleAddAccount">添加子账号</Button>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<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">
|
||||
<span class="title">企业信息</span>
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<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">
|
||||
<span class="title">个人信息</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user