diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index e5c7bdb..9ea2d5d 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -2,7 +2,6 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] - const ElForm: typeof import('element-plus/es')['ElForm'] const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] @@ -271,7 +270,6 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface ComponentCustomProperties { readonly EffectScope: UnwrapRef - readonly ElForm: UnwrapRef readonly ElMessage: UnwrapRef readonly ElMessageBox: UnwrapRef readonly asyncComputed: UnwrapRef diff --git a/src/views/createVideo/index.vue b/src/views/createVideo/index.vue index 42d0a23..8654187 100644 --- a/src/views/createVideo/index.vue +++ b/src/views/createVideo/index.vue @@ -1236,7 +1236,12 @@ async function reGetpersonSCIList() { const scImgActive = ref(null); function selectScImg(img) { scImgActive.value = img.id; - materialList.scList.push({ ...img, x: 0, y: 0, z: 0, w: 1, h: 1 }); + let maxValue = 1 + // 素材层级从2递增 + if (materialList.scList.length > 0) { + maxValue = Math.max.apply(Math, materialList.scList.map(item => item.z)); + } + materialList.scList.push({ ...img, x: 0, y: 0, z: maxValue + 1, w: 1, h: 1 }); } // 删除上传的背景或素材 function delImg(id) {