<template>
  <setting-panel>
    <div class="view-setting" app-border dir-left>
      <div class="ui-title">当前初始画面</div>
      <div class="preview">
        <img :src="initImg+'?'+Math.random()" v-if="initImg" alt="">
        <div class="tips" v-else>
          <i class="iconfont iconphotoview" style="font-size: 40px"></i>
        </div>
      </div>
    </div>
  </setting-panel>
</template>

<script>
export default {
  methods:{

  },
  data(){
    return {
      initImg:localStorage.initImg || ''
    }
  },
  mounted(){
      this.$bus.on('initView',data=>{
        this.initImg = ''
        this.initImg = data
      })
  }
}
</script>

<style lang="less" scoped>
.preview{
    height: 122px;
    >img{
      width: 100%;
      height: 100%;
    }
}
</style>