Blame view

examples/routers/badge.vue 826 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>
1ca07948   xiaofengsha   增加Badge组件showZero...
20
21
22
          <Badge :count="0" showZero>
              <a href="#" class="demo-badge"></a>
          </Badge>
75c32564   Aresn   fixed #646
23
          <Button @click="setCount">set count</Button>
1ca07948   xiaofengsha   增加Badge组件showZero...
24
          
15368be1   梁灏   Support Badge
25
26
27
28
29
30
      </div>
  </template>
  <script>
      export default {
          props: {},
          data () {
75c32564   Aresn   fixed #646
31
32
33
              return {
                  count: 50
              };
15368be1   梁灏   Support Badge
34
          },
75c32564   Aresn   fixed #646
35
36
37
38
39
          methods: {
              setCount () {
                  this.count = 10;
              }
          }
15368be1   梁灏   Support Badge
40
41
      };
  </script>