Vue router named view is not rendering

I am new to vue 3 and stuck at a point where I have two divs side by side and I want to show the component in the right div.I read the router documentation and tried to solve it but not succeeded. Here is a short version of the components

LeadSelection.vue: This is the component that I wanted to show in the right panel. Like this I will have some more components

<template>
    <div class="flex flex-col gap-4">
        ...
        <p class="font-normal text-[#91a3d9] text-center">
            Select the lead whose profile you want to check.
        </p>
    </div>
</template>

LeadList.vue: Here I am trying to show the components in the right panel based on names. Like I have table in left side. And buttons for addLead and load lead. So if row is select then I want to show the selection component. If add lead button is click then I want to show the add lead component in the right panel.

<template>
    <div id="left-side" class="flex flex-col bg-white rounded-lg w-3/5 p-10">
        ......
    </div>
    <div id="right-side" class="bg-[#dfe7fa] items-center place-content-center rounded-lg p-10 w-2/5">  
        <RouterView name="selection" />
        <RouterView name="profile" />
        <RouterView name="addLead" />
        <RouterView name="loadLead" />
    </div>
</template

LeadAndList.vue: In this component I have two buttons that switch the tabs. I know I should use RouterLink here, but I thought I would do it later. I don’t know how but let see

<script setup>
    import LeadList from './lead/LeadList.vue';
    ...
</script>
<template>
    div class="bg-[#f0f3fa] py-10">
        <div class="container mx-auto flex justify-center text-center mb-10">
            <button 
                id="leadTabButton" 
                class="tabButton w-1/6 text-white bg-blue-600 font-medium p-2"
                @click="showTab($event, 'leadTab')">
                Lead
            </button>
            <button 
                id="listTabButton" 
                class="tabButton w-1/6 text-blue-600 bg-white border border-blue-600 font-medium p-2"
                @click="showTab($event, 'listTab')">
                List
            </button>
        </div>
        <div class="container mx-auto flex">

            <div id="leadTab" class="tab flex w-full">
               <LeadList />
            </div>

            <div id="listTab" class="tab flex w-full hidden">
                <!-- List Component -->
                <p>List Tab Content</p>
            </div>
        </div>
    </div>
</template>

LeadAndListView.vue: This view I am using in router file to show the page

<script setup>
    import LeadAndList from '@/components/leadAndList/LeadAndList.vue'
</script>

<template>
    <LeadAndList />
</template>

defaultLayout.vue: This is the default layout that App.vue is using.

<template>
    <div class="layout-default">
        <header class="layout-default-header">
            <AppHeader />
        </header>
        <main class="layout-default-main">
            <slot />
        </main>
        <footer class="layout-default-footer">
            <AppFooter />
        </footer>
    </div>
</template>

App.vue

<script setup>

    import { RouterView } from 'vue-router'
    import DefaultLayout from '@/layouts/defaultLayout.vue'
    import { shallowRef } from 'vue'

    const defaultLayout = shallowRef(DefaultLayout)

</script>

<template>
    <component :is="defaultLayout">
        <RouterView 
            :currentLayout="defaultLayout" 
            @update:currentLayout="newLayout => defaultLayout = newLayout" 
        />
    </component>
</template>

LeadAndListRoutes.js. This is the route file. This file will contain the different routes that I wanted to show on the right panel

export default {
    path: '/lead',
    children: [
       { path: '', name: "leadAndListView", component: () => import('@/views/leadAndList/LeadAndListView.vue') },
   ]
};

Finally index.js

   ....
   import leadAndListRoutes from './routes/leadAndList/leadAndListRoutes';

const routes = [
    ...,
    { ...leadAndListRoutes },
]

export const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes
})

export default router

My screen is looking like this. The right side is empty

I tried to use the following

import LeadSelection from '@/components/leadAndList/lead/LeadSelection.vue';

export default {
    path: '/lead',
    components: {
        default: LeadSelection
    },
    children: [
       { path: '', name: "leadAndListView", component: () => import('@/views/leadAndList/LeadAndListView.vue') },
   ]
};

But then I got the following

This is the content that I want to show in my right div. But now it is occupying the whole screen

Then I tried to use with the name like the following

   export default {
       path: '/lead',
        components: {
            'selection': LeadSelection
        },
        children: [
       { path: '', name: "leadAndListView", component: () => import('@/views/leadAndList/LeadAndListView.vue') },
       ]
    };

But it didn’t work. Then I tried to use components at the children level but it didn’t work. What I am doing wrong. I want to show different views based on the components.

Thanks

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật