JSPM

aegis-core

1.21.8
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 6
    • Score
      100M100P100Q46835F
    • License MIT

    aegis core

    Package Exports

    • aegis-core

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aegis-core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    aegis-core 开发文档

    上报核心,与平台无关

    生命周期

    onInited

    当所有的插件安装完 Aegis 初始化完成时执行

    beforeReport

    在上报普通日志前执行

    beforeReportSpeed

    在上报测速日志前执行

    插件

    插件编写

    import Core, { Plugin } from 'aegis-core';
    export default new Plugin({
      name: '', // 插件名称,需要唯一
      init() {
        // 插件初始化执行一次,此处只有启用该插件才会执行
      },
      onNewAegis(aegis: Core) {
        // 每次new一个实例时执行,此处只有启用该插件才会执行
      },
    });
    

    插件提供额外方法

    提供遍历所有实例方法

    this.$walk((aegis: core) => {
        // your code
    })