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