Blame view

examples/routers/tag.vue 1.05 KB
382c000c   梁灏   Tag add type prop...
1
  <template>
456daf34   梁灏   support Tag
2
      <div>
dc39cc31   daiyanze   Feature: Checkabl...
3
          <Tag v-for="item in count" :key="item" :name="item" type="border" color="yellow" @on-close="close" @on-check="check" closable>标签{{ item + 1 }}</Tag>
62bf2b3c   daiyanze   Modify: example o...
4
5
6
          <div><Tag v-for="item in count" :key="item" :name="item" color="yellow" @on-close="close" @on-check="check" checkable>可选标签{{ item + 1 }}</Tag></div>
          <div><Tag v-for="item in count" :key="item" :name="item" type="dot" color="blue" @on-close="close" @on-check="check" closable checkable>可选可关闭标签{{ item + 1 }}</Tag></div>
          <br />
ec4117cb   梁灏   tag add prop: name
7
          <Button icon="ios-plus-empty" type="dashed" size="small" @click="count += 1">添加标签</Button>
456daf34   梁灏   support Tag
8
      </div>
382c000c   梁灏   Tag add type prop...
9
10
  </template>
  <script>
382c000c   梁灏   Tag add type prop...
11
      export default {
3e855e34   梁灏   fixed #46
12
13
          data () {
              return {
ec4117cb   梁灏   tag add prop: name
14
                  count: 3
dc39cc31   daiyanze   Feature: Checkabl...
15
              };
3c01d81a   梁灏   fixed Modal bug,w...
16
17
          },
          methods: {
ec4117cb   梁灏   tag add prop: name
18
19
20
              close (e, name) {
                  console.log(e);
                  console.log(name);
dc39cc31   daiyanze   Feature: Checkabl...
21
22
23
24
              },
              check (e, name) {
                  console.log(e);
                  console.log(name);
3e855e34   梁灏   fixed #46
25
26
              }
          }
dc39cc31   daiyanze   Feature: Checkabl...
27
      };
382c000c   梁灏   Tag add type prop...
28
  </script>