feat(Rate): add touchable prop (#4361)

This commit is contained in:
neverland
2019-09-04 17:28:43 +08:00
committed by GitHub
parent a3b6744b24
commit 0bd3997373
5 changed files with 26 additions and 5 deletions
+6 -2
View File
@@ -53,6 +53,10 @@ export default createComponent({
count: {
type: Number,
default: 5
},
touchable: {
type: Boolean,
default: true
}
},
@@ -84,7 +88,7 @@ export default createComponent({
},
onTouchStart(event) {
if (this.readonly || this.disabled) {
if (this.readonly || this.disabled || !this.touchable) {
return;
}
@@ -108,7 +112,7 @@ export default createComponent({
},
onTouchMove(event) {
if (this.readonly || this.disabled) {
if (this.readonly || this.disabled || !this.touchable) {
return;
}