
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
youyu-button
Advanced tools
一个基于 Vue 3 的自定义按钮组件插件,提供丰富的样式和配置选项。
# 使用 npm
npm install youyu-button
# 使用 yarn
yarn add youyu-button
# 使用 pnpm
pnpm add youyu-button
// main.ts
import { createApp } from "vue";
import YouyuButtonPlugin from "youyu-button";
import "youyu-button/dist/main.css";
const app = createApp(App);
app.use(YouyuButtonPlugin);
app.mount("#app");
<script setup lang="ts">
import { YouyuButton } from "youyu-button";
import "youyu-button/dist/main.css";
</script>
<template>
<YouyuButton type="primary">主要按钮</YouyuButton>
</template>
| 属性名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| type | string | default | 按钮类型:default, primary, secondary, success, warning, danger, info |
| size | string | M | 按钮尺寸:MINI, S, M, L, XL |
| rounded | boolean | false | 是否显示圆角 |
| active | boolean | false | 是否激活状态 |
| disabled | boolean | false | 是否禁用状态 |
| className | string | 自定义类名 |
| 事件名 | 说明 | 参数 |
|---|---|---|
| click | 点击事件 | MouseEvent |
<YouyuButton type="default">默认按钮</YouyuButton>
<YouyuButton type="primary">主要按钮</YouyuButton>
<YouyuButton type="success">成功按钮</YouyuButton>
<YouyuButton type="warning">警告按钮</YouyuButton>
<YouyuButton type="danger">危险按钮</YouyuButton>
<YouyuButton type="primary" size="MINI">迷你按钮</YouyuButton>
<YouyuButton type="primary" size="S">小按钮</YouyuButton>
<YouyuButton type="primary" size="M">中按钮</YouyuButton>
<YouyuButton type="primary" size="L">大按钮</YouyuButton>
<YouyuButton type="primary" size="XL">特大按钮</YouyuButton>
<YouyuButton type="primary" rounded>圆角按钮</YouyuButton>
<YouyuButton type="primary" active>激活按钮</YouyuButton>
<YouyuButton type="primary" disabled>禁用按钮</YouyuButton>
<YouyuButton type="primary" className="custom-button">自定义按钮</YouyuButton>
pnpm install
pnpm dev
pnpm build
MIT
FAQs
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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.