en este código, cada vez que intento acceder a los accesorios de beforeShow() en la función show() , se muestra indefinido. ¿Hay alguna forma de resolver esto? y también he estado tratando de animar los tramos de título en show() y eso es lo que estoy tratando de obtener en show() . this.elements.titleSpans estoy tratando de animarlo. y también obtener el error de GSAP como GSAP target not found o undefined . cada vez que trato de iniciar sesión en show() , se muestra undefined en la consola. || Soy un novato que me gustaría haber respondido en esta pregunta. No entiendo nada de la solución que mencionó en los comentarios privados. Por favor, permítanme obtener ayuda con esto, ya han pasado semanas tratando de resolver el error: c.||
import GSAP from 'gsap'; import Page from '../classes/Page'; import { split } from '../utils/text'; export default class AboutPage extends Page { constructor() { super({ element: '.about', elements: { title: '.about__title', description: '.about__description', content: '.about__content', }, }); } beforeShow() { super.beforeShow(); this.elements.titleSpans = split({ element: this.elements.title, expression: '<br>', }); } show() { this.timelineIn = GSAP.timeline(); this.timelineIn.fromTo( this.element, { autoAlpha: 0, }, { autoAlpha: 1, duration: 0.4, } ); if (this.elements.titleSpans === true) { this.timelineIn.fromTo( this.elements.titleSpans, { autoAlpha: 0, opacity: 0, y: '-50%', skewY: '-10deg', }, { opacity: 1, autoAlpha: 1, duration: 0.4, y: '0%', skewY: '0deg', stagger: { amount: 0.1, }, } ); } else { console.log('There is no element like that'); } return super.show(this.timelineIn); } hide() { this.timelineOut = GSAP.timeline(); this.timelineOut.to(this.element, { autoAlpha: 0, duration: 0.4, }); return super.hide(this.timelineOut); } }