Skip to content

KLButton

考拉按钮组件

效果

Remove event
vue
<template>
  <div class="buttons flex-vertical flex-wrap mb20">
    <KLButton content="content" />
    <KLButton content="icon" name="start" />
    <KLButton content="wh-200-30" :width="200" :height="30" />
    <KLButton content="warn" warn />
    <KLButton content="large" large />
    <KLButton content="highlight" highlight />
    <KLButton content="current" current />
    <KLButton content="disabled" disabled />
    <KLButton content="canRemove" canRemove @remove="remove" />
    <KLButton content="slot">
      <template #icon>
        <KLIcon name="koutu" size="20px" />
      </template>
    </KLButton>
  </div>
  <div>{{ removeRecord }}</div>
</template>

Attributes

属性说明类型默认值
content按钮内容string-
name图标class名:kl-${name}string-
widthstring|number-
heightstring|number-
warnwarn类型按钮booleanfalse
largelarge类型按钮booleanfalse
highlight高亮booleanfalse
current当前按钮booleanfalse
disabled禁用booleanfalse
canRemove尾部是否有删除图标booleanfalse

slot

插槽名说明
icon图标

事件

事件名参数说明
remove-只可当canRemove为true时使用