<script>
export default {
  name: 'imageViewer',
  props: {
    src: {
      type: String,
      default: ''
    },
    alt: {
      type: String,
      default: ''
    }
  },
  data(){
    return {
      isFull: false,
    }
  },

}
</script>

<template>
<div class="img">
  <img :src="src" :alt="alt" />
  <div v-show="isFull" class="img-con">
    <div class="img-btn">+</div>
    <div class="img-btn">-</div>
  </div>
</div>
</template>

<style scoped>
.img{
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #494949;
  transition: width 0.5s,height 0.5s;
}
.img img{
  display: block;
  height: 100%;
  width: auto;
}
.img .img-con{
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 45px;
}
.img .img-con .img-btn{
  display: inline-block;
  width: 45px;
  height: 45px;
  line-height: 45px;
  text-align: center;
  background-color: rgba(0,0,0,0.5);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
}
.img-full{
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
}
</style>
