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

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

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

<style scoped>

</style>