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