zhuoyuan.wang
2024-06-19 15ebe96f28cadec6a726c5324593a40bbf56205f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<script>
import {h} from "vue"
export default {
  name: 'JsonDate',
  inject: ['timeformat'],
  functional: true,
  props: {
    jsonValue: {
      type: Date,
      required: true
    }
  },
  render () {
    const value = this.jsonValue;
    const timeformat = this.timeformat;
 
    return h('span', {
      class: {
        'jv-item': true,
        'jv-string': true,
      },
      innerText: `"${timeformat(value)}"`
    })
  }
};
</script>