mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-12 07:55:11 +08:00
修复问题
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.6.0",
|
"version": "1.6.0",
|
||||||
"buildDate": "2026/1/6 02:54:44",
|
"buildDate": "2026/1/6 03:05:21",
|
||||||
"main": "dist-electron/main.js",
|
"main": "dist-electron/main.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -71,11 +71,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { SpringOptions, Transition } from 'motion-v'
|
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
import { motion, useMotionValue, useSpring } from 'motion-v'
|
import { motion, useMotionValue, useSpring } from 'motion-v'
|
||||||
import { computed, onMounted, ref, watch } from 'vue'
|
import { computed, onMounted, ref, watch } from 'vue'
|
||||||
|
|
||||||
|
// 本地定义类型,因为 motion-v 不导出这些类型
|
||||||
|
interface SpringOptions {
|
||||||
|
stiffness?: number
|
||||||
|
damping?: number
|
||||||
|
mass?: number
|
||||||
|
}
|
||||||
|
|
||||||
interface StarsBackgroundProps {
|
interface StarsBackgroundProps {
|
||||||
factor?: number
|
factor?: number
|
||||||
speed?: number
|
speed?: number
|
||||||
@@ -139,19 +145,19 @@
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
const starLayer1Transition = computed<Transition>(() => ({
|
const starLayer1Transition = computed(() => ({
|
||||||
repeat: Infinity,
|
repeat: Infinity,
|
||||||
duration: props.speed,
|
duration: props.speed,
|
||||||
ease: 'linear' as const
|
ease: 'linear' as const
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const starLayer2Transition = computed<Transition>(() => ({
|
const starLayer2Transition = computed(() => ({
|
||||||
repeat: Infinity,
|
repeat: Infinity,
|
||||||
duration: props.speed * 2,
|
duration: props.speed * 2,
|
||||||
ease: 'linear' as const
|
ease: 'linear' as const
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const starLayer3Transition = computed<Transition>(() => ({
|
const starLayer3Transition = computed(() => ({
|
||||||
repeat: Infinity,
|
repeat: Infinity,
|
||||||
duration: props.speed * 3,
|
duration: props.speed * 3,
|
||||||
ease: 'linear' as const
|
ease: 'linear' as const
|
||||||
|
|||||||
Reference in New Issue
Block a user