• uniapp 图片自动缩放


    <template>
    	<view class="dlz-fx-column">
    	  <movable-area>
    	    <movable-view  direction="all" scale-value="1" scale-min="1" scale="true" scale-max="4">
    	      <image
    	      		v-if="imageUrl"
    	      		class="lookimg"
    	      		:src="imageUrl"
    	      		mode="widthFix"
    	      ></image>
    	    </movable-view>
    	  </movable-area>	
    	</view> 
    </template>
    
    <script>
    import {getYardImage} from "@/api/visualize.js"
    export default {
    	name: 'query',
    	data() {
    		return {
    			imageUrl:''
    			
    		}
    	},
    	mounted(){
    		getYardImage().then((res)=>{
    			this.imageUrl = res.data
    			console.log(res,'getYardImage')
    		})
    	},
    	onShow(){
    		
    	},
    	methods: {
    		
    	
    	}
    }
    </script>
    
    <style lang="scss" scoped>
    .dlz-fx-column{
    		&>movable-area {	
    			flex: 1;
    			height: 100%;		
    			 100%;
    			position:fixed;
    			overflow: hidden;
    			left: 0;
    			z-index: 1000;
    			movable-view{
    				display: flex;
    				justify-content: center;
    				 100%;
    				height: 100%;
    				image {
    					 100%;
    					height: 100%;
    				}
    			}
    		
    		}
    }
    
    
    
    </style>
    

      

  • 相关阅读:
    Python3之json文件操作
    Python3之MySQL操作
    使用requests模块的网络编程
    Python 判断小数的函数
    python之函数
    CPUID
    .inc
    probe,victim,
    coolcode
    Linux vim 常用方法
  • 原文地址:https://www.cnblogs.com/daifuchao/p/16338023.html
Copyright © 2020-2023  润新知