<template src="./template.html">
</template>

<script>
    import imgInput from "../img_input.vue";
    import footTemplate from "../footTemplate.vue";
    export default {
        data() {
            var serverUrl = 'http://skyforest.static.elab-plus.com/temp/template15/';
            //  var serverUrl = 'static/temp/template15/';

            return {
                serverUrl:serverUrl,
                uploading:false,
                disabled:false,
                placeholder:'壮年岁月，不可挽回的进入人生的分水岭',
                isshow:true,
                obj:{
                    text1:'',
                    text2:'',
                    text3:'',
                    text4:'',
                    text5:'',
                    text6:'',
                    text7:'',
                    text8:'',
                    text9:'',
                    text10:'',
                    text11:'',
                    text12:'',
                    text13:'',
                    text14:'',
                    text15:'',
                    text16:'',
                    text17:'',
                    text18:'',
                    text19:'',
                    text20:'',
                    logoUrl:`http://skyforest.static.elab-plus.com/temp/template16/logo.png`,
                    picUrl1:[`${serverUrl}pic01.png`,`${serverUrl}pic01.png`,`${serverUrl}pic01.png`,`${serverUrl}pic01.png`,`${serverUrl}pic01.png`,`${serverUrl}pic01.png`],
                    picUrl2:[`${serverUrl}pic2.png`,`${serverUrl}pic2.png`,`${serverUrl}pic2.png`,`${serverUrl}pic2.png`,`${serverUrl}pic2.png`,`${serverUrl}pic2.png`],
                    picUrl3:[`${serverUrl}pic3.png`,`${serverUrl}pic3.png`,`${serverUrl}pic3.png`,`${serverUrl}pic3.png`,`${serverUrl}pic3.png`,`${serverUrl}pic3.png`],
                    picUrl4:[`${serverUrl}pic4.png`,`${serverUrl}pic4.png`,`${serverUrl}pic4.png`,`${serverUrl}pic4.png`,`${serverUrl}pic4.png`,`${serverUrl}pic4.png`],
                    picUrl5:[`${serverUrl}pic5.png`,`${serverUrl}pic5.png`,`${serverUrl}pic5.png`,`${serverUrl}pic5.png`,`${serverUrl}pic5.png`,`${serverUrl}pic5.png`],
                }
            }
        },
        props:{
            switchOn:Boolean,
            perviewOn:Boolean,
            updateData:String,
        },
        mounted() {
            if(this.updateData){
                this.obj=JSON.parse(this.updateData);
            }
        },
        watch:{
            switchOn(val){
                if(val){
                    // console.log('1111111',this.headerTitle1)
                    // console.log('2222222222',this.obj)
                    this.$emit('com',this.obj)
                }
            },
            perviewOn(val){
                // if(val){
                // console.log(val);
                this.disabled=val;
                this.isshow=!val;
                // }
            },
            // perviewOff(val){
            //     if(val){
            //         // console.log(val);
            //         this.disabled=false;
            //         this.isshow=true;
            //         // console.log(this.isshow);
            //     }
            // },
            updateData(val){
                console.log(val,'123465789');
                if(val){
                    // console.log('1111');
                    // console.log(val);
                    val=JSON.parse(val);
                    this.obj = val;
                }
            }


        },
        methods: {},
        components:{
            imgInput,
            footTemplate
            // commTemplate
        }
    }
</script>

<style lang="scss" scoped>
  @import "./style.scss"
</style>
<style>
    .template15  .el-carousel__button{
        width:15px;
    }
</style>
