fix: 修复首页路由和构建错误

This commit is contained in:
jingzhe
2026-07-21 16:48:40 +08:00
parent 4669ee1fb4
commit 4b4f3bad67
8 changed files with 26 additions and 27 deletions

View File

@@ -7,8 +7,13 @@ interface ActivatePoint {
progress: number
}
type NeuralCardElement = HTMLElement & {
_neuralAnimationId?: number | null
}
const vNeuralCard: Directive = {
mounted(el: HTMLElement) {
const neuralEl = el as NeuralCardElement
const points: ActivatePoint[] = []
let pointId = 0
let animationId: number | null = null
@@ -107,12 +112,13 @@ const vNeuralCard: Directive = {
animate()
el._neuralAnimationId = animationId
neuralEl._neuralAnimationId = animationId
},
unmounted(el: HTMLElement) {
if (el._neuralAnimationId) {
cancelAnimationFrame(el._neuralAnimationId)
const neuralEl = el as NeuralCardElement
if (neuralEl._neuralAnimationId) {
cancelAnimationFrame(neuralEl._neuralAnimationId)
}
}
}