Browse Source

日常开发

林旭祥 1 week ago
parent
commit
80ecbc5edd
2 changed files with 4 additions and 1 deletions
  1. 1 1
      src/components/SquareGame/index.vue
  2. 3 0
      src/types/components.d.ts

+ 1 - 1
src/components/SquareGame/index.vue

@@ -488,7 +488,7 @@ class squareObj {
         this.x[i] = maxX + 1;
         this.h[i] = canHeight.value * 0.25 + canHeight.value * 0.35 * Math.random();
         this.w[i] = canWidth.value * 0.14 + canWidth.value * 0.1 * Math.random();
-        this.y[i] = canHeight - this.h[i];
+        this.y[i] = canHeight.value - this.h[i];
 
         let repeatColorCount = 0;
         if (i === 0 && this.isLive[this.num - 1]) {

+ 3 - 0
src/types/components.d.ts

@@ -9,8 +9,11 @@ declare module 'vue' {
   export interface GlobalComponents {
     ChooseStudent: typeof import('./../components/ChooseStudent/index.vue')['default']
     copy: typeof import('./../components/SquareGame/index copy.vue')['default']
+    ElIcon: typeof import('element-plus/es')['ElIcon']
+    ElInput: typeof import('element-plus/es')['ElInput']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElSelect: typeof import('element-plus/es')['ElSelect']
+    ElSwitch: typeof import('element-plus/es')['ElSwitch']
     FaceWindow: typeof import('./../components/FaceWindow/index.vue')['default']
     Header: typeof import('./../components/Header/index.vue')['default']
     'Index copy': typeof import('./../components/SquareGame/index copy.vue')['default']