
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
rt-chat-header
Advanced tools
一个基于 Vue 3 的聊天应用顶部导航组件,专为移动端 H5 聊天场景设计。提供侧边栏切换、标题展示、深色模式支持以及灵活的右侧操作区插槽。
actions 插槽,方便集成“模式切换”、“更多菜单”等功能。npm install rt-chat-header
# 或
yarn add rt-chat-header
<template>
<div>
<!-- 顶部导航 -->
<ChatHeader
title="荣小宝"
:is-dark="isDark"
@toggle-sidebar="handleToggleSidebar"
>
<!-- 右侧插槽:例如放置一个模式切换按钮 -->
<template #actions>
<button @click="switchMode">切换模式</button>
</template>
</ChatHeader>
<div class="content">
<!-- 页面主体内容 -->
</div>
</div>
</template>
<script setup>
import { ref } from "vue";
import { ChatHeader } from "rt-chat-header";
import "rt-chat-header/style.css"; // 务必引入样式
const isDark = ref(false);
const handleToggleSidebar = () => {
console.log("切换侧边栏");
};
const switchMode = () => {
console.log("切换模式");
};
</script>
| 属性名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
title | string | "" | 导航栏标题文本 |
isDark | boolean | false | 是否为深色模式(影响背景毛玻璃、文字颜色和边框) |
| 事件名 | 参数 | 说明 |
|---|---|---|
toggle-sidebar | - | 点击左侧菜单按钮时触发 |
| 插槽名 | 说明 |
|---|---|
actions | 导航栏右侧区域,用于放置自定义按钮或组件 |
组件使用了 Tailwind CSS 风格的样式类,并预置了毛玻璃效果。
3rem (12),如有需要可通过覆盖 CSS 修改。z-index: 30,确保悬浮在内容之上。MIT
FAQs
Chat Header component for RongXiaoBao
We found that rt-chat-header demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.