@@ -224,14 +224,14 @@ function changeScale(event) { | |||||
let deltaY = touchStart.pageY - y; | let deltaY = touchStart.pageY - y; | ||||
let boxDistance2 = Math.sqrt(deltaX ** 2 + deltaY ** 2); | let boxDistance2 = Math.sqrt(deltaX ** 2 + deltaY ** 2); | ||||
if (deltaX < 0) { | if (deltaX < 0) { | ||||
if (props.materialList.virtual.w < 0.1) { | |||||
props.materialList.virtual.w = 0.1; | |||||
if (props.materialList.virtual.w < 0.2) { | |||||
props.materialList.virtual.w = 0.2; | |||||
return; | return; | ||||
} | } | ||||
props.materialList.virtual.w = (baseLineScale + boxDistance2) / baseLine; | props.materialList.virtual.w = (baseLineScale + boxDistance2) / baseLine; | ||||
} else { | } else { | ||||
if (props.materialList.virtual.w > 1.3) { | |||||
props.materialList.virtual.w = 1.3; | |||||
if (props.materialList.virtual.w > 2.0) { | |||||
props.materialList.virtual.w = 2.0; | |||||
return; | return; | ||||
} | } | ||||
props.materialList.virtual.w = (baseLineScale - boxDistance2) / baseLine; | props.materialList.virtual.w = (baseLineScale - boxDistance2) / baseLine; | ||||
@@ -298,15 +298,15 @@ function changeScaleSc(index, event) { | |||||
let deltaY = touchStart.pageY - y; | let deltaY = touchStart.pageY - y; | ||||
let boxDistance2 = Math.sqrt(deltaX ** 2 + deltaY ** 2); | let boxDistance2 = Math.sqrt(deltaX ** 2 + deltaY ** 2); | ||||
if (deltaX < 0) { | if (deltaX < 0) { | ||||
if (props.materialList.scList[index].w < 0.4) { | |||||
props.materialList.scList[index].w = 0.4; | |||||
if (props.materialList.scList[index].w < 0.2) { | |||||
props.materialList.scList[index].w = 0.2; | |||||
return; | return; | ||||
} | } | ||||
props.materialList.scList[index].w = | props.materialList.scList[index].w = | ||||
(baseLineScale + boxDistance2) / baseLine; | (baseLineScale + boxDistance2) / baseLine; | ||||
} else { | } else { | ||||
if (props.materialList.scList[index].w > 1.3) { | |||||
props.materialList.scList[index].w = 1.3; | |||||
if (props.materialList.scList[index].w > 2.0) { | |||||
props.materialList.scList[index].w = 2.0; | |||||
return; | return; | ||||
} | } | ||||
props.materialList.scList[index].w = | props.materialList.scList[index].w = | ||||
@@ -2,7 +2,6 @@ | |||||
export {} | export {} | ||||
declare global { | declare global { | ||||
const EffectScope: typeof import('vue')['EffectScope'] | const EffectScope: typeof import('vue')['EffectScope'] | ||||
const ElForm: typeof import('element-plus/es')['ElForm'] | |||||
const ElMessage: typeof import('element-plus/es')['ElMessage'] | const ElMessage: typeof import('element-plus/es')['ElMessage'] | ||||
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] | const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] | ||||
const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] | const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] | ||||
@@ -271,7 +270,6 @@ import { UnwrapRef } from 'vue' | |||||
declare module 'vue' { | declare module 'vue' { | ||||
interface ComponentCustomProperties { | interface ComponentCustomProperties { | ||||
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> | 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 ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']> | ||||
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']> | readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']> | ||||
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']> | readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']> | ||||
@@ -355,8 +355,9 @@ | |||||
<el-input-number | <el-input-number | ||||
:precision="2" | :precision="2" | ||||
v-model="showImgInfo.data.w" | v-model="showImgInfo.data.w" | ||||
:min="0.1" | |||||
:max="1.3" | |||||
:min="0.2" | |||||
:max="2" | |||||
:step="0.01" | |||||
size="large" | size="large" | ||||
controls-position="right" | controls-position="right" | ||||
/> | /> | ||||