fix
This commit is contained in:
4
.env.dev
4
.env.dev
@@ -3,6 +3,6 @@ NODE_ENV = 'development'
|
|||||||
# VUE_APP_BASE_URL = 'https://api.aida.com.hk'
|
# VUE_APP_BASE_URL = 'https://api.aida.com.hk'
|
||||||
|
|
||||||
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
||||||
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
||||||
# VUE_APP_BASE_URL = 'http://192.168.1.9:17088'
|
# VUE_APP_BASE_URL = 'http://192.168.1.9:17088'
|
||||||
# VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
|
VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
|
||||||
|
|||||||
@@ -251,12 +251,22 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
soleId(arr,index){
|
soleId(arr,index){
|
||||||
let randomNum = Math.floor(100 + Math.random() * 900);
|
let randomNum = Math.floor(100 + Math.random() * 900);
|
||||||
arr[index].id = this.sketchImg.id_? Number(this.sketchImg.id_+(randomNum+"")):this.current.id
|
// if(this.sketchImg.id_){
|
||||||
if(this.hasDuplicateId(arr)){
|
if(this.sketchImg.id){
|
||||||
this.soleId(arr,index)
|
if(this.sketchImg.id == this.sketchImg.id_){
|
||||||
|
arr[index].id = Number(this.sketchImg.id_+(randomNum+""))
|
||||||
|
if(this.hasDuplicateId(arr)){
|
||||||
|
this.sketchImg.id_ = this.sketchImg.id
|
||||||
|
this.soleId(arr,index)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
arr[index].id = this.sketchImg.id_
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
return arr
|
arr[index].id = this.current.id
|
||||||
}
|
}
|
||||||
|
// arr[index].id = this.sketchImg.id_? this.sketchImg.id_:this.current.id
|
||||||
|
return arr
|
||||||
},
|
},
|
||||||
//提交
|
//提交
|
||||||
setPreview(){
|
setPreview(){
|
||||||
|
|||||||
@@ -884,17 +884,17 @@ export default defineComponent({
|
|||||||
polyLineBtn.on('mousedown',()=>{
|
polyLineBtn.on('mousedown',()=>{
|
||||||
canvas.skipTargetFind = true
|
canvas.skipTargetFind = true
|
||||||
let points = currentPatterning.points
|
let points = currentPatterning.points
|
||||||
currentPatterning.points.pop()
|
points.pop()
|
||||||
currentPatterning.points.pop()
|
points.pop()
|
||||||
// canvas.remove(currentPatterning)
|
canvas.remove(currentPatterning)
|
||||||
// let polyline = new fabric.Polyline(points, {
|
let polyline = new fabric.Polyline(points, {
|
||||||
// fill: 'transparent',
|
fill: 'transparent',
|
||||||
// stroke: canvasPencilColor.value,
|
stroke: canvasPencilColor.value,
|
||||||
// strokeWidth:canvasPencilWidth.value,
|
strokeWidth:canvasPencilWidth.value,
|
||||||
// selection:false,
|
selection:false,
|
||||||
// })
|
})
|
||||||
// canvas.add(polyline)
|
canvas.add(polyline)
|
||||||
currentPatterning.set({stroke: canvasPencilColor.value})
|
// currentPatterning.set({stroke: canvasPencilColor.value})
|
||||||
createPatterningIs = false
|
createPatterningIs = false
|
||||||
clearPatterning()//临时图形置为空并且添加撤回对象里面
|
clearPatterning()//临时图形置为空并且添加撤回对象里面
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user