按钮(vButton)

单组件引入

import <name> from ‘vucc/button’;

示例


default
outline
error
link/small
primary/disable
primary/large

带图标button:



default




default


代码 V

<v-button>default</v-button>
<v-button type="outline">outline</v-button>
<v-button type="error">error</v-button>
<v-button type="link" size="small" >link/small</v-button>
<v-button type="primary" size="large" @click="buttonClick()">primary/large</v-button>
<v-button type="primary" :is-disabled="true" @click="buttonClick()">primary/disable</v-button>
<!-- 带图标 -->
<h3>带图标button:</h3>
<v-button>
<span>default</span>
<span class="vci vci-down"></span>
</v-button>
<v-button>
<span class="vci vci-down"></span>
<span>default</span>
</v-button>



属性

参数 说明 类型 可选值 默认值
type 按钮组件的类型 string primary/outline/error/link default
size 按钮组件的大小 string normal/large/small normal
isDisabled 按钮是否可以点击 Boolean - false