Selaa lähdekoodia

edit zindex

ctt_dev
chutingting 1 vuosi sitten
vanhempi
commit
dfbf58c9cf
3 muutettua tiedostoa jossa 10 lisäystä ja 4 poistoa
  1. +6
    -2
      src/components/EditPosition.vue
  2. +2
    -0
      src/types/auto-imports.d.ts
  3. +2
    -2
      src/views/createVideo/index.vue

+ 6
- 2
src/components/EditPosition.vue Näytä tiedosto

@@ -224,8 +224,8 @@ function changeScale(event) {
let deltaY = touchStart.pageY - y;
let boxDistance2 = Math.sqrt(deltaX ** 2 + deltaY ** 2);
if (deltaX < 0) {
if (props.materialList.virtual.w < 0.4) {
props.materialList.virtual.w = 0.4;
if (props.materialList.virtual.w < 0.1) {
props.materialList.virtual.w = 0.1;
return;
}
props.materialList.virtual.w = (baseLineScale + boxDistance2) / baseLine;
@@ -256,6 +256,10 @@ const handleDragSc = (item, index, event) => {
realImgUrl.value = item.material;
scBorderActive.value= index
showBorderActive.value = item.id;
props.materialList.scList.forEach(res => {
res.activeIndex =''
})
item.activeIndex = item.id
event.preventDefault();
const imageElement = fatherBox.value;
const startX = event.clientX; //保存初始值,避免闪烁


+ 2
- 0
src/types/auto-imports.d.ts Näytä tiedosto

@@ -2,6 +2,7 @@
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']
@@ -270,6 +271,7 @@ 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']>


+ 2
- 2
src/views/createVideo/index.vue Näytä tiedosto

@@ -355,7 +355,7 @@
<el-input-number
:precision="2"
v-model="showImgInfo.data.w"
:min="0.4"
:min="0.1"
:max="1.3"
size="large"
controls-position="right"
@@ -1420,7 +1420,7 @@ watch(
showImgInfo.value.data = materialList.virtual;
} else {
showImgInfo.value.data = materialList.scList.find(
(item) => item.id == showImgInfo.value.id
(item) => (item.id == showImgInfo.value.id && item.activeIndex == showImgInfo.value.id)
);
}
},


Ladataan…
Peruuta
Tallenna