0.1.1 • Published 3 years ago

duan-ui v0.1.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

duanUI

  • 安装组件库
npm install duan-ui
  • 全局导入
import duanUI from 'duan-ui'
import 'duan-ui/dist/duan-ui.css'

Vue.use(duanUI)
  • 使用组件
前面需要加 duan
例 : <duan-button />

button组件

参数支持

参数名参数描述参数类型默认值
type按钮类型(primary / success / warning / danger / info)stringdefault
plain是否是朴素按钮booleanfalse
round是否是圆角按钮booleanfalse
circle是否是圆形按钮booleanfalse
disabled是否禁用按钮booleanfalse
icon支持图标(edit / star / search / check / message / delete / close /chakan)string
size按钮大小 (medium / small / mini)string

事件支持

事件名事件描述
click点击事件

dialog组件

参数支持

参数名参数描述参数类型默认值
title对话框标题string提示
width宽度string50%
top与顶部的距离string15vh
visible是否显示dialog(支持sync修饰符)booleanfalse

事件支持

事件名事件描述
opened模态框显示的事件
closed模态框关闭的事件

插槽说明

插槽名称插槽描述
defaultdialog的内容
titledialog的标题
footerdialog的底部操作区

input组件

参数支持

参数名称参数描述参数类型默认值
placeholder占位符string
type文本框类型(text/password)stringtext
disabled禁用booleanfalse
clearable是否显示清空按钮booleanfalse
show-password是否显示密码切换按钮booleanfalse
namename属性string

事件支持

事件名称事件描述
blur失去焦点事件
change内容改变事件
focus获取的焦点事件

switch组件

参数支持

参数名称参数描述参数类型默认值
v-model双向绑定布尔类型false
namename属性stringtext
activeColor自定义的激活的颜色string
inactiveColor自定义的不激活的颜色string

事件支持

事件名称事件描述
changechange时触发的事件

radio组件 / checkbox组件

参数支持

参数名称参数描述参数类型默认值
v-model双向绑定布尔类型false
label单选框的value值string,num,boolean''
namename属性string

radio-group组件 / checkbox-group组件

使用radio组件的缺点,需要给每个组件都绑定v-mode,可以使用radio-group包裹

form组件 / form-item组件

form组件用来管理表单组件,配合form-item组件使用