Blame view

test/routers/tag.vue 2.51 KB
382c000c   梁灏   Tag add type prop...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  <template>
      <Tag>标签一</Tag>
      <Tag>标签二</Tag>
      <Tag closable>标签三</Tag>
      <Tag closable color="blue">标签一</Tag>
      <Tag closable color="green">标签二</Tag>
      <Tag closable color="red">标签三</Tag>
      <Tag closable color="yellow">标签四</Tag>
      <br><br>
      <Tag type="dot">标签一</Tag>
      <Tag type="dot" closable>标签一</Tag>
      <Tag type="dot" color="blue">标签一</Tag>
      <Tag type="dot" color="blue" closable>标签一</Tag>
      <Tag type="dot" color="green">标签一</Tag>
      <Tag type="dot" color="green" closable>标签一</Tag>
      <Tag type="dot" color="red">标签一</Tag>
      <Tag type="dot" color="red" closable>标签一</Tag>
      <Tag type="dot" color="yellow">标签一</Tag>
      <Tag type="dot" color="yellow" closable>标签一</Tag>
      <br><br>
      <Tag type="border">标签一</Tag>
      <Tag type="border" closable>标签一</Tag>
      <Tag type="border" color="blue">标签一</Tag>
      <Tag type="border" color="blue" closable>标签一</Tag>
      <Tag type="border" color="green">标签一</Tag>
      <Tag type="border" color="green" closable>标签一</Tag>
      <Tag type="border" color="red">标签一</Tag>
      <Tag type="border" color="red" closable>标签一</Tag>
      <Tag type="border" color="yellow">标签一</Tag>
      <Tag type="border" color="yellow" closable>标签一</Tag>
3e855e34   梁灏   fixed #46
31
32
33
      <i-button type="primary" @click="modal1 = true">显示对话框</i-button>
      <Modal
              :visible.sync="modal1"
3c01d81a   梁灏   fixed Modal bug,w...
34
35
              title="普通的Modal对话框标题"
              :loading="loading" @on-ok="ok">
3e855e34   梁灏   fixed #46
36
37
38
          <p>对话框内容</p>
          <p>对话框内容</p>
          <p>对话框内容</p>
3c01d81a   梁灏   fixed Modal bug,w...
39
40
41
          {{ loading }}
          <i-button @click="loading = true">true</i-button>
          <i-button @click="loading = false">false</i-button>
3e855e34   梁灏   fixed #46
42
      </Modal>
5f75101e   YikaJ   Update tag.vue
43
44
      <br><br>
      <Tag type="border" color="yellow" closable @click="clickTag" @on-close="clickTagClose">标签一</Tag>
382c000c   梁灏   Tag add type prop...
45
46
  </template>
  <script>
8879f859   jingsam   fixed umd
47
      import { Tag, Modal, iButton } from 'iview';
382c000c   梁灏   Tag add type prop...
48
      export default {
3e855e34   梁灏   fixed #46
49
50
51
          components: { Tag, Modal, iButton },
          data () {
              return {
3c01d81a   梁灏   fixed Modal bug,w...
52
53
54
55
56
57
                  modal1: false,
                  loading: true
              }
          },
          methods: {
              ok () {
6f340380   jingsam   fixed modal
58
59
60
                  setTimeout(() => {
                      this.modal1 = false;
                  }, 2000);
5f75101e   YikaJ   Update tag.vue
61
62
63
64
65
66
              },
              clickTag() {
                  console.log('click tag');
              },
              clickTagClose() {
                  console.log('click tag close-icon');
3e855e34   梁灏   fixed #46
67
68
              }
          }
382c000c   梁灏   Tag add type prop...
69
70
      }
  </script>