<template>
	<view class="container">
		<vrapile-cut-image :avatar="imageSrc" @save="save" :key="key"></vrapile-cut-image>
	</view>
</template>

<script>
  // import { uploadAvatar } from "@/api/system/user"
	export default {
		data() {
			return {
				imageSrc: "",
				key: 0
			}
		},
		created() {
			// 初始化一个图片地址
			this.imageSrc = "https://minio.ninecloud.top/prod/2024/08/05/67a593d2c2f24f188163b4712100c227.jpg";
		},
		methods: {
			save(e){
				this.imageSrc = e.avatar;
				this.key++;
				// console.log(e.avatar)
				// uploadAvatar({
				//     filePath: e.avatar,
				// })
			},
		}
	}
</script>