62 lines
1.4 KiB
TypeScript
Executable File
62 lines
1.4 KiB
TypeScript
Executable File
import { computed, defineComponent, onMounted, PropType, ref, toRef, watch } from 'vue'
|
|
import { useI18n } from '@src/boot/i18n'
|
|
import { useUserStore } from '@store/UserStore'
|
|
import { useGlobalStore } from '@store/globalStore'
|
|
import { useQuasar } from 'quasar'
|
|
import { costanti } from '@costanti'
|
|
import { fieldsTable } from '@store/Modules/fieldsTable'
|
|
import { shared_consts } from '@/common/shared_vuejs'
|
|
import { IColGridTable, IOperators } from 'model'
|
|
import { tools } from '@store/Modules/tools'
|
|
import { static_data } from '@/db/static_data'
|
|
|
|
export default defineComponent({
|
|
name: 'CMenuItem',
|
|
props: {
|
|
item: Object,
|
|
getroute: Function,
|
|
getmymenuclass: Function,
|
|
getimgiconclass: Function,
|
|
clBase: String,
|
|
mainMenu: Boolean,
|
|
level: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
},
|
|
|
|
components: {},
|
|
setup(props, { emit }) {
|
|
const $q = useQuasar()
|
|
const { t } = useI18n()
|
|
const userStore = useUserStore()
|
|
const globalStore = useGlobalStore()
|
|
|
|
function mounted() {
|
|
// ...
|
|
|
|
}
|
|
|
|
function getmenuByPath(pathoobj: any) {
|
|
let mymenufind = null
|
|
if (tools.isObject(pathoobj)) {
|
|
mymenufind = pathoobj
|
|
} else {
|
|
mymenufind = static_data.routes.find((menu: any) => menu.path === '/' + pathoobj)
|
|
}
|
|
|
|
return mymenufind
|
|
}
|
|
|
|
onMounted(mounted)
|
|
|
|
|
|
return {
|
|
tools,
|
|
getmenuByPath,
|
|
|
|
}
|
|
}
|
|
})
|
|
|