Blame view

examples/routers/modal.vue 767 Bytes
6259471f   梁灏   support Modal
1
2
  <template>
      <div>
06a4433d   梁灏   update Modal Icons
3
4
5
6
7
8
9
10
11
12
          <Button type="primary" @click="modal1 = true">Display dialog box</Button>
          <Modal
                  v-model="modal1"
                  title="Common Modal dialog box title"
                  @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
13
14
15
16
      </div>
  </template>
  <script>
      export default {
06a4433d   梁灏   update Modal Icons
17
18
19
20
21
          data () {
              return {
                  modal1: false
              }
          },
6259471f   梁灏   support Modal
22
          methods: {
06a4433d   梁灏   update Modal Icons
23
24
25
26
27
              ok () {
                  this.$Message.info('Clicked ok');
              },
              cancel () {
                  this.$Message.info('Clicked cancel');
6259471f   梁灏   support Modal
28
29
30
31
              }
          }
      }
  </script>