You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
628 B
31 lines
628 B
<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>
|