1.5.0 • Published 7 years ago

vue-exif-uploader v1.5.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

About

一个简单的图片上传组件,支持预览,当图片带有orientation时会根据数据进行旋转;

img preview

旋转回正确的角度后,组件会以宽为基准,将高按比例放大缩小,如果高超出预览框,则按比例移动到对应位置,默认为1/2;当高未超出预览框,则不移动;

Build Setup

npm install vue-exif-uploader --save

How to use

1、.vue文件里导入

import uploader from "vue-exif-uploader"
export default {
	name: 'myComponent',
	components: {
		uploader
	}
}

2、prop可传递的属性

props: {
	title: {
		default: '标题'
	},
	width: {
		default: '219px' // 上传预览窗口的宽度
	},
	height: {
		default: '132px' // 上传预览窗口的高度
	},
	scale: {
		default: 1 / 2 // 预览图片的位置
	}
}

3、Example

<uploader :width="width" :height="height" :scale="scale"></uploader>

4、Result

result0 result0

1.5.0

7 years ago

1.4.9

7 years ago

1.4.8

7 years ago

1.3.8

7 years ago

1.3.7

7 years ago

1.3.6

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.1.2

7 years ago