Notification: Set a new Friendship and Accepted Friendship
This commit is contained in:
@@ -29,10 +29,9 @@ export default defineComponent({
|
||||
|
||||
const myroutes = ref(<IListRoutes[]>[])
|
||||
|
||||
function getmenu(): any {
|
||||
// console.log('getmenu menuOne!')
|
||||
return globalStore.getmenu
|
||||
}
|
||||
const getmenu = computed(() => globalStore.getmenu )
|
||||
|
||||
const islogged = computed(() => userStore.isLogged)
|
||||
|
||||
function setParentVisibilityBasedOnRoute(parent: any) {
|
||||
parent.routes.forEach((item: any) => {
|
||||
@@ -42,19 +41,26 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => userStore.isLogged || finishLoading.value,(to, from) => {
|
||||
myroutes.value = []
|
||||
myroutes.value = static_data.routes
|
||||
})
|
||||
|
||||
watch(() => path, (to, from) => {
|
||||
function updatemenu() {
|
||||
const mymenu = globalStore.getmenu
|
||||
// console.log('watch:', mymenu)
|
||||
Object.keys(mymenu).forEach((parentName: any) => {
|
||||
// console.log('parentName', parentName)
|
||||
// @ts-ignore
|
||||
setParentVisibilityBasedOnRoute(mymenu[parentName])
|
||||
})
|
||||
myroutes.value = []
|
||||
myroutes.value = static_data.routes
|
||||
}
|
||||
|
||||
watch(() => islogged.value,(to, from) => {
|
||||
updatemenu()
|
||||
})
|
||||
|
||||
watch(() => finishLoading.value,(to, from) => {
|
||||
updatemenu()
|
||||
})
|
||||
|
||||
watch(() => path, (to, from) => {
|
||||
updatemenu()
|
||||
})
|
||||
|
||||
/* function replaceUnderlineToSpace(text: string) {
|
||||
|
||||
Reference in New Issue
Block a user