vue-components-analyser

1.1.0 • Public • Published

vue-components-analyser

一个可以检测应用中所有 vue 组件生命周期触发时间的工具

使用方法

import vueComponentsAnalyser from 'vue-components-analyser'
Vue.use(vueComponentsAnalyser,{
    url:"http://localhost:3000" // 上传 url
})

配置完 url 会发送一个 post 请求,包含一个对象,性能指标会放在 performance 属性中,项目域名放在 host 属性中,以 koa2 为例

app.use(async ctx => {
  if(ctx.method === 'post'){
  console.log(ctx.request.body.performance) // 性能指标
    console.log(ctx.request.body.host) // 域名}
}
})

/vue-components-analyser/

    Package Sidebar

    Install

    npm i vue-components-analyser

    Weekly Downloads

    1

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    10.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • yeyan1996