--- name: message-notification-components overview: 在 fms-vue 组件库新增 Message(轻提示)与 Notification(通知)两套组件,提供命令式全局 API(Message.success/error/...、Notification.open/close/closeAll)并保留可声明式使用的组件,遵循现有组件库规范(scoped SCSS + index.scss 变量、lucide 图标、Teleport/Transition 复用),最后在 App.vue 加演示入口并用 Playwright(端口 5082)实测。 design: architecture: framework: vue component: shadcn styleKeywords: - 简洁卡片 - 轻提示 - 右上角通知 - 柔和阴影 - 类型配色 - 平滑过渡 fontSystem: fontFamily: PingFang SC heading: size: 20px weight: 600 subheading: size: 15px weight: 500 body: size: 14px weight: 400 colorSystem: primary: - "#2563EB" - "#16A34A" - "#D97706" - "#DC2626" background: - "#FFFFFF" - "#F8FAFC" text: - "#1E293B" - "#64748B" functional: - "#16A34A" - "#DC2626" - "#D97706" - "#2563EB" todos: - id: explore-export content: 用 [subagent:code-explorer] 确认 ui 导出方式与 App.vue 演示结构 status: completed - id: build-message content: 实现 message.vue、message-manager.js、index.scss status: completed dependencies: - explore-export - id: build-notification content: 实现 notification.vue、notification-manager.js、index.scss status: completed dependencies: - explore-export - id: app-demo content: 在 App.vue 新增 Message/Notification 演示区块 status: completed dependencies: - build-message - build-notification - id: verify-playwright content: 用 [skill:playwright-cli] 在 5082 端口验证显示/消失/关闭/堆叠 status: completed dependencies: - app-demo - id: lint-check content: 运行 oxlint 确认新增文件无错误 status: completed dependencies: - app-demo --- ## 用户需求 在 fms-vue 组件库中新增 Message(轻提示)与 Notification(通知)两套组件,采用命令式 API 为主、声明式组件为辅的设计。 ## 产品概述 - Message:页面顶部居中的轻量级反馈提示,用于操作结果反馈,自动消失,不打断用户操作。 - Notification:页面右上角的通知卡片,用于承载较丰富的信息(标题 + 描述),支持手动关闭与自动消失。 - 两者均支持全局命令式调用(Message.success / Notification.open),同时保留 `` / `` 组件供声明式使用。 ## 核心功能 - 命令式入口:Message.success/error/warning/info(content, options);Notification.open(options);均返回可关闭的实例句柄。 - 消息类型:info / success / warning / error 四种,复用 lucide 图标与现有主题 CSS 变量配色。 - 自动关闭:Message 默认 3000ms,Notification 默认 4500ms;duration 为 0 时不自动关闭。 - 手动关闭:Notification 提供关闭按钮;Message 在 hover 时可常驻并提供关闭按钮(可选)。 - 堆叠与重排:多条消息纵向堆叠(Message 顶部居中、Notification 右上角),关闭后后续项平滑上移。 - App.vue 演示区块:提供按钮触发各类型,便于人工与 Playwright 验证。 - 严格遵循现有项目规范(scoped SCSS + @use 模式、无 placeholder 逻辑、复用 Teleport/Transition 模式)。 ## 技术栈选择 - 框架:Vue 3(SFC + `