Blame view

examples/routers/time.vue 473 Bytes
7f9ea0dc   梁灏   init Time component
1
2
  <template>
      <div>
37086acc   梁灏   update Time
3
4
5
6
          <Time :time="time1" />
          <br>
          <Time :time="time2" />
          <br>
d2041471   梁灏   update Time
7
          <Time :time="time3" :interval="1" />
7f9ea0dc   梁灏   init Time component
8
9
10
11
12
      </div>
  </template>
  <script>
      export default {
          data () {
eb37e68c   梁灏   update Time
13
              return {
d2041471   梁灏   update Time
14
                  time1: (new Date()).getTime() - 60 * 59 * 1000,
37086acc   梁灏   update Time
15
                  time2: (new Date()).getTime() - 86400 * 3 * 1000,
d2041471   梁灏   update Time
16
                  time3: (new Date()).getTime() - 1 * 1000
37086acc   梁灏   update Time
17
18
19
20
              }
          }
      }
  </script>