You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.2 KiB

6 years ago
<template>
<div>
<van-field
v-model="value"
:required="required"
clearable
readonly
:label="label"
@click="onPick">
<van-stepper
6 years ago
:disabled="readonly"
:min="0"
6 years ago
slot="input"
:value="value"
@change="onChange"/>
</van-field>
</div>
</template>
<script>
import {
Field,
Stepper,
} from 'vant';
export default{
components: {
[Field.name]: Field,
[Stepper.name]: Stepper,
},
data(){
return {
showPopup: false,
6 years ago
value: 0,
6 years ago
}
},
props: {
'label': String,
6 years ago
'required': Boolean,
'readonly': Boolean
6 years ago
},
methods: {
onPick(){
this.showPopup = true;
},
onChange(value){
this.showPopup = false;
this.$emit('input', value);
}
},
mounted(){
}
}
</script>

Powered by TurnKey Linux.