fix: 操作状态下禁止操作

This commit is contained in:
0JARVIS0 2019-11-28 19:13:25 +08:00
parent a0e368f404
commit 93b0eac9be
2 changed files with 11 additions and 1 deletions

View File

@ -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: {

View File

@ -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"