mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +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() {
|
||||
return {
|
||||
height: this.itemHeight + 'px'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
currentValue() {
|
||||
@ -168,7 +168,7 @@ export default create({
|
||||
},
|
||||
|
||||
setValue(value) {
|
||||
const { options, valueKey } = this;
|
||||
const { options } = this;
|
||||
for (let i = 0; i < options.length; i++) {
|
||||
if (this.getOptionText(options[i]) === value) {
|
||||
this.setIndex(i);
|
||||
|
@ -7,7 +7,7 @@
|
||||
<div class="van-picker__title" v-if="title" v-text="title" />
|
||||
</slot>
|
||||
</div>
|
||||
<div class="van-picker__columns">
|
||||
<div class="van-picker__columns" @touchmove.prevent>
|
||||
<picker-column
|
||||
v-for="(item, index) in currentColumns"
|
||||
:key="index"
|
||||
@ -47,7 +47,7 @@ export default create({
|
||||
columns: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
@ -64,7 +64,7 @@ export default create({
|
||||
watch: {
|
||||
columns() {
|
||||
this.initColumns();
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user