<template>
  <div class="leftSideMenu">
    <div class="singleSider" v-for="(item,index) in siderList" :key="index" :class="{'activeIn':props.StuLeftMenuNum==index}" @click="handleClick(index)">{{ item }}</div>
  </div>
</template>

<script lang="ts" setup>
import { defineProps } from 'vue';
import { useRouter } from "vue-router";
const router = useRouter();
const props = defineProps(['StuLeftMenuNum'])

let siderList=["试题分析","我的试卷","个人成绩单"]
let num = ref(0);


const handleClick = (index) => {
  num.value = index;
  switch (index) {
    case 0:
      router.push('stu_stfx');
      break;
    case 1:
      router.push('stu_wdsj');
      break;
    case 2:
      router.push('stu_grcjd');
      break;
  }
}

</script>

<style lang="scss" scoped>
.leftSideMenu{
  background-color: #fff;
}
.singleSider{
  height: 45px;
  line-height: 45px;
  text-align: center;
  cursor: pointer;
}
.activeIn{
  color: #0148E5;
  background-color:#F5F8FF;
  border-right:3px solid #0148E5;
}
</style>
