50 lines
891 B
Vue
50 lines
891 B
Vue
<template>
|
|
<button type="button" class="ui-icon-button" :disabled="disabled" :class="'type-' + type" @click="tryClick" :title="title | localize">
|
|
<span class="sr-only" v-localize="title"></span>
|
|
<i class="ui-button-icon" :class="icon"></i>
|
|
</button>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
export default {
|
|
name: 'uiIconButton',
|
|
|
|
props: {
|
|
state: {
|
|
type: String,
|
|
default: 'default'
|
|
},
|
|
icon: {
|
|
type: String,
|
|
default: 'fth-arrow-left'
|
|
},
|
|
type: {
|
|
type: String,
|
|
default: 'action'
|
|
},
|
|
title: {
|
|
type: String,
|
|
default: '@ui.back'
|
|
},
|
|
disabled: Boolean,
|
|
click: {
|
|
type: Function,
|
|
default: () => { }
|
|
}
|
|
},
|
|
|
|
mounted ()
|
|
{
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
tryClick(ev)
|
|
{
|
|
this.$emit('click', ev);
|
|
}
|
|
}
|
|
}
|
|
</script> |