Blame view

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