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>
import { dataFormatT } from "@/utils";
export default {
name: "DataFormatT",
props: ["data"],
data: function() {
return {
time: ""
};
},
mounted() {
this.time = dataFormatT(this.data);
},
watch: {
"$props.data"(props) {
this.time = dataFormatT(this.data);
}
}
};
</script>