Skip to content

Api Reference

创建一个新的应用实例。

  • options.name - 应用名称
  • options.version - 版本号
  • options.plugins - 插件列表

返回一个 App 实例。

const app = createApp({
name: 'Demo',
plugins: [logger, router]
})

启动应用。

app.start()
// 输出: App started successfully!

停止应用。

注册插件。

app.use(myPlugin)
事件名触发时机
ready应用就绪
error发生错误
destroy应用销毁