This function is called when the bound component is initialized.
It is typically used to add event listeners, etc. It should be noted that at this point, other components might not have loaded yet, so you cannot access other components here.
1 | init?(): void |
This function is called when all components in the project have been initialized.
At this point, all components have been loaded and initialized, so it is safe to access other components here.
1 | ready?(): void |
This function is called on every frame refresh.
Do not put time-consuming operations in this function, as it will cause the page to lag.
1 | update?(): void |
This function is called when the component is destroyed.
1 | destroy?(): void |