mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-02 12:18:46 +08:00
Button: add nativeType attribute
This commit is contained in:
parent
69655b734e
commit
4e78b73396
@ -138,3 +138,4 @@ Button 组件提供除了默认值以外的三种尺寸,可以在不同场景
|
|||||||
| plain | 是否朴素按钮 | Boolean | true,false | false |
|
| plain | 是否朴素按钮 | Boolean | true,false | false |
|
||||||
| disabled | 禁用 | boolean | true, false | false |
|
| disabled | 禁用 | boolean | true, false | false |
|
||||||
| icon | 图标,已有的图标库中的图标名 | string | | |
|
| icon | 图标,已有的图标库中的图标名 | string | | |
|
||||||
|
| native-type | 原生 type 属性 | string | button,submit,reset | button |
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<button :disabled="disabled" class="el-button"
|
<button :disabled="disabled" class="el-button"
|
||||||
|
:type="nativeType"
|
||||||
:class="[
|
:class="[
|
||||||
type ? 'el-button-' + type : '',
|
type ? 'el-button-' + type : '',
|
||||||
size ? 'el-button-' + size : '',
|
size ? 'el-button-' + size : '',
|
||||||
@ -32,6 +33,10 @@
|
|||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
nativeType: {
|
||||||
|
type: String,
|
||||||
|
default: 'button'
|
||||||
|
},
|
||||||
loading: {
|
loading: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
Loading…
Reference in New Issue
Block a user