<template>
    <view
        class="privacy"
        :style="{
            'background-color': bgColor,
        }"
    >
        <!-- icon区域 -->
        <view class="privacy__icon"/>
        <!-- 提示内容 -->
        <view
            class="privacy__cont"
            :style="{
                'color': textColor,
            }"
        >
            {{ tip }}
        </view>
    </view>
</template>

<script>
/**
 * @file 隐私提示
 * @displayName PrivacyTip 隐私提示
 * @author shizhongwei02
 * @categories component
 * @tags [component]
 */

export default {
    config: {
        component: true
    },
    props: {
        /**
         * 提示内容
         */
        tip: {
            type: String,
            default: '病案内容仅供参考，不能作为诊断治疗的依据，如有需要请及时线下就医，实际诊断请以线下就医为准。'
        },

        /**
         * 提示背景
         */
        bgColor: {
            type: String,
            default: '#ffffff'
        },

        /**
         * 文字颜色
         */
        textColor: {
            type: String,
            default: '#999999'
        }
    }
};
</script>

<style lang="less" scoped>
.privacy {
    display: flex;
    padding: 8px 13px;
    border-radius: 8px;
    background: rgba(#000, #000, #000, .03);

    &__icon {
        background-image: url(https://med-fe.cdn.bcebos.com/plm/tipIcon.png?x-bce-process=image/auto-orient,o_1/resize,w_103,limit_1/quality,Q_85);
        background-size: cover;
        background-repeat: no-repeat;
        width: 15px;
        height: 15px;
        margin-top: 5px;
        margin-right: 6px;
    }

    &__cont {
        font-family: PingFang-SC-Regular;
        font-size: 13px;
        flex: 1;
    }
}
</style>
