@blueking/notice-component

蓝鲸消息通知业务组件
28,505
Install
npm install @blueking/notice-component
Latest Version:2.0.8
Vue:3
License:MIT
Last Updated:Jun 1, 2026
Links: npm
Maintainer: blueking-magicbox

notice-component

蓝鲸消息通知业务组件-vue3版本, 公告分为跑马灯公告跟dialog公告两种

Install

npm install @blueking/notice-component

如果先前安装过1.x.x版本, 请升级到^2.0.0以上版本

Usage

<script setup>
  import NoticeComponent from '@blueking/notice-component'
  import '@blueking/notice-component/dist/style.css'

  import { ref } from 'vue'
  
  // 可以写接口url的绝对路径或相对路径, 相对路径的话注意社区版时平台以子路径部署的情况
  const apiUrl = '/xxxxxx/sdk/announments'

  // 是否含有跑马灯类型公告, 如果有跑马灯, navigation的高度可能需要减去40px, 避免页面出现滚动条
  const showAlert = ref(false)

  // 公告列表change事件回调, isShow代表是否含有跑马灯类型公告
  const showAlertChange= function (isShow) {
    showAlert.value = isShow
  }
</script>

<template>
  <!-- 跑马灯需要位于最顶部, 所以使用此组件时放在navigation上方 -->
  <notice-component :api-url="apiUrl" @show-alert-change="showAlertChange" />
  <!-- 如果有跑马灯, navigation的高度可能需要减去40px, 避免页面出现滚动条, 可使用上述showAlert判断 -->
  <bk-navigation>
    xxxxxxx
  </bk-navigation>
</template>

Related Packages

@blueking/table

蓝鲸 Table

8,037
@blueking/functional-dependency

蓝鲸通用功能依赖展示

6,698
@blueking/bkflow-canvas-editor-vue2

Vue 2.7 适配层,在 Vue 2 项目中使用 @blueking/bkflow-canvas-editor(内置 Vue 3...

6,227

Version History

Version Released License
2.0.8 MIT
2.0.7 MIT
2.0.6
2.0.5
2.0.4
Pre-releases (14)
Version Released License
2.0.6-beta.1
2.0.5-beta.1
2.0.2-beta.2
2.0.2-bate.2
2.0.2-bate.1