Transition added

This commit is contained in:
Bahadır Sofuoğlu
2022-11-03 01:37:25 +03:00
parent e0fb57a255
commit f76ef79b21
3 changed files with 8 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
import { toRefs, reactive, watch, ref, computed } from 'vue';
import { toRefs, reactive, computed } from 'vue';
const layoutConfig = reactive({
ripple: false,

View File

@@ -16,17 +16,16 @@
</template>
<script setup>
import { computed, watch, ref, onMounted } from 'vue';
import { computed, watch, ref } from 'vue';
import AppTopbar from './AppTopbar.vue';
import AppFooter from './AppFooter.vue';
import AppSidebar from './AppSidebar.vue';
import AppConfig from './AppConfig.vue';
import { useLayoutService } from '@/composables/layoutService';
const { onMenuToggle, layoutConfig, layoutState, isSidebarActive } = useLayoutService();
const { layoutConfig, layoutState, isSidebarActive } = useLayoutService();
const outsideClickListener = ref(null);
const sidebarActive = ref(false);
watch(isSidebarActive, (newVal) => {
if (newVal) {

View File

@@ -32,9 +32,11 @@ defineProps({
<span class="layout-menuitem-text">{{ item.label }}</span>
<i class="pi pi-fw pi-angle-down layout-submenu-toggler" v-if="item.items"></i>
</a>
<Transition class="layout-submenu">
<ul v-if="item.items && item.visible !== false">
<app-menu-item v-for="(child, i) in item.items" :key="child" :index="i" :item="child" :root="false"></app-menu-item>
</ul>
</Transition>
</li>
</template>