<template>
  <view
      class="image_model"
      :style="{
        'background-color':(state===1||state===3)?backgroundColor:successBackgroundColor,
        'height': mode==='heightFix'?'auto':'100%'
      }"
  >
    <view class="relative image_screen">
      <image
          :lazy-load="lazyLoad"
          class="image_model-image"
          :show-menu-by-longpress="showMenuByLongpress"
          :style="{'height': mode==='heightFix'?'auto':'100%'}"
          :mode="mode"
          :src="src"
          @load="success"
      ></image>
      <view class="absolute image-fixed">
        <slot></slot>
      </view>
    </view>


  </view>

</template>

<script>
import mixins from './mixins';
import props from "./props";
export default {
  name: "v-image",
  mixins,
  props
}
</script>

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