app-caption.vue 653 字节
Newer Older
1
<template>
2
    <div :class="`app-caption app-caption--${openType.toLowerCase()}`">{{caption}}</div>
3 4 5 6 7 8 9 10
</template>
<script lang='ts'>
import { Vue, Component, Prop } from 'vue-property-decorator';

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

    /**
11
     * 视图标题
12 13
     * 
     * @type {string}
14
     * @memberof AppCaption
15 16
     */
    @Prop() public caption?: string;
17 18 19 20 21 22 23 24

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