mirror of
https://gitcode.com/leisileken/cloud-smart.git
synced 2026-09-11 10:27:20 +08:00
fix: 修复首页路由和构建错误
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user