Blame view

examples/routers/modal.vue 1.32 KB
6259471f   梁灏   support Modal
1
2
  <template>
      <div>
06a4433d   梁灏   update Modal Icons
3
          <Button type="primary" @click="modal1 = true">Display dialog box</Button>
9edded49   梁灏   update Modal demo
4
          <Button type="primary" @click="modal2 = true">Display dialog box</Button>
1c7289e9   梁灏   Modal add mask & ...
5
          <Button @click="hc">Click Me</Button>
06a4433d   梁灏   update Modal Icons
6
7
          <Modal
                  v-model="modal1"
1c7289e9   梁灏   Modal add mask & ...
8
                  title="Common Modal dialog box title"
d4b59a9a   梁灏   Modal add dragabl...
9
                  dragable
06a4433d   梁灏   update Modal Icons
10
11
                  @on-ok="ok"
                  @on-cancel="cancel">
06a4433d   梁灏   update Modal Icons
12
13
14
              <p>Content of dialog</p>
              <p>Content of dialog</p>
              <p>Content of dialog</p>
06a4433d   梁灏   update Modal Icons
15
          </Modal>
9edded49   梁灏   update Modal demo
16
17
18
19
20
21
22
23
24
25
          <Modal
                  v-model="modal2"
                  title="Common Modal dialog box title2"
                  dragable
                  @on-ok="ok"
                  @on-cancel="cancel">
              <p>Content of dialog</p>
              <p>Content of dialog</p>
              <p>Content of dialog</p>
          </Modal>
6259471f   梁灏   support Modal
26
27
28
29
      </div>
  </template>
  <script>
      export default {
06a4433d   梁灏   update Modal Icons
30
31
          data () {
              return {
9edded49   梁灏   update Modal demo
32
33
                  modal1: false,
                  modal2: false
06a4433d   梁灏   update Modal Icons
34
35
              }
          },
6259471f   梁灏   support Modal
36
          methods: {
06a4433d   梁灏   update Modal Icons
37
38
39
40
41
              ok () {
                  this.$Message.info('Clicked ok');
              },
              cancel () {
                  this.$Message.info('Clicked cancel');
1c7289e9   梁灏   Modal add mask & ...
42
43
44
              },
              hc () {
                  this.$Message.info('Hello');
6259471f   梁灏   support Modal
45
46
47
48
              }
          }
      }
  </script>