Files
yshopb2c-uniapp/components/DataFormatT.vue

25 lines
402 B
Vue
Raw Normal View History

2020-03-15 13:59:43 +08:00
<template>
<text>{{time}}</text>
2020-03-15 13:59:43 +08:00
</template>
<script>
2020-04-06 17:18:09 +08:00
import { dateFormatT } from "@/utils";
2020-03-15 13:59:43 +08:00
export default {
name: "DataFormatT",
2020-04-06 17:18:09 +08:00
props: ["date"],
2020-03-15 13:59:43 +08:00
data: function() {
return {
time: ""
};
},
mounted() {
2020-04-06 17:18:09 +08:00
this.time = dateFormatT(this.date);
2020-03-15 13:59:43 +08:00
},
watch: {
2020-04-06 17:18:09 +08:00
"$props.date"(props) {
this.time = dateFormatT(this.date);
2020-03-15 13:59:43 +08:00
}
}
};
</script>