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 = '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.7:5567'
|
||||
VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
|
||||
|
||||
@@ -251,12 +251,22 @@ export default defineComponent({
|
||||
},
|
||||
soleId(arr,index){
|
||||
let randomNum = Math.floor(100 + Math.random() * 900);
|
||||
arr[index].id = this.sketchImg.id_? Number(this.sketchImg.id_+(randomNum+"")):this.current.id
|
||||
if(this.hasDuplicateId(arr)){
|
||||
this.soleId(arr,index)
|
||||
// if(this.sketchImg.id_){
|
||||
if(this.sketchImg.id){
|
||||
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{
|
||||
return arr
|
||||
arr[index].id = this.current.id
|
||||
}
|
||||
// arr[index].id = this.sketchImg.id_? this.sketchImg.id_:this.current.id
|
||||
return arr
|
||||
},
|
||||
//提交
|
||||
setPreview(){
|
||||
|
||||
@@ -884,17 +884,17 @@ export default defineComponent({
|
||||
polyLineBtn.on('mousedown',()=>{
|
||||
canvas.skipTargetFind = true
|
||||
let points = currentPatterning.points
|
||||
currentPatterning.points.pop()
|
||||
currentPatterning.points.pop()
|
||||
// canvas.remove(currentPatterning)
|
||||
// let polyline = new fabric.Polyline(points, {
|
||||
// fill: 'transparent',
|
||||
// stroke: canvasPencilColor.value,
|
||||
// strokeWidth:canvasPencilWidth.value,
|
||||
// selection:false,
|
||||
// })
|
||||
// canvas.add(polyline)
|
||||
currentPatterning.set({stroke: canvasPencilColor.value})
|
||||
points.pop()
|
||||
points.pop()
|
||||
canvas.remove(currentPatterning)
|
||||
let polyline = new fabric.Polyline(points, {
|
||||
fill: 'transparent',
|
||||
stroke: canvasPencilColor.value,
|
||||
strokeWidth:canvasPencilWidth.value,
|
||||
selection:false,
|
||||
})
|
||||
canvas.add(polyline)
|
||||
// currentPatterning.set({stroke: canvasPencilColor.value})
|
||||
createPatterningIs = false
|
||||
clearPatterning()//临时图形置为空并且添加撤回对象里面
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user