<script lang="ts" setup name="ButtonBox">
import { ref } from 'vue'
const emits = defineEmits(['changeCurrentButton'])
const menu = [
  { name: '未领用', id: 'unused' },
  { name: '已领用', id: 'used' },
]
const current = ref('unused')
watch(current, (newValue) => {
  console.log(newValue)
  emits('changeCurrentButton', newValue)
})
</script>

<template>
  <div class="container">
    <div class="btns">
      <!-- 三级菜单 -->
      <el-radio-group v-model="current">
        <el-radio-button v-for="item in menu" :key="item.id" :label="item.id">
          {{ item.name }}
        </el-radio-button>
      </el-radio-group>
    </div>
    <!-- 展示区域 -->
    <!-- <component :is="currentComp" /> -->
  </div>
</template>

<style lang="scss" scoped>
.container {
  position: relative;

  .btns {
    position: fixed;
    top: 76px;
    right: 15px;
    z-index: 999;
  }
}
</style>

