0.1.2 • Published 5 years ago

@weue/button v0.1.2

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Button 按钮

引入

代码演示

按钮类型

支持 defaultprimarywarn 三种类型,默认为 default

<we-button type="default">默认按钮</we-button>
<we-button type="primary">主要按钮</we-button>
<we-button type="warn">警告按钮</we-button>

禁用状态

通过disabled属性来禁用按钮,此时按钮不可点击

<we-button disabled>禁用状态</we-button>
<we-button disabled type="warn">禁用状态</we-button>

加载状态

<we-button type="primary" loading>加载中...</we-button>

迷你尺寸

<we-button type="primary" mini>迷你</we-button>

整行填充

<we-button type="primary" block>整行填充</we-button>

朴素按钮

通过 plain 属性将按钮设置为朴素按钮,朴素按钮的文字为按钮颜色,背景为白色

<we-button type="default" plain>默认按钮</we-button>
<we-button type="primary" plain>主要按钮</we-button>

事件

事件名说明参数
bind:click点击按钮,且按钮状态不为加载或禁用时触发-