@heimdallr-sdk/vue
TypeScript icon, indicating that this package has built-in type declarations

0.0.22 • Public • Published

@heimdallr-sdk/vue

English

捕获 vue 框架抛出的错误

Options

配置名称 类型 描述 默认值 可选值
vue Object vue 实例 - -

Usage

cdn

<script src="[vue-dist]/vue.iife.js"></script>
<script>
    window.__HEIMDALLR_OPTIONS__ = {
        dsn: {
            host: 'localhost:8888',
            init: '/project/init',
            upload: '/log/upload'
        },
        app: {
            name: 'playgroundAPP',
            leader: 'test',
            desc: 'test proj'
        },
        plugins: [
            HEIMDALLR_VUE({
                vue: VueInstance
            }),
        ],
    };
</script>
<script async src="/browser-dist/browser.iife.js"></script>

npm

Vue2.x

import Vue from "vue";
import heimdallr from "@heimdallr-sdk/browser";
import vuePlugin from "@heimdallr-sdk/vue";
heimdallr({
  dsn: {
    host: "localhost:8888",
    init: "/project/init",
    upload: "/log/upload",
  },
  app: {
    name: "playgroundAPP",
    leader: "test",
    desc: "test proj",
  },
  plugins: [
    vuePlugin({
      vue: Vue,
    }),
  ],
});

Vue3.x

import heimdallr from "@heimdallr-sdk/browser";
import vuePlugin from "@heimdallr-sdk/vue";
import { createApp } from 'vue'
import App from './App.vue'

const app = createApp(App)

heimdallr({
  dsn: {
    host: "localhost:8888",
    init: "/project/init",
    upload: "/log/upload",
  },
  app: {
    name: "playgroundAPP",
    leader: "test",
    desc: "test proj",
  },
  plugins: [
    vuePlugin({
      vue: app,
    }),
  ],
});

Package Sidebar

Install

npm i @heimdallr-sdk/vue

Weekly Downloads

9

Version

0.0.22

License

MIT

Unpacked Size

14.2 kB

Total Files

7

Last publish

Collaborators

  • h_lianfa