goose.vue 799 B

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