fix: 操作状态下禁止操作
This commit is contained in:
parent
a0e368f404
commit
93b0eac9be
10
painter.js
10
painter.js
@ -63,6 +63,15 @@ Component({
|
|||||||
this.doAction(newVal)
|
this.doAction(newVal)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
disableAction: {
|
||||||
|
type: Boolean,
|
||||||
|
observer: function (isDisabled) {
|
||||||
|
let style = isDisabled ? 'visibility: hidden' : ''
|
||||||
|
this.setData({
|
||||||
|
frontStyle: style
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -70,6 +79,7 @@ Component({
|
|||||||
picURL: '',
|
picURL: '',
|
||||||
showCanvas: true,
|
showCanvas: true,
|
||||||
painterStyle: '',
|
painterStyle: '',
|
||||||
|
frontStyle: '',
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<canvas canvas-id="top" style="{{painterStyle}};position: absolute;" />
|
<canvas canvas-id="top" style="{{painterStyle}};position: absolute;" />
|
||||||
<canvas
|
<canvas
|
||||||
canvas-id="front"
|
canvas-id="front"
|
||||||
style="{{painterStyle}};position: absolute;"
|
style="{{painterStyle}};position: absolute;{{frontStyle}};"
|
||||||
bindtouchstart="onTouchStart"
|
bindtouchstart="onTouchStart"
|
||||||
bindtouchmove="onTouchMove"
|
bindtouchmove="onTouchMove"
|
||||||
bindtouchend="onTouchEnd"
|
bindtouchend="onTouchEnd"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user