<template>
  <popup v-model:value="value" content-animate="scale" @close="$emit('destroy-popup')">

      <section class="popup-image relative rowACenter"
        :class="{'popup-image-iframe':webview}"
      >
        <div class="absolute popup-image-close center cursor-pointer" @click="close">
          <icon type="close" class="popup-image-close-target"></icon>
        </div>
        <iframe
            class="screen"
            frameborder="0"
            :src="src"
            v-if="webview"
        ></iframe>
        <scroll-view v-else>
          <v-image  mode="widthFix" :src="src" class="popup-image-target"></v-image>
        </scroll-view>
      </section>

  </popup>
</template>

<script>
import {
  Popup,
  icon,
  scrollView
} from '$components';
import mixins from '../mixins';
import props from '../props';
import VImage from "$components/v-image/lib/main";
export default {
  name: "popup-image",
  mixins,
  props,
  components:{
    VImage,
    Popup,
    icon,
    scrollView
  }
}
</script>

<style scoped lang="scss" src="../style.scss"></style>
