index.vue 748 B

123456789101112131415161718192021222324252627
  1. <!-- 游戏页面 -->
  2. <template>
  3. <!-- 积分 -->
  4. <view>{{credit}}</view>
  5. <!-- 桌面食物 -->
  6. <foodVue :shiwuId="shiwuId"></foodVue>
  7. <!-- 大鹅 4阶段 -->
  8. <gooseVue :growth="growth" :growthType="growthType" :progress="progress"></gooseVue>
  9. <!-- 食物选择 -->
  10. <foodSelectVue :shiwuId="shiwuId" @weishi="onWeiShi"></foodSelectVue>
  11. </template>
  12. <script setup>
  13. import foodVue from "./components/food.vue";
  14. import gooseVue from "./components/goose.vue";
  15. import foodSelectVue from "./components/foodSelect.vue";
  16. import { useGame } from "./useGame";
  17. const { credit,growth,growthType,progress,shiwuId ,handleWeishi } = useGame();
  18. function onWeiShi(data) {
  19. handleWeishi(data)
  20. }
  21. </script>
  22. <style>
  23. </style>