mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 02:16:12 +08:00
[bugfix] Picker should prevent default touchmove (#432)
This commit is contained in:
parent
1d105afc70
commit
f0143636db
@ -109,7 +109,7 @@ export default create({
|
|||||||
frameStyle() {
|
frameStyle() {
|
||||||
return {
|
return {
|
||||||
height: this.itemHeight + 'px'
|
height: this.itemHeight + 'px'
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
currentValue() {
|
currentValue() {
|
||||||
@ -168,7 +168,7 @@ export default create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
setValue(value) {
|
setValue(value) {
|
||||||
const { options, valueKey } = this;
|
const { options } = this;
|
||||||
for (let i = 0; i < options.length; i++) {
|
for (let i = 0; i < options.length; i++) {
|
||||||
if (this.getOptionText(options[i]) === value) {
|
if (this.getOptionText(options[i]) === value) {
|
||||||
this.setIndex(i);
|
this.setIndex(i);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<div class="van-picker__title" v-if="title" v-text="title" />
|
<div class="van-picker__title" v-if="title" v-text="title" />
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="van-picker__columns">
|
<div class="van-picker__columns" @touchmove.prevent>
|
||||||
<picker-column
|
<picker-column
|
||||||
v-for="(item, index) in currentColumns"
|
v-for="(item, index) in currentColumns"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -47,7 +47,7 @@ export default create({
|
|||||||
columns: {
|
columns: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@ -64,7 +64,7 @@ export default create({
|
|||||||
watch: {
|
watch: {
|
||||||
columns() {
|
columns() {
|
||||||
this.initColumns();
|
this.initColumns();
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user