library generate增加删除和拖拽移动位置功能 图片放大添加键盘事件调整按钮大小
This commit is contained in:
@@ -414,6 +414,7 @@ export default defineComponent({
|
||||
async (rv: any) => {
|
||||
rv.clothes.forEach((item:any)=>{
|
||||
let a
|
||||
item.designType='Library'
|
||||
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
|
||||
a = item.layersObject[0]
|
||||
item.layersObject[0] = item.layersObject[1]
|
||||
@@ -421,6 +422,12 @@ export default defineComponent({
|
||||
}
|
||||
if(item.printObject.prints == null){
|
||||
item.printObject.prints = [{}]
|
||||
}else{
|
||||
item.printObject.prints.forEach((element:any) => {
|
||||
if(!element.designType){
|
||||
element.designType = 'Library'
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
this.currentIndex = 0
|
||||
@@ -931,6 +938,8 @@ export default defineComponent({
|
||||
clothesDetail(clothes:any, index:number){
|
||||
|
||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||
console.log(designItemDetail);
|
||||
|
||||
this.designOrder = true
|
||||
this.current = designItemDetail.clothes[index]
|
||||
if(this.current.id && !designItemDetail.clothes[designItemDetail.clothes.length-1].id){
|
||||
@@ -950,7 +959,7 @@ export default defineComponent({
|
||||
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
|
||||
id:this.current.id?this.current.id:'',
|
||||
changed:this.current.changed?this.current.changed:false,
|
||||
|
||||
designType:this.current.designType?this.current.designType:'Library',
|
||||
path:this.current.minIOPath?this.current.minIOPath:'',
|
||||
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
|
||||
priority:this.current.priority,
|
||||
|
||||
@@ -311,7 +311,7 @@ export default defineComponent({
|
||||
let color = `${this.$parent.selectColor.rgba.r} ${this.$parent.selectColor.rgba.g} ${this.$parent.selectColor.rgba.b}`
|
||||
data.designSingleItemDTOList[index].color = color
|
||||
}
|
||||
data.designSingleItemDTOList[index].designType = this.sketchImg.designType?this.sketchImg.designType:"Library"
|
||||
data.designSingleItemDTOList[index].designType = this.sketchImg.designType?this.sketchImg.designType:this.current.designType
|
||||
data.timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
this.loadingShow = true
|
||||
Https.axiosPost(Https.httpUrls.designSingle, data).then(
|
||||
@@ -321,7 +321,7 @@ export default defineComponent({
|
||||
if(item.type != 'body'){
|
||||
if(item.id == designItemDetail.clothes[index].id || item.id == this.sketchImg.id_){
|
||||
designItemDetail.clothes[index].color = item.color
|
||||
designItemDetail.clothes[index].designType = this.sketchImg.designType?this.sketchImg.designType:'Library'
|
||||
designItemDetail.clothes[index].designType = item.designType
|
||||
designItemDetail.clothes[index].layersObject = item.layersObject
|
||||
designItemDetail.clothes[index].minIOPath = item.minIOPath
|
||||
designItemDetail.clothes[index].path = item.path
|
||||
|
||||
@@ -299,7 +299,7 @@ export default defineComponent({
|
||||
w = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)
|
||||
h = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)*num
|
||||
width = w+'px'
|
||||
height = w*num+'px'
|
||||
// height = w*num+'px'
|
||||
}else if(this.direction == 'top'){
|
||||
num = width/height
|
||||
this.frontBack.front[this.imgDomIndex].style.top = 'auto'
|
||||
@@ -309,19 +309,19 @@ export default defineComponent({
|
||||
h = (this.frontBack.front[this.imgDomIndex].centers.top - e.y)
|
||||
|
||||
height = h+'px'
|
||||
width = h*num+'px'
|
||||
// width = h*num+'px'
|
||||
}else if(this.direction == 'bottom'){
|
||||
num = width/height
|
||||
h = (e.y - this.frontBack.front[this.imgDomIndex].centers.top)
|
||||
height = h+'px'
|
||||
width = h*num+'px'
|
||||
// width = h*num+'px'
|
||||
}else if(this.direction == 'left'){
|
||||
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
|
||||
this.frontBack.front[this.imgDomIndex].style.right = parentNode.offsetWidth -imgDomWH.width - this.imgDom.offsetLeft+'px'
|
||||
w = (this.frontBack.front[this.imgDomIndex].centers.left - e.x)
|
||||
|
||||
width = w+'px'
|
||||
height = w*num+'px'
|
||||
// height = w*num+'px'
|
||||
}
|
||||
//判断尺寸是否到边
|
||||
this.frontBack.front[this.imgDomIndex].style.width = width
|
||||
|
||||
Reference in New Issue
Block a user