<template>
    <view class="cps-cont-wrap">
        <view class="title">
            <view v-if="title" class="title-text c-font-large">{{ title }}</view>
            <view v-if="subTitle" class="title-sub c-font-13 c-color-gray">{{ subTitle }}</view>
        </view>
        <slot></slot>
    </view>
</template>

<script>
/**
* @file cps模块
* @author zhangqian51
* @categories 业务组件
* @tags [component]
*/

export default {
    config: {
        component: true
    },
    options: {
        addGlobalClass: true
    },
    components: {
    },
    props: {
        // 标题
        title: {
            type: String,
            required: true
        },
        // 二级标题
        subTitle: {
            type: String
        }
    },
    data() {
        const isSwan = process.env.MARS_ENV === 'swan';
        return {
            isSwan
        };
    },
    methods: {}
};
</script>

<style lang="less" scoped>
.cps {
    &-cont-wrap {
        margin: 10px 10px 0;
        border-radius: 10px;
        background: #fff;
        padding: 10px 15px;
        .title {
            display: flex;
            justify-content: space-between;
            &-text {
                font-family: PingFangSC-Medium;
            }
        }
    }
}
</style>
