0.1.1 • Published 4 years ago

shcce-ui v0.1.1

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

sh-ui

依赖安装 npm install
查看demo npm run serve
组件库打包 npm run prod

按钮 sh-button

Attributes说明类型可选值默认值
size按钮尺寸stringlarge、medium、small、minimedium
type按钮类型stringdefault、error、warn、successdefault
round是否为按钮boolean-false
gradient是否为渐变按钮boolean-false
transparent是否为透明按钮boolean-false
disabled是否禁用boolean-false
htmlType按钮类型stringbutton、submit、resetbutton
to链接,存在此属性时按钮变为a标签string--
Events说明回调参数
click点击事件event

通知弹框 $confirm、$toast、$loading

$confirm |Attributes|说明|类型|可选值|默认值| |----------|---|---|---|---| |title|标题|string|-|-| |template|内容模板|string|-|''| |image|图片地址|string|-|-| |onlyEnsure|是否只有确认按钮|boolean|-|false| |ensureBtnText|确认按钮的文本|string|-|'确认'| |cancelBtnText|取消按钮的文本|string|-|'取消'| |ensure|确认按钮点击回调|function|-|function(close) { close(); }| |cancel|取消按钮点击回调|function|-|function(close) { close(); }|

tips:如果配置ensure和cancel方法,需要调用close函数关闭弹框

$toast |Attributes|说明|类型|可选值|默认值| |----------|---|---|---|---| |content|提示内容|string|-|''| |duration|提示消失延迟毫秒数|number|-|1500| |type|提示类型|string|default、success、fail|default| |close|toast关闭回调|function|-|function() {}|

$loading |Attributes|说明|类型|可选值|默认值| |----------|---|---|---|---| |content|提示内容|string|-|'加载中...'|

页头标签 sh-header

Attributes说明类型可选值默认值
title标题string/array-''{ label: '', name: '' }
value/v-model当前激活的标题名string--
isCancel是否用"取消"替代返回图标boolean-false
Slot说明
-页头右端的内容

开关 sh-switch

Attributes说明类型可选值默认值
value/v-model绑定值string/number/boolean--
openValueswitch打开时的值string/number/boolean-true
closeValueswitch关闭时的值string/number/boolean-false
disabled是否禁用开关boolean-false
activeColorswitch打开时的背景色string--
inActiveColorswitch关闭时的背景色string--
Events说明回调参数
changeswitch绑定值改变事件改变后的switch值

单选框 sh-radio sh-radio-group

Radio Attributes说明类型可选值默认值
value/v-model绑定值string/number/boolean-false
labelradio的valuestring/number--
trueValueradio选中时的值string/number/boolean-true
falseValueradio未选中时的值string/number/boolean-false
disabled是否禁用boolean-false
Radio Events说明回调参数
changeradio绑定值改变事件改变后的radio值
Radio Slot说明
-Radio标签中的内容
Radio-group Attributes说明类型可选值默认值
value/v-model绑定值string/number/boolean-false
name原生name属性string--
disabled是否禁用boolean-false
Radio-group Events说明回调参数
changeradio-group绑定值改变事件改变后的radio-group值

多选框 sh-checkbox sh-checkbox-group

Checkbox Attributes说明类型可选值默认值
value/v-model绑定值string/number/boolean-false
labelcheckbox的valuestring/number--
trueValuecheckbox选中时的值string/number/boolean-true
falseValuecheckbox未选中时的值string/number/boolean-false
disabled是否禁用boolean-false
Checkbox Events说明回调参数
changecheckbox绑定值改变事件改变后的checkbox值
Checkbox Slot说明
-Checkbox标签中的内容
Check-group Attributes说明类型可选值默认值
value/v-model绑定值array-[]
name原生name属性string--
disabled是否禁用boolean-false
Check-group Events说明回调参数
changecheckbox-group绑定值改变事件改变后的checkbox-group值

标签页 sh-tabs sh-tab-pane

Tabs Attributes说明类型可选值默认值
value/v-modeltabs绑定值string/number--
type标签页类型stringdefault、buttondefault
Tabs Events说明回调参数
changetabs绑定值改变事件改变后的tabs值
Tab-pane Attributes说明类型可选值默认值
label选项卡标题string--
name与选项卡绑定值value对应的标识符string-随机字符串

未完待续...