Blame view

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