npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@leatop/alarm-helper-cloud

v0.2.53

Published

A Vue 3 component library for alarm management in cloud.

Readme

写在前面的话

:warning: 此库只适用于Vue3 + 云端项目集成:exclamation::exclamation::exclamation:

➡️ 路段版请使用 告警中心小助手

集成文档

1.安装依赖(建议使用 pnpm 下载)
# 安装 pnpm
npm install pnpm -g

# 安装依赖
pnpm i @leatop/alarm-helper-cloud

2.添加配置文件

//public/config/config.js:

//全局配置项
;(function (window) {
  window.globalConfig = {
    // 添加以下配置
    AlarmCenterWsUrl: `128.23.13.125:28082`, // 接警响应Socket地址
    AlarmRobotApiContext: '/api/', //告警弹窗接口前缀
    AlarmWebPath: '接警响应前端首页', // 接警响应前端首页
    LinkedControlUrl: 'http:128.x.x.x', //联动管控地址配置 注:/#/前面的地址

  }
})(window)

配置说明: | 参数 | 说明 | 类型 | 是否必要 | 默认值 | | :----|:----| :----: |:----: |:----: | | AlarmCenterWsUrl | 接警响应Socket地址 eg:127.0.0.1:9527 | String | 是 | - | | AlarmRobotApiContext | 告警弹窗接口前缀,需要拦截该前缀转发到对应后端地址 eg:/api/| String | 是 | - | | AlarmWebPath | 接警响应首页地址(外部系统集成需要配置,配置该项会新开页签并跳转) eg:http://localhost:9527/| String | 否 | - | | LinkedControlUrl(v0.2.23+) | 联动管控地址配置 | String | 否 | - |

3.组件引入:

  • 使用组件的地方
<script setup lang="ts">
  // 引入组件
import '@leatop/alarm-helper-cloud/dist/index.css'
import AlarmHelpCloud, { type UserInfo } from "@leatop/alarm-helper-cloud";

// userId
const userInf = computed(() => {
  return { userId: userStore.user.userId } as any as UserInfo;
});
// token
const tokenId = computed(() => {
  return userStore.token as string;
});
// 是否是超级管理员
const isSuperRole = computed(() => {
  return Number(userStore.user?.roleType) === 3;
});
</script>

<template>
  <div class="cdp-base-container">
    <!-- 使用组件 -->
    <AlarmHelpCloud :user-info="userInfo" :token-id="tokenId" :isSuperRole="isSuperRole"/>
  </div>
</template>
  • 组件属性说明:

| 属性名 | 说明 | 类型 | 是否必要 | 默认值 | 备注 | | :------- | :----------- | :--------------------: | :-------------------------------------: | :----------------------------------: | :--------------------------------: | | userInfo | 用户信息对象 | {userId:string} | 是 | - | - | | tokenId | 登录的token | string | 是 | - | v0.2.17+ 新增 | | isSuperRole | 是否超管角色 | boolean | 是 | - | v0.2.37+ 新增 |

  • 组件事件说明:

| 事件名 | 说明 | 回调参数 | 备注 | | :--------- | :----------- | :-----------: | :-------------: | | onApiError | 接口异常触发 | AlarmApiError | v0.2.12+ 新增 |

4.集成效果: