<!--
 * @Description: 
 * @Version: 2.0
 * @Autor: 章造
 * @Date: 2020-06-29 14:33:24
 * @LastEditors: 李璕
 * @LastEditTime: 2020-10-10 14:42:48
--> 
<template>
    <div class="see-character" v-if="isShow">
        <!-- pc -->
        <div v-if="!isMobile" class="pc">
            <div class="text" :key="index" v-for="(character,index) in componentData.group">
                <p class="title">{{character.title}}</p>
                <p v-if="isDesign && !character.title" class="title">标题</p>
                <p class="desc">{{character.desc}}</p>
                <p v-if="isDesign && !character.desc" class="desc">概要说明...</p>
                <div class="btnGroup">
                    <div class="linkCont">
                        <span @click="_mixJumpClick(!isMobile,character.linkUrl)" class="linkText">{{character.linkText}}</span>
                        <span v-if="isDesign && !character.linkText" class="linkText">链接文字</span>
                    </div>
                    <div class="linkCont">
                        <span @click="_mixJumpClick(!isMobile,character.linkUrl2)" class="linkText">{{character.linkText2}}</span>
                        <span v-if="isDesign && !character.linkText2" class="linkText">链接文字</span>
                    </div>
                    <div class="linkCont">
                        <span @click="_mixJumpClick(!isMobile,character.linkUrl3)" class="linkText">{{character.linkText3}}</span>
                        <span v-if="isDesign && !character.linkText3" class="linkText">链接文字</span>
                    </div>
                    <div class="linkCont">
                        <span @click="_mixJumpClick(!isMobile,character.linkUrl4)" class="linkText">{{character.linkText4}}</span>
                        <span v-if="isDesign && !character.linkText4" class="linkText">链接文字</span>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- mobile -->
        <div v-if="isMobile" class="mobile">
            <div class="textMobile" :key="index" v-for="(character,index) in componentData.group">
                <p class="title">{{character.title}}</p>
                <p v-if="isDesign && !character.title" class="title">标题</p>
                <p class="desc">{{character.desc}}</p>
                <p v-if="isDesign && !character.desc" class="desc">概要说明...</p>
                <div class="btnGroup">
                    <div v-if="character.linkText" class="linkCont">
                        <span @click="_mixJumpClick(!isMobile,character.linkUrl)" class="linkText">{{character.linkText}}</span>
                        <span v-if="isDesign && !character.linkText" class="linkText">链接文字</span>
                    </div>
                    <div v-if="character.linkText2" class="linkCont">
                        <span @click="_mixJumpClick(!isMobile,character.linkUrl2)" class="linkText">{{character.linkText2}}</span>
                        <span v-if="isDesign && !character.linkText2" class="linkText">链接文字</span>
                    </div>
                    <div v-if="character.linkText3" class="linkCont">
                        <span @click="_mixJumpClick(!isMobile,character.linkUrl3)" class="linkText">{{character.linkText3}}</span>
                        <span v-if="isDesign && !character.linkText3" class="linkText">链接文字</span>
                    </div>
                    <div v-if="character.linkText4" class="linkCont">
                        <span @click="_mixJumpClick(!isMobile,character.linkUrl4)" class="linkText">{{character.linkText4}}</span>
                        <span v-if="isDesign && !character.linkText4" class="linkText">链接文字</span>
                    </div>
                    <div style="clean:both"></div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import mixins from './button-mixin.js'
import permissionMixin from "./permission-mixin";
export default {
    name: 'see-character',
    mixins : [mixins,permissionMixin],
    props: {
        componentData: {
            required: false,
        },
    },
    data() {
        return {
            
        }
    },
    components: {},
    created() {
    },
    computed: {
        isMobile() {
            return this.componentData.commonVariable.isMobile
        },
        isDesign() {
            return this.componentData.commonVariable.pageType === "design"
        }
    },
    methods: {
    },
}
</script>

<style lang="scss" scoped>
.see-character{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    .pc{
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        .text{
            width: 48%;
            display: inline-block;
            .title{
                // overflow: hidden;
                text-overflow: ellipsis;
                // white-space: nowrap;
                font-weight: bold;
                color: #333;
                font-size: 20px;
                line-height: 24px;
                margin-bottom: 8px;
            }
            .desc{
                line-height: 24px;
                color: #333;
                margin-top: 14px;
                word-break: break-all;
                font-size: 14px;
                color: #666;
                margin-bottom: 8px;
            }
            .btnGroup{
                width: 100%;
                .linkCont{
                    line-height: 28px;
                    display: inline-block;
                    margin-right: 40px;
                    .linkText{
                        font-size: 14px;
                        color: #007AFF;
                        cursor: pointer;
                    }
                    .linkUrl{
                        font-size: 14px;
                        color: #007AFF;
                    }
                }
            }
            
            
        }
    }

    .mobile{
        width: 100%;
        .textMobile{
            width: 100%;
            display: inline-block;
            .title{
                font-size: 16px;
                font-weight: 700;
                line-height: 22px;
                color: #333;
                margin-bottom: 8px;
            }
            .desc{
                margin: 0;
                word-break: break-all;
                font-size: 12px;
                color: #333;
                line-height: 22px;
            }
            .btnGroup{
                // display: flex;
                // justify-content: space-between;
                float: left;
                .linkCont{
                    display: inline-block;
                    padding: 4px 16px;
                    border-radius: 2px;
                    background: #007AFF;
                    margin-right: 10px;
                    margin-top: 10px;
                    .linkText{
                        font-size: 12px;
                        color: #FFFFFF;
                        letter-spacing: 0;
                        text-align: center;
                        cursor: pointer;
                    }
                    .linkUrl{
                        font-size: 12px;
                        color: #007AFF;
                    }
                }
            }


            
        }
    }
    
    
}

</style>