main.vue 442 B

123456789101112131415161718192021222324
  1. <template>
  2. <view v-if="dotNumber" class="dot-number center"><text>{{dotNumber}}</text></view>
  3. </template>
  4. <script>
  5. import props from "./props";
  6. export default {
  7. name: "dot",
  8. computed:{
  9. dotNumber(){
  10. if (this.value) {
  11. return this.value>this.maxValue ? this.maxValue+this.format:this.value;
  12. } else {
  13. return '';
  14. }
  15. }
  16. },
  17. props
  18. }
  19. </script>
  20. <style scoped lang="scss" src="./style.scss">
  21. </style>