合并画布代码

This commit is contained in:
X1627315083
2025-06-18 11:05:23 +08:00
parent 903c0ebdf5
commit 9c7fae36eb
118 changed files with 23633 additions and 8201 deletions

View File

@@ -109,7 +109,7 @@
</div>
</template>
<script lang="ts">
import { defineComponent,computed,ref,provide,nextTick,createVNode,toRefs, reactive, onMounted} from 'vue'
import { defineComponent,computed,ref,provide,nextTick,createVNode,toRefs, reactive, onMounted, watch} from 'vue'
import { Https } from "@/tool/https";
import { useStore } from "vuex";
import sketchCategory from "@/component/HomePage/sketchCategory.vue";
@@ -165,8 +165,14 @@ export default defineComponent({
mannequinStyle:computed(()=>store.state.UserHabit.mannequinStyle),//风格列表
sexList:computed(()=>store.state.UserHabit.sex.value),//风格列表
ageGroupList:computed(()=>store.state.UserHabit.ageGroup),//风格列表
selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目
})
watch(()=>detailData.selectObject,(newValue,oldValue)=>{
detailData.mannequinData.sex = newValue.sex?newValue.sex:'Female'
detailData.mannequinData.style = newValue.style?newValue.style:''
detailData.mannequinData.ageGroup = newValue.ageGroup?newValue.ageGroup:''
},{immediate:true})
const getDetailListData = reactive({
total:0,
pageSize:10,

View File

@@ -71,6 +71,7 @@ export default defineComponent({
selectItem.imgDomIndex = detailData.frontBack.front.findIndex((item:any)=>item.id == newValue.id)
},{immediate: true,})
watch(()=>detailData.frontBack?.body?.path,(newVal)=>{
let sacle = 0
const img = new Image();
img.onload = () => {
@@ -82,16 +83,22 @@ export default defineComponent({
let value = item.style[key]
if(typeof value !== 'number'){
value = value.replace('px','')
item.style[key] = value
}else{
item.style[key] = value*sacle+'px'
}
item.style[key] = value*sacle+'px'
// item.style[key] = value*sacle+'px'
}
for (const key in detailData.frontBack.back[index].style) {
if(key == 'zIndex')return
let value = detailData.frontBack.back[index].style[key]
if(typeof value !== 'number'){
value = value.replace('px','')
detailData.frontBack.back[index].style[key] = value
}else{
detailData.frontBack.back[index].style[key] = value*sacle+'px'
}
detailData.frontBack.back[index].style[key] = value*sacle+'px'
// detailData.frontBack.back[index].style[key] = value*sacle+'px'
}
});
};
@@ -415,7 +422,6 @@ export default defineComponent({
}
for (const key in data.instance.frontBack.back[index].style) {
if(key == 'zIndex')return
console.log(data.instance.frontBack.back[index].style[key].replace(/px/g,''))
data.instance.frontBack.back[index].style[key] = data.instance.frontBack.back[index].style[key].replace(/px/g,'')*sacle+'px'
}
});