mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-24 17:41:03 +01:00
60 lines
1.2 KiB
Go
60 lines
1.2 KiB
Go
<template>
|
|
<LabelButton
|
|
v-if="buttonType === 'label'"
|
|
:disabled="disabled"
|
|
:icon="icon"
|
|
:label="label"
|
|
:size="size"
|
|
:tooltip="tooltip"
|
|
:type="type"
|
|
@click="onClick"
|
|
/>
|
|
<FaIconButton
|
|
v-else-if="buttonType === 'fa-icon'"
|
|
:disabled="disabled"
|
|
:icon="icon"
|
|
:size="size"
|
|
:tooltip="tooltip"
|
|
:type="type"
|
|
@click="onClick"
|
|
/>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import {defineComponent, PropType} from 'vue';
|
|
import {buttonProps} from '@/components/button/Button.vue';
|
|
import LabelButton from '@/components/button/LabelButton.vue';
|
|
import FaIconButton from '@/components/button/FaIconButton.vue';
|
|
|
|
export default defineComponent({
|
|
name: 'NavActionButton',
|
|
components: {
|
|
LabelButton,
|
|
FaIconButton,
|
|
},
|
|
props: {
|
|
buttonType: {
|
|
type: String as PropType<ButtonType>,
|
|
required: true,
|
|
},
|
|
label: {
|
|
type: String,
|
|
},
|
|
icon: {
|
|
type: [String, Array] as PropType<Icon>
|
|
},
|
|
onClick: {
|
|
type: Function as PropType<() => void>
|
|
},
|
|
...buttonProps,
|
|
},
|
|
setup(props, {emit}) {
|
|
return {};
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
</style>
|