mirror of https://github.com/halo-dev/halo-admin
252e3f1392
#### What type of PR is this? /kind feature /milestone 2.0 #### What this PR does / why we need it: 添加 Toast 组件。 特性: 1. 支持相同消息合并。 2. 支持鼠标悬停。 使用方式: ```vue import { Toast } from '@halo-dev/components' Toast.success("Hello", { //props }) Toast.info("Hello", { //props }) Toast.warning("Hello", { //props }) Toast.error("Hello", { //props }) ``` props: ```ts export interface ToastProps { type?: Type; content?: string; duration?: number; closable?: boolean; frozenOnHover?: boolean; count?: 0; onClose?: () => void; } ``` Toast 方法不仅可以在 Vue 单组件中使用,理论上在任何地方均可使用。 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/2534 #### Screenshots: <img width="752" alt="image" src="https://user-images.githubusercontent.com/21301288/196099183-09e64daf-0077-4373-9603-5d4349dfce3d.png"> #### Special notes for your reviewer: /cc @halo-dev/sig-halo-console 测试方式: https://halo-admin-ui-git-fork-ruibaby-feat-toast-component-halo-dev.vercel.app/story/src-components-toast-toast-story-vue?variantId=_default 测试功能是否正常。 #### Does this PR introduce a user-facing change? ```release-note 添加 Toast 组件 ``` |
||
---|---|---|
.changeset | ||
.github | ||
.husky | ||
.vscode | ||
cypress | ||
packages | ||
public | ||
src | ||
.dockerignore | ||
.editorconfig | ||
.env.development | ||
.env.production | ||
.eslintrc.cjs | ||
.gitignore | ||
.gitpod.yml | ||
.npmignore | ||
.npmrc | ||
Dockerfile | ||
LICENSE | ||
Makefile | ||
OWNERS | ||
README.md | ||
cypress.json | ||
env.d.ts | ||
index.html | ||
package.json | ||
pnpm-lock.yaml | ||
pnpm-workspace.yaml | ||
postcss.config.js | ||
prettier.config.js | ||
tailwind.config.js | ||
tsconfig.app.json | ||
tsconfig.json | ||
tsconfig.vite-config.json | ||
tsconfig.vitest.json | ||
vite.config.ts | ||
vitest.config.ts |
README.md
README
Halo 2.0 的管理端项目(原 halo-admin)
注意
当前分支为 Halo 2.0 的 Console 端开发分支,目前 Halo 2.0 处于 Alpha 测试阶段,不建议从 1.5 直接升级,也不建议在生产环境使用。Console 端稳定版本(Halo 1.5)请查阅以下地址:
- 1.5 分支:https://github.com/halo-dev/console/tree/release-1.5
- 1.6 分支:https://github.com/halo-dev/console/tree/release-1.6
当前仓库已经将
halo-admin
改为了console
。但对于 Halo 1.x 版本,依旧保持 halo-admin 的概念。
开发环境运行
# pnpm@7.0.0+
npm install -g pnpm
pnpm install
pnpm build:packages
pnpm dev
生产构建
pnpm build