File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ const props = defineProps({
77 image: { default: ' https://i.pravatar.cc/128' },
88 label: { default: ' Select image' },
99 remove_avatar_url: { default: ' web/api/remove/avatar' },
10+ remove_success: { default: ' Avatar removed.' },
11+ remove_error: { default: ' Avatar not removed.' },
1012})
1113
1214const { image } = toRefs (props)
@@ -21,9 +23,9 @@ function getImagePath(e) {
2123async function removeAvatar () {
2224 try {
2325 await axios .get (props .remove_avatar_url )
24- alert (' Avatar removed. ' )
26+ alert (props . remove_success )
2527 } catch (err) {
26- alert (' Avatar not removed. ' )
28+ alert (props . remove_error )
2729 }
2830}
2931 </script >
@@ -43,7 +45,7 @@ async function removeAvatar() {
4345
4446 <img :src =" image" class =" avatar-image" />
4547
46- <Input @change =" getImagePath" :label =" $t( props.label) " name =" image" type =" file" />
48+ <Input @change =" getImagePath" :label =" props.label" name =" image" type =" file" />
4749 </div >
4850 </div >
4951</template >
You can’t perform that action at this time.
0 commit comments