Browse Source

edit z

ctt_dev
chutingting 1 year ago
parent
commit
6069139fbc
2 changed files with 6 additions and 3 deletions
  1. +0
    -2
      src/types/auto-imports.d.ts
  2. +6
    -1
      src/views/createVideo/index.vue

+ 0
- 2
src/types/auto-imports.d.ts View File

@@ -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<typeof import('vue')['EffectScope']>
readonly ElForm: UnwrapRef<typeof import('element-plus/es')['ElForm']>
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>


+ 6
- 1
src/views/createVideo/index.vue View File

@@ -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) {


Loading…
Cancel
Save