Blame view

examples/routers/modal.vue 767 Bytes
6259471f   梁灏   support Modal
1
2
  <template>
      <div>
e44ba4d4   梁灏   Modal support glo...
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 {
172e4396   梁灏   update $Modal wit...
17
18
          data () {
              return {
e44ba4d4   梁灏   Modal support glo...
19
                  modal1: false
172e4396   梁灏   update $Modal wit...
20
21
              }
          },
6259471f   梁灏   support Modal
22
          methods: {
e44ba4d4   梁灏   Modal support glo...
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>