app-panel-button.vue 1.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
<template>
    <div class="app-panel-button">
        <Button type="primary" long @click="onClick">
            <i v-if="icon" :class="icon"></i>
            <span v-if="showCaption" :class="lableStyle">{{caption ? caption : ''}}</span>
        </Button>
    </div>
</template>

<script lang="ts">
import { Vue, Component, Prop, Watch } from "vue-property-decorator";

@Component({})
export default class AppPanelButton extends Vue {

    /**
     * 图标
     *  
     * @type {string}
     * @memberof AppPanelItem
     */
    @Prop() public icon?: string;

    /**
     * 标题
     *  
     * @type {string}
     * @memberof AppPanelItem
     */
    @Prop() public caption?: string;

    /**
     * 显示标题
     *  
     * @type {boolean}
     * @memberof AppPanelItem
     */
    @Prop() public showCaption?: boolean;

    /**
     * 标题样式
     *  
     * @type {boolean}
     * @memberof AppPanelItem
     */
    @Prop() public lableStyle?: string;

    /**
     * 点击按钮
     *
     * @param {*} $event
     * @memberof AppPanelItem
     */
    public onClick($event: any){
        this.$emit('onClick',$event);
    }

}
</script>
<style lang='less'>

</style>