<template>
  <div class="a">
    <div  class="legend-entry2">
      <el-radio-group @change="changeWhq" v-model="val">
        <el-radio style="margin-right:8px;" v-for="item in periodList" :label="item.id"  :key="item.id">{{item.name}}</el-radio>
      </el-radio-group>
    </div>
  </div>
</template>

<script setup>
import {ref} from "vue";
const val = ref(1)
const emit = defineEmits(["changeWhq"]);
//物候期
const periodList = ref([])

function setPeriodData(data){
  periodList.value = data;
}
function changeWhq(e){
  emit("changeWhq",e);
}
defineExpose({
  setPeriodData
})
</script>

<style lang="scss" scoped>
.a{
  position: absolute;
  width: 100%;
  top: 5%;
  right: 30px;
  z-index: 100;
}
.legend-entry2 {
  float: right;
  display: flex;
  flex-direction: row;
  margin-right:10%;
}

</style>
