mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-20 03:41:23 +00:00
add button type to allow submit buttons
This commit is contained in:
parent
63549d987e
commit
d6560438e5
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<button :class="buttonClass" :disabled="loading" @click="$emit('click')">
|
||||
<button :type="type" :class="buttonClass" :disabled="loading" @click="$emit('click')">
|
||||
<loading-spinner v-if="loading" />
|
||||
<base-icon v-if="icon" :name="icon" />
|
||||
<slot />
|
||||
@ -40,6 +40,13 @@ export default {
|
||||
return value.match(/(small|regular|large)/)
|
||||
},
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'button',
|
||||
validator(value) {
|
||||
return value.match(/(button|submit)/)
|
||||
},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
buttonClass() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user