Merge pull request #126 from QingWei-Li/next

Button: add nativeType attribute
This commit is contained in:
baiyaaaaa 2016-08-31 13:32:28 +08:00 committed by GitHub
commit aaf9999b90
2 changed files with 6 additions and 0 deletions

View File

@ -138,3 +138,4 @@ Button 组件提供除了默认值以外的三种尺寸,可以在不同场景
| plain | 是否朴素按钮 | Boolean | true,false | false |
| disabled | 禁用 | boolean | true, false | false |
| icon | 图标,已有的图标库中的图标名 | string | | |
| native-type | 原生 type 属性 | string | button,submit,reset | button |

View File

@ -1,5 +1,6 @@
<template>
<button :disabled="disabled" class="el-button"
:type="nativeType"
:class="[
type ? 'el-button-' + type : '',
size ? 'el-button-' + size : '',
@ -32,6 +33,10 @@
type: String,
default: ''
},
nativeType: {
type: String,
default: 'button'
},
loading: {
type: Boolean,
default: false