goose.vue 730 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <view>
  3. <up-line-progress :percentage="progress" activeColor="#54e1fe" class="game-progress-box"></up-line-progress>
  4. <image :src="imgUrl" class="goose-img-box"></image>
  5. </view>
  6. </template>
  7. <script setup>
  8. import {gooseGrowthTypeList} from "./constantConfig.js"
  9. import { ref,computed } from "vue";
  10. import upLineProgress from "uview-plus/components/u-line-progress/u-line-progress.vue";
  11. const props = defineProps({
  12. growthType: {
  13. type: [String,Number]
  14. },
  15. progress: {
  16. type: [String,Number],
  17. default: 0
  18. }
  19. })
  20. const imgUrl = computed(() => {
  21. const active = gooseGrowthTypeList.find(item => item.id == props.growthType)
  22. return active ? active.imgUrl: ''
  23. })
  24. </script>
  25. <style>
  26. </style>