Blame view

examples/routers/card.vue 3.03 KB
7fa943eb   梁灏   init
1
  <template>
19d41352   梁灏   update Card
2
      <Card style="width:350px">
743d0278   梁灏   update Card
3
4
5
6
7
8
9
10
11
12
13
14
          <p slot="title">
              <Icon type="ios-film-outline"></Icon>
              经典电影
          </p>
          <a href="#" slot="extra" @click.prevent="changeLimit">
              <Icon type="ios-loop-strong"></Icon>
              换一换
          </a>
          <ul>
              <li v-for="item in movieList">
                  <a :href="item.url" target="_blank">{{ item.name }}</a>
                  <span>
79288d43   梁灏   support Poptip & ...
15
                      <!--<Icon type="ios-star" v-for="n in 4"></Icon><Icon type="ios-star" v-if="item.rate >= 9.5"></Icon><Icon type="ios-star-half" v-else></Icon>-->
743d0278   梁灏   update Card
16
17
18
19
                      {{ item.rate }}
                  </span>
              </li>
          </ul>
15bae144   梁灏   add Card component
20
      </Card>
7fa943eb   梁灏   init
21
22
  </template>
  <script>
7fa943eb   梁灏   init
23
      export default {
7fa943eb   梁灏   init
24
25
          data () {
              return {
743d0278   梁灏   update Card
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
                  limitNum: 5,
                  limitFrom: 0,
                  movieList: [
                      {
                          name: '肖申克的救赎',
                          url: 'https://movie.douban.com/subject/1292052/',
                          rate: 9.6
                      },
                      {
                          name: '这个杀手不太冷',
                          url: 'https://movie.douban.com/subject/1295644/',
                          rate: 9.4
                      },
                      {
                          name: '霸王别姬',
                          url: 'https://movie.douban.com/subject/1291546/',
                          rate: 9.5
                      },
                      {
                          name: '阿甘正传',
                          url: 'https://movie.douban.com/subject/1292720/',
                          rate: 9.4
                      },
                      {
                          name: '美丽人生',
                          url: 'https://movie.douban.com/subject/1292063/',
                          rate: 9.5
                      },
                      {
                          name: '千与千寻',
                          url: 'https://movie.douban.com/subject/1291561/',
                          rate: 9.2
                      },
                      {
                          name: '辛德勒的名单',
                          url: 'https://movie.douban.com/subject/1295124/',
                          rate: 9.4
                      },
                      {
                          name: '海上钢琴师',
                          url: 'https://movie.douban.com/subject/1292001/',
                          rate: 9.2
                      },
                      {
                          name: '机器人总动员',
                          url: 'https://movie.douban.com/subject/2131459/',
                          rate: 9.3
                      },
                      {
                          name: '盗梦空间',
                          url: 'https://movie.douban.com/subject/3541415/',
                          rate: 9.2
                      }
                  ]
7fa943eb   梁灏   init
80
81
              }
          },
7fa943eb   梁灏   init
82
          methods: {
743d0278   梁灏   update Card
83
84
85
              changeLimit () {
                  this.limitFrom = this.limitFrom === 0 ? 5 : 0;
              }
7fa943eb   梁灏   init
86
87
          }
      }
743d0278   梁灏   update Card
88
  </script>