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.
35 lines
601 B
35 lines
601 B
<template>
|
|
<view>
|
|
<u-input :value="value" disabled :placeholder="placeholder" @change="selectDate" @click="showDaCalendar = true" />
|
|
<u-calendar v-model="showDaCalendar" mode="date" max-date="2050-01-01" @change="selectDate"></u-calendar>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
value: {
|
|
type: String,
|
|
default: null
|
|
},
|
|
placeholder: {
|
|
type: String,
|
|
default: '请选择'
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
showDaCalendar: false
|
|
}
|
|
},
|
|
methods: {
|
|
selectDate(date) {
|
|
this.$emit("input", date.result)
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
</style>
|