@vnxjs/runtime
v3.5.66
Published
vnmf runtime for mini apps.
Downloads
45
Readme
@vnxjs/runtime
Vnmf runtime. Connect the framework (DSL) rendering mechanism to the applet rendering mechanism on the applet side, and connect the applet routing and life cycle to the life cycle corresponding to the framework. Connect the applet life cycle specification to the framework life cycle on the H5/RN side.
Core API
createReactApp()
Exposed to @vnxjs/vnmf-loader/app
calls, called in the applet entry file, to create an applet application specification object accepted by the applet App
constructor.
createVueApp()
Exposed to @vnxjs/vnmf-loader/app
calls, called in the applet entry file, to create an applet application specification object accepted by the applet App
constructor.
createPageConfig()
Expose to @vnxjs/vnmf-loader/page
calls, called in the applet page file, to create an applet page specification object accepted by the applet Page
constructor.
window
An object that imitates the browser's window
implementation on the applet side, and returns the browser's own window
in the browser environment. This object is injected into the global object via Webpack's ProvidePlugin for third-party libraries to call.
navigator
An object that imitates the browser's navigator
implementation on the applet side, and returns the browser's own navigator
in the browser environment. This object is injected into the global object via Webpack's ProvidePlugin for third-party libraries to call.
###document
An object that imitates the browser's document
implementation on the applet side, and returns the browser's own document
in the browser environment. This object is injected into the global object via Webpack's ProvidePlugin for third-party libraries to call.
Current
The Vnmf global variables exposed to developers currently have three properties:
Current.app
, returns the current applet application instance, and the non-mini program side returns the applet specification application instance, which can be used to call the applet specification life cycle.Current.page
, returns the current applet page instance, and the non-applet side returns the applet specification page instance, which can be used to call the applet specification life cycle.Current.router
, returns the current applet routing information, and the non-applet side returns the applet specification routing information
options
Vnmf configuration:
html
: Render HTMLdebug
: will print rendering time when enabledprerender
: internal parameters exposed to@vnxjs/cli