<template>
  <div>
    <span @click="preview()" class="pre">点击查看</span>
    <el-image v-if="value" ref="preview" class="hideImgDiv" :src="baseUrl + value" :preview-src-list="[baseUrl + value]"></el-image>
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: String,
      default: {}
    }
  },
  data() {
    return {};
  },
  methods: {
    preview() {
      this.$refs.preview.clickHandler();
    }
  }
};
</script>
<style lang="scss" scoped>
.hideImgDiv {
  display: none!important;
}
.pre {
  color: #1890ff;
  cursor: pointer;
}
</style>
