Reputation: 57
i am trying to remove image preview after cancelling, but im having troubles finding the answers online
inserting image
after canceling
vue.js
<v-avatar
size="95">
<v-img :src="url" />
</v-avatar>
</v-flex>
<v-flex xs8>
<v-file-input
v-model="image"
accept=".png, .jpeg, .jpg"
:rules="imagesize"
hint="File extentions (.png, .jpg, .jpeg) File Size limits (max: 10mb)"
placeholder="Upload profile image"
prepend-icon="mdi-camera"
outlined
filled
@change="Preview_image"/>
</v-flex>
method
Preview_image() {
this.url = URL.createObjectURL(this.image);
},
Upvotes: 1
Views: 729
Reputation: 1
Reset the url
property in the @click:clear
handler in v-file-input
component :
<v-file-input
...
@click:clear="url=''"
Upvotes: 1