<template>
	<uni-datetime-picker :type="type" v-model="_value" placeholder="点击选择" :border="false"/>
</template>

<script>
export default {
  props: {
    value: {
      type: String,
	  required: true
    },
    type : {
      type: String,
      required: false
    },
    valueFormat : {
      type: String,
      required: false,
	  default : ()=> "YYYY-MM-DD"
    },
  },
  computed: {
  	_value: {
  		get() {
  			return this.value;
  		},
  		set(val) {
			const time = val ? this.$dayjs(val).format(this.valueFormat) : val;
  			this.$emit('input', time);
  		}
  	}
  },
  data() {
	  return {}
  },
  mounted() {}
}
</script>

<style>
</style>

<style>
</style>