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.

42 lines
685 B

<template>
<view style="width: 100%;">
<u-input type="select" :value="value" @click="show = true"></u-input>
<u-calendar v-model="show" :mode="'range'" @change="change"></u-calendar>
</view>
</template>
<script>
export default {
props: {
value: {
type: String,
default: null
},
placeholder: {
type: String,
default: '请选择'
},
},
data() {
return {
show: false
}
},
methods: {
change(data) {
let range = data[0].value + "-" + data[1].value + this.separator + data[2].value + "-" + data[3].value;
console.log(range)
this.$emit("input", range)
},
},
mounted() {
}
}
</script>
<style>
</style>

Powered by TurnKey Linux.