<template>
    <view>
        <!-- 规则弹窗 -->
        <c-popup
            row-tile
            show-title-line
            :show="isShow"
            :z-index="'921'"
            :show-close="true"
            :show-close-handler="false"
            max-height="80.3%"
            height="80.3%"
            :title="'体检须知'"
            border-radius="12px"
            close-icon="close-circle"
            class="rule-popup"
            stop-scroll-through
            @close="handlePopupClose"
            @masktap="handlePopupClose"
        >
            <view class="rule__wrap">
                <!-- 规则内容 -->
                <view v-if="data" class="rule__cont">
                    <view v-for="(item, index) in data" :key="index">
                        <view v-if="item.textTitle" class="rule__title">{{ item.textTitle }}</view>
                        <text v-if="item.textDesc">{{ item.textDesc }}</text>
                    </view>
                </view>
            </view>
        </c-popup>
    </view>
</template>

<script>
import CPopup from '@baidu/med-ui/components/Popup/Popup';
/**
 * @file 运营顶部button
 * @author mayifan02
 * @categories 业务组件
 * @tags [component]
 */
export default {
    config: {
        component: true
    },
    options: {
        addGlobalClass: true
    },
    components: {
        CPopup
    },
    data() {
        return {};
    },
    props: {
        /**
         * 是否显示
         */
        isShow: {
            type: Boolean,
            default: false
        },
        /**
         * 数据
         */
        data: {
            type: Array,
            default: () => {
                return [];
            }
        }
    },
    methods: {
        handlePopupClose() {
            /**
             * 弹窗关闭
             */
            this.$emit('handleNoticePopupClose');
        }
    }
};
</script>
<style lang="less" scoped>
.rule {
    &__wrap {
        padding: 0 6.5vw;
        line-height: 21px;
        font-size: 14px;
        color: #666666;
    }
    &__date {
        padding-top: 22px;
        &__title {
            color: #333;
            font-weight: bold;
        }
    }
    &__cont {
        margin-top: 20px;
    }
    &__title {
        font-size: 15px;
        line-height: 22px;
        margin: 10px 0;
        color: #333;
        font-weight: bold;
    }
    &__subTitle {
    }
    &__text {
        margin-bottom: 22px;
    }
}
.img-background {
    background-size: 100% 100%;
    background-position: 0 0;
    background-repeat: no-repeat;
}
</style>
