Blame view

src/components/PhotoZoom/index.vue 1023 Bytes
1 2 3 4 5
<!--
 * @Description: 
 * @Autor: renchao
 * @LastEditTime: 2023-07-25 16:09:59
-->
任超 committed
6 7 8 9 10 11 12 13
<template>
  <div style="width: 100%;height: 100%">
    <vue-photo-zoom-pro :width="bigWidth" :url="url" :type="type" :scale="scale" :out-show="showType"
      :overlayStyle="overlayStyle">
    </vue-photo-zoom-pro>
  </div>
</template>
<script>
renchao@pashanhoo.com committed
14 15 16 17 18 19 20 21 22
  import vuePhotoZoomPro from '@/components/PhotoZoom/vue-photo-zoom-pro'
  export default {
    name: 'PicZoom',
    components: { vuePhotoZoomPro },
    data () {
      return {
        type: "square",
        showType: false,
      }
任超 committed
23
    },
renchao@pashanhoo.com committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
    props: {
      url: {
        type: String,
        required: true,
        // default: require('@/assets/vehicle_img/blank_vehicle.jpg') 
      },
      bigWidth: {
        type: Number,
        required: true,
        default: 168
      },
      scale: {
        type: Number,
        required: true,
        default: 2
      },
      overlayStyle: {
        type: String,
        default: 'width:100%;height:100%'
      }
任超 committed
44
    },
renchao@pashanhoo.com committed
45
  }
任超 committed
46
</script>