main.vue 848 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <view
  3. class="image_model"
  4. :style="{
  5. 'background-color':(state===1||state===3)?backgroundColor:successBackgroundColor,
  6. 'height': mode==='heightFix'?'auto':'100%'
  7. }"
  8. >
  9. <view class="relative image_screen">
  10. <image
  11. :lazy-load="lazyLoad"
  12. class="image_model-image"
  13. :show-menu-by-longpress="showMenuByLongpress"
  14. :style="{'height': mode==='heightFix'?'auto':'100%'}"
  15. :mode="mode"
  16. :src="src"
  17. @load="success"
  18. ></image>
  19. <view class="absolute image-fixed">
  20. <slot></slot>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import mixins from './mixins';
  27. import props from "./props";
  28. export default {
  29. name: "v-image",
  30. mixins,
  31. props
  32. }
  33. </script>
  34. <style scoped lang="scss" src="./style.scss"></style>