<template>
  <div v-if="selfType !== 'view' ">
    <el-rate v-model="modelData[element.mapper]" :style="selfStyle" v-bind="element.props"  @change="() => { dispatchEvent('change')}"></el-rate>
  </div>
  <div v-else :style="selfStyle">
    {{ modelData[element.mapper] }}
  </div>
</template>

<script>
import LabBase from "../../mixins/LabBase";
import LabEvent from "../../mixins/LabEvent";

export default {
  name: "LabRate",
  mixins: [LabBase,LabEvent],
  created() {
    this.$LabRender.autoFill(this.element, this)
  }
}
</script>

<style scoped>

</style>