Blame view

examples/routers/badge.vue 716 Bytes
15368be1   梁灏   Support Badge
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  <style scoped>
      .demo-badge{
          width: 42px;
          height: 42px;
          background: #eee;
          border-radius: 6px;
          display: inline-block;
      }
  </style>
  <style>
      .demo-badge-alone{
          background: #5cb85c !important;
      }
  </style>
  <template>
      <div>
75c32564   Aresn   fixed #646
17
          <Badge dot :count="count">
15368be1   梁灏   Support Badge
18
19
              <a href="#" class="demo-badge"></a>
          </Badge>
75c32564   Aresn   fixed #646
20
          <Button @click="setCount">set count</Button>
15368be1   梁灏   Support Badge
21
22
23
24
25
26
      </div>
  </template>
  <script>
      export default {
          props: {},
          data () {
75c32564   Aresn   fixed #646
27
28
29
              return {
                  count: 50
              };
15368be1   梁灏   Support Badge
30
          },
75c32564   Aresn   fixed #646
31
32
33
34
35
          methods: {
              setCount () {
                  this.count = 10;
              }
          }
15368be1   梁灏   Support Badge
36
37
      };
  </script>