This commit is contained in:
icssoa 2024-02-23 22:17:54 +08:00
parent 304bc25339
commit 45c88218ec
2 changed files with 15 additions and 1 deletions

View File

@ -68,6 +68,7 @@
:style="{ :style="{
backgroundColor: tag.color backgroundColor: tag.color
}" }"
v-if="showTag"
> >
{{ tag.name }} {{ tag.name }}
</span> </span>
@ -125,8 +126,15 @@ const props = defineProps({
type: Array as PropType<Upload.Item[]>, type: Array as PropType<Upload.Item[]>,
default: () => [] default: () => []
}, },
//
disabled: Boolean, disabled: Boolean,
deletable: Boolean //
deletable: Boolean,
//
showTag: {
type: Boolean,
default: true
}
}); });
const emit = defineEmits(["remove"]); const emit = defineEmits(["remove"]);

View File

@ -109,6 +109,7 @@
<slot name="item" :item="item" :index="index"> <slot name="item" :item="item" :index="index">
<div class="cl-upload__item"> <div class="cl-upload__item">
<upload-item <upload-item
:show-tag="showTag"
:item="item" :item="item"
:list="list" :list="list"
:disabled="disabled" :disabled="disabled"
@ -169,6 +170,11 @@ const props = defineProps({
icon: null, icon: null,
// //
text: String, text: String,
//
showTag: {
type: Boolean,
default: true
},
// //
showFileList: { showFileList: {
type: Boolean, type: Boolean,