<style lang="less">
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.orange {
  background: rgba(255, 136, 77, 0.8);
  box-shadow: 0px 4px 12px rgba(255, 136, 77, 0.8),
    0px 0px 4px rgba(255, 136, 77, 0.8);
}
.blue {
  background: rgba(77, 148, 255, 0.8);
  box-shadow: 0px 4px 12px rgba(77, 148, 255, 0.8),
    0px 0px 4px rgba(77, 148, 255, 0.8);
}
.green {
  background: rgba(52, 209, 157, 0.8);
  box-shadow: 0px 4px 12px rgba(52, 209, 157, 0.8),
    0px 0px 4px rgba(52, 209, 157, 0.8);
}
.dot-flicker {
  animation: flicker 2s infinite linear;
  -webkit-animation: flicker 2s infinite linear;
}
@keyframes flicker {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@-webkit-keyframes flicker {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
</style>

<template>
  <div
    class="dot"
    :class="{'dot-flicker': isFlicker,
      'orange': colorType=='orange',
      'blue': colorType=='blue',
      'green': colorType=='green'}">
    </div>
</template>

<script>
import wepy from '@wepy/core';

wepy.component({
  props: {
    colorType: {
      type: String,
      default: 'orange'
    },
    // 是否闪烁
    isFlicker: {
      type: Boolean,
      default: false
    }
  }
});
</script>