File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
<script setup>
2
2
import axios from ' axios'
3
3
import Input from ' @/components/input/Input.vue'
4
+ import avatar from ' ./profil/avatar.png'
4
5
import { toRefs } from ' vue'
5
6
6
7
const props = defineProps ({
7
- image: { default: ' https://i.pravatar.cc/128 ' },
8
+ image: { default: avatar },
8
9
label: { default: ' Select image' },
9
10
remove_avatar_url: { default: ' web/api/remove/avatar' },
10
11
remove_success: { default: ' Avatar removed.' },
@@ -23,6 +24,7 @@ function getImagePath(e) {
23
24
async function removeAvatar () {
24
25
try {
25
26
await axios .get (props .remove_avatar_url )
27
+ image .value = avatar
26
28
alert (props .remove_success )
27
29
} catch (err) {
28
30
alert (props .remove_error )
@@ -92,3 +94,5 @@ async function removeAvatar() {
92
94
border : 2px solid var (--wow-accent );
93
95
}
94
96
</style >
97
+
98
+ <!-- Avatars https://i.pravatar.cc/128 -->
You can’t perform that action at this time.
0 commit comments