This commit is contained in:
2025-07-02 15:04:59 +08:00
parent 79edcad5b4
commit c9b7603460
2 changed files with 7 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ const MaterialSourceRef = ref();
const visible = ref(false); const visible = ref(false);
const targetList = reactive([]); const targetList = reactive([]);
const emits = defineEmits(['success']); const emits = defineEmits(['success']);
const {id, material, disabled} = defineProps({ const {id, material, disabled, hiddenMaterial} = defineProps({
id: { id: {
type: Number, type: Number,
default: null, default: null,
@@ -25,6 +25,10 @@ const {id, material, disabled} = defineProps({
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false, default: false,
},
hiddenMaterial: {
type: Boolean,
default: false,
} }
}); });
@@ -112,7 +116,7 @@ const success = async () => {
</UploadButton> </UploadButton>
</div> </div>
<div class="mt-[20px]" v-if="!SystemStore.isRoot"> <div class="mt-[20px]" v-if="!SystemStore.isRoot && !hiddenMaterial">
<div class="text-[#1D2129] text-[14px] mb-[12px]">从素材库添加</div> <div class="text-[#1D2129] text-[14px] mb-[12px]">从素材库添加</div>
<MaterialSource <MaterialSource
ref="MaterialSourceRef" ref="MaterialSourceRef"

View File

@@ -121,6 +121,7 @@ const update = async () => {
:src="v"> :src="v">
</x-image> </x-image>
<add-material <add-material
:hiddenMaterial="true"
@success="val => item.material = val" @success="val => item.material = val"
ref="AddMaterialRef" ref="AddMaterialRef"
:id="task.task_id" :id="task.task_id"