Skip to content
On this page

button

基本使用

vue
<template>
  <kn-button>点击</kn-button>
</template>

<script setup lang="ts">
import { KnButton } from 'knot-vue'
</script>

按钮类型

vue
<template>
  <kn-button>点击</kn-button>
  <kn-button type="dashed">点击</kn-button>
  <kn-button type="text">点击</kn-button>
  <kn-button type="primary">点击</kn-button>
  <kn-button type="success">点击</kn-button>
  <kn-button type="warning">点击</kn-button>
  <kn-button type="danger">点击</kn-button>
</template>

<script setup lang="ts">
import { KnButton } from 'knot-vue'
</script>

禁用

vue
<template>
  <kn-button disabled>点击</kn-button>
</template>

<script setup lang="ts">
import { KnButton } from 'knot-vue'
</script>

API

属性名描述类型是否必填默认值
children按钮内容stringtrue--
width宽度numberfalse74
height高度numberfalse34
type按钮类型stringfalsedefault
disabled是否禁用booleanfalsefalse

event

事件名描述类型
@click按钮点击事件()=>void

Released under the MIT License.