ZhangXianQiang
2024-06-20 6e226cf788a6f06d90f20a2a8bd3306a4b73be82
src/views/menu/index.vue
@@ -25,7 +25,7 @@
<script setup>
import { ref } from 'vue';
import {useRouter} from 'vue-router';
import { useRouter } from 'vue-router';
const router = useRouter();
@@ -34,10 +34,10 @@
    name: '课程',
    categroy: [
      {
        title: '我的课程',
        iconPath: new URL('@/assets/icons/icon1.png', import.meta.url).href,
        path: '/exam-list'
      },
        title: '在线培训',
        iconPath: new URL('@/assets/icons/icon2.png', import.meta.url).href,
        path: '/train'
      }
    ]
  },
  {
@@ -58,10 +58,10 @@
]);
const menuClick = (item) => {
  if(item.path) {
  if (item.path) {
    router.push(item.path);
  }
}
};
</script>
<style lang="scss" scoped>