0.1.1 • Published 4 years ago

jy-ui-vue v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

jy-ui-vue

JY UI component for Vue.js

Installation

npm install jy-ui-vue

How to use?

import YUI from 'jy-ui-vue'  
Vue.use(YUI)

License

MIT

Example

npm install
npm run serve
localhost:8080

Tooltip

参数说明类型可选值默认值
positionTooltip出现的位置stringtop/bottom/left/right/topLeft/topRight/bottomLeft/bottomRighttop
content显示的内容,也可以通过 slot#content 传入 DOMstring//
theme默认提供的主题stringDark/LightDark
trigger触发方式stringclick/hoverhover

Button

参数说明类型可选值默认值
size尺寸stringlarge/small/mini/
type类型stringprimary/success/warning/danger/dashed/text/
loading是否加载中状态boolean/false
disabled是否禁用状态boolean/false
icon图标类名string//

注:如果在button中使用自己的图标<i></i>需要自行调整图标的margin属性

ButtonGroup

  <y-button-group>
    <y-button icon="search" type="primary"></y-button>
    <y-button icon="search" type="primary"></y-button>
    <y-button icon="search" type="primary"></y-button>
  </y-button-group>

Tabs

Tab

参数说明类型可选值默认值
type标签页的主题stringcardnull
position布局方向stringtop/bottom/left/righttop
editable是否编辑boolean/false

Tab Event

事件名称说明回调参数
tab-add点击tab新增按钮后触发/
tab-selectedtab 被选中时触发被选中的标签 tab 实例
tab-remove点击 tab 移除按钮后触发被删除的标签的 label

TabPane

参数说明类型可选值默认值
label标签页名string//
active默认选中boolean/false
disabled是否禁用boolean/false
icon图标string//

Input

Input Attributes

参数说明类型可选值默认值
type类型stringtext/textareatext
value绑定值string/number//
maxlength原生属性,最大输入长度number//
minlength原生属性,最小输入长度number//
placeholder输入框占位文本string/"请输入内容"
disabled是否禁用boolean/false
size输入框尺寸,只在 type = "text" 时生效stringlarge/medium/smalllarge
prefix输入框头部图标string//
suffix输入框尾部图标string//
name原生属性string//
max原生属性,设置最大值///
min原生属性,设置最小值///
step原生属性,设置输入字段的合法数字间隔///
autofocus原生属性,自动获取焦点booleantrue/falsefalse

Input Slots

name说明
prefix输入框头部内容,只对 type="text" 有效
suffix输入框尾部内容,只对 type="text" 有效
prepend输入框前置内容,只对 type="text" 有效
append输入框后置内容,只对 type="text" 有效

Input Events

事件名称说明回调参数
blur在 Input 失去焦点时触发(event: Event)
focus在 Input 获得焦点时触发(event: Event)
change在 Input 值改变时触发(value: string | number)