Skip to content

Commit

Permalink
feat: add hide button remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Noval Oktavio committed Jan 13, 2022
1 parent dd4adc6 commit 65238ea
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/VFileUpload/VFileUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ const props = defineProps({
type: String,
default: '',
},
hideRemove: {
type: Boolean,
default: false,
},
});
const emit = defineEmits([
Expand All @@ -170,6 +174,7 @@ const {
disabled,
multiple,
customSize,
hideRemove,
} = toRefs(props);
const sizeClass = computed(() => (props.full ? 'w-full' : customSize.value));
Expand Down Expand Up @@ -430,7 +435,7 @@ onUnmounted(() => {
</VBtn>

<VBtn
v-if="hasFile"
v-if="hasFile && !hideRemove"
small
dense
outlined
Expand Down Expand Up @@ -543,6 +548,7 @@ onUnmounted(() => {
</label>

<label
v-if="!hideRemove"
class="
relative
cursor-pointer
Expand Down Expand Up @@ -626,7 +632,7 @@ onUnmounted(() => {
{{ hasFile ? changeText : browseText }}
</VBtn>
<VBtn
v-if="hasFile"
v-if="hasFile && !hideRemove"
small
dense
type="button"
Expand Down Expand Up @@ -672,6 +678,7 @@ onUnmounted(() => {
{{ changeText }}
</VBtn>
<VBtn
v-if="!hideRemove"
small
dense
type="button"
Expand Down

0 comments on commit 65238ea

Please sign in to comment.