<template>
    <div :class="`app-caption app-caption--${openType.toLowerCase()}`">{{caption}}</div>
</template>
<script lang='ts'>
import { Vue, Component, Prop } from 'vue-property-decorator';

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

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

    /**
     * 打开方式
     * 
     * @type {'ROUTE' | 'EMBED' | 'MODAL'}
     * @memberof AppCaption
     */
    @Prop({ default: 'ROUTE' }) public openType!: 'ROUTE' | 'EMBED' | 'MODAL';
}
</script>
<style lang="scss">
@import './app-caption.scss';
</style>