- Statistiche

- Menu e Sottomenu
- Lista ultimi Movimenti
This commit is contained in:
Surya Paolo
2024-09-26 02:14:50 +02:00
parent 4ac0acc2f3
commit 4c9e5ae991
101 changed files with 2215 additions and 9516 deletions

View File

@@ -6,16 +6,12 @@ import { useRoute } from 'vue-router'
import { static_data } from '@/db/static_data'
import { useUserStore } from '@store/UserStore'
import { CMenuItem } from '../../components/CMenuItem'
export default defineComponent({
name: 'MenuOne',
props: {
clBase: {
type: String,
required: false,
default: 'my-menu',
},
},
components: { CMenuItem },
setup(props) {
const route = useRoute()
const userStore = useUserStore()
@@ -29,10 +25,12 @@ export default defineComponent({
const myroutes = ref(<IListRoutes[]>[])
const getmenu = computed(() => globalStore.getmenu )
const getmenu = computed(() => globalStore.getmenu)
const islogged = computed(() => userStore.isLogged)
const clBase = ref('my-menu')
function setParentVisibilityBasedOnRoute(parent: any) {
parent.routes.forEach((item: any) => {
if (path.value === item.path) {
@@ -51,11 +49,11 @@ export default defineComponent({
myroutes.value = static_data.routes
}
watch(() => islogged.value,(to, from) => {
watch(() => islogged.value, (to, from) => {
updatemenu()
})
watch(() => finishLoading.value,(to, from) => {
watch(() => finishLoading.value, (to, from) => {
updatemenu()
})
@@ -78,7 +76,7 @@ export default defineComponent({
}
function getmymenuclass(elem: IListRoutes) {
let menu: string = props.clBase
let menu: string = clBase.value
if (elem.color) {
menu += ` ${elem.color}`
@@ -111,6 +109,12 @@ export default defineComponent({
return 'clBase'
}
function getmenuByPath(path: string) {
const mymenufind = static_data.routes.find((menu: any) => menu.path === '/' + path)
return mymenufind
}
myroutes.value = static_data.routes
return {
@@ -124,7 +128,8 @@ export default defineComponent({
myroutes,
getimgiconclass,
getimgiconclass2,
getmenuByPath,
clBase,
}
},
})