<template>
    <span>
        <span :title="value" v-if="value">{{ date | dateFormat(format) }}</span>
    </span>
</template>
<script>
import { tools } from 'hq-tools'
export default {
    name: "DateTd",
    data() {
        return {};
    },
    computed: {
        date() {
            if (this.value){
                return tools.dateFormat(new Date(this.value),this.format);
            }else{
                return '《空》'
            }
        }
    },
    mounted: function () { },
    props: {
        value: String | Number | Date,
        format: String
    }
};
</script>
<style scoped>
.hide {
    display: none;
}
</style>