# jay-ui(Vue UI组件库) **Repository Path**: Jay_Ohhh/jay-ui ## Basic Information - **Project Name**: jay-ui(Vue UI组件库) - **Description**: 将组件打包制作成组件库 基于Vue2.x - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2020-07-07 - **Last Updated**: 2022-08-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 效果演示 - 初始化vue项目 vue create demo - 安装组件库 yarn add heima-ui - 全局导入 import HeimaUI from 'heima-ui' import 'heima-ui/lib/heimui.css' Vue.use(HeimaUI) - 使用组件 常见组件封装 项目初始化 使用vue-cli脚手架快速搭建一个vue项目 // 选择scss babel 和 eslint vue create itcast-ui 启动项目 cd itcast-ui yarn serve button组件 前置知识 组件通讯 组件插槽 props校验 参数支持 参数名 参数描述 参数类型 默认值 type 按钮类型(primary / success / warning / danger / info) string default plain 是否是朴素按钮 boolean false round 是否是圆角按钮 boolean false circle 是否是圆形按钮 boolean false disabled 是否禁用按钮 boolean false icon 图标类名 string 无 事件支持 事件名 事件描述 click 点击事件 基本结构 样式 .hm-button { display: inline-block; line-height: 1; white-space: nowrap; cursor: pointer; background: #fff; border: 1px solid #dcdfe6; color: #606266; -webkit-appearance: none; text-align: center; box-sizing: border-box; outline: none; margin: 0; transition: 0.1s; font-weight: 500; // 禁止元素的文字被选中 -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; padding: 12px 20px; font-size: 14px; border-radius: 4px; &:hover, &:focus { color: #409eff; border-color: #c6e2ff; background-color: #ecf5ff; } } type属性 结构