Coloring's picture
fix: 0.x => 1.0
e841ba5
|
raw
history blame
1.19 kB

Application

The root component of the application, this component contains all the component dependencies of modelscope_studio. It is necessary to ensure that all components exported from modelscope_studio are wrapped by it, otherwise the page will not be successfully previewed.

In addition, this component can also listen to the lifecycle of the user's page and obtain the current user's environment information, you can:

  • Obtain the current user's language, page theme, user agent, and screen status.
  • Listen to page behaviors and trigger corresponding events (page loading, size changes, page closing, etc.).

In addition, this component provides the custom event, you can send events to the Python side by calling window.ms_globals.dispatch in any Javascript function, and receive the events on the Python side through the ms.Application.custom event.

Examples