<template>
  <div class="pop-bg">
    <div class="pop-box">
      <div class="pop-txt">{{popAllObj.popTxt}}</div>
      <div class="pop-btn" v-if="popAllObj.isAloneBtn" @click="popFun(popAllObj.index)">
        {{popAllObj.aloneBtnTxt}}
      </div>
      <div class="pop-btn" v-else>
        <span class="pop-btn-span cancel-btn" @click="popFun(popAllObj.cancelIndex?popAllObj.cancelIndex:'1')">{{popAllObj.cancelTxt || '退出'}}<i></i></span>
        <span class="pop-btn-span sure-btn" @click="popFun(popAllObj.index)">{{popAllObj.sureTxt || '继续填写'}}</span>
      </div>
    </div>
  </div>
</template>

<script>

  export default {
    data() {
      return {}
    },
    props: {
      title: {
        default: '问卷调查',
        type: String
      },
      popAllObj: {
        default: ()=>{},
        type: Object,
      },
    },

    mounted() {
      //console.log(this.popAllObj)
    },

    computed: {},

    methods: {
      getIt() {

      },
      popFun(str) {
        this.$emit('setPopFun', str)
      }

    },
  }

</script>
<style>

</style>
<style lang="scss" scoped>
 // @import '../assets/style/mixin';

  .pop-bg {
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    z-index: 1000;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    left: 0;
    top: 0;
  }

  .pop-box {
    background: #fff;
    border-radius: 3px;
    width: 300px;
    //height:  px2rem(138px);
    position: fixed;
    left: 50%;
    top: 50%;
    margin: -55px 0 0 -150px;
    z-index: 1001;
  }

  .pop-txt {
    padding: 30px;
    //height: px2rem(70px);
    line-height: 21px;
    border-bottom: 1PX solid #F0F1F2;
    font-size: 14px;
    color: #676869;
   // text-align: center;
    // margin-top:px2rem(18px);
  }

  .pop-btn {
    text-align: center;
    height: 50px;
    font-size: 17px;
    color: #449284;
    line-height: 50px;
    overflow: hidden;

  }

  .pop-btn .pop-btn-span {
    width: 50%;
    float: left;
  }
  .cancel-btn{
      position:relative;
      color: #979899;
        i{
          display: inline-block;
          height: 100%;
          width: 1PX;
          background: #F0F1F2;
          position: absolute;
          right: 0;
          top:0;
      }
  }
  .sure-btn{
      color: #449284;
  }
  


  .top-title {
    height: 45px;
    line-height: 25px;
    font-size: 18px;
    text-align: center;
    color: #333;
    padding: 10px 0;
    border-bottom: 1PX solid #E7E7E7
  }
</style>
