1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <template>
- <div class="menusActive">
- <ul>
- <li v-for="(item, index) in menuList" @click="menuClick(item, index)" :key="index">
- {{ item.name }}
- </li>
- </ul>
- </div>
- </template>
- <script setup lang="ts">
- import { useRouter } from 'vue-router'
- const { push } = useRouter()
- const props = defineProps({
- menuData: {
- type: Object
- }
- })
- const menuList = ref(props.menuData.children)
- const pushName = ref(props.menuData.path)
- const menuClick = (item, index) => {
- push('/oaSystem/' + pushName.value + '/' + item.path)
- }
- /** 初始化 **/
- onMounted(() => {})
- </script>
- <style lang="scss" scoped>
- .menusActive {
- position: absolute;
- right: -200px;
- top: 0;
- width: 200px;
- height: 200px;
- height: auto;
- padding: 15px;
- background-color: #fff;
- z-index: 9999;
- ul {
- width: 100%;
- li {
- width: auto;
- height: 30px;
- cursor: pointer;
- }
- }
- }
- </style>
|