Skip to content
On this page

按钮 Button

默认尺寸

Extra small Button
默认按钮
html
<j-button size="so-small" type="primary">Extra small Button</j-button>
<j-button>默认按钮</j-button>

小尺寸

主题按钮
默认按钮
html
<j-button :size="'small'" type="primary">主题按钮</j-button>
<j-button :size="'small'">默认按钮</j-button>

大尺寸


主题按钮
默认按钮
html
<j-button :size="'large'" type="primary">主题按钮</j-button>
<j-button :size="'large'">默认按钮</j-button>

按钮状态


主要按钮
默认按钮
警告按钮
信息按钮
错误按钮
成功按钮
禁用按钮
html
<j-button type="primary">主要按钮</j-button>
<j-button>默认按钮</j-button>
<j-button type="warn">警告按钮</j-button>
<j-button type="info">信息按钮</j-button>
<j-button type="err">错误按钮</j-button>
<j-button type="success">成功按钮</j-button>
<j-button disabled type="success">禁用按钮</j-button>

按钮图标 IconButton

属性 iconBtn 设置为 true 将开启图标按钮模式

html
<j-button :icon="'icon-delete'" :size="'so-small'" icon-btn> </j-button>
<j-button :icon="'icon-add'" :size="'small'" icon-btn type="primary">
</j-button>
<j-button :icon="'icon-ascending'" icon-btn type="warn"> </j-button>
<j-button :icon="'icon-atm'" :size="'large'" icon-btn :type="'success'">
</j-button>

通过icon插槽

通过 slot icon 可以自定义插入图标

ATM-FILL
ATM-FILL
html
<j-button :type="'success'">
  ATM-FILL
  <template #icon> <j-icon :icon="'icon-atm-fill'" /> </template>
</j-button>
<j-button :size="'large'" :type="'warn'">
  ATM-FILL
  <template #icon> <j-icon :icon="'icon-close'" /> </template>
</j-button>

源代码

jayden-ui > button