mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
[Improvement] Button: add text prop (#563)
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
:color="type === 'default' ? 'black' : 'white'"
|
||||
/>
|
||||
<span class="van-button__text">
|
||||
<slot />
|
||||
<slot>{{ text }}</slot>
|
||||
</span>
|
||||
</component>
|
||||
</template>
|
||||
@@ -35,6 +35,7 @@ export default create({
|
||||
name: 'van-button',
|
||||
|
||||
props: {
|
||||
text: String,
|
||||
block: Boolean,
|
||||
loading: Boolean,
|
||||
disabled: Boolean,
|
||||
|
@@ -50,14 +50,11 @@ export default create({
|
||||
callback: Function,
|
||||
confirmButtonText: String,
|
||||
cancelButtonText: String,
|
||||
showCancelButton: Boolean,
|
||||
showConfirmButton: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showCancelButton: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
overlay: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
|
Reference in New Issue
Block a user