<template>
	<view :class="{dark: pattern=='dark'}">
		<view class="flex-center mar-t-100" @click="handlerChange">
			<u-avatar :src="avatar" size="200"></u-avatar>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				avatar: ''
			}
		},
		onShow() {},
		methods: {
			handlerChange() {
				uni.chooseImage({
					count: 1, //默认9
					// sizeType: ['compressed'], //可以指定是原图还是压缩图，默认二者都有
					crop: {
						width: 1,
						height: 1
					},
					success: function(res) {
						console.log(JSON.stringify(res.tempFilePaths));
					}
				});
			}
		}
	}
</script>

<style>

</style>