Blame view

examples/routers/modal.vue 764 Bytes
6259471f   梁灏   support Modal
1
2
  <template>
      <div>
672a2805   梁灏   fixed #505
3
4
5
6
          <Button type="primary" @click="modal1 = true">显示对话框</Button>
          <Modal
                  v-model="modal1"
                  title="普通的Modal对话框标题"
672a2805   梁灏   fixed #505
7
8
9
10
11
12
                  @on-ok="ok"
                  @on-cancel="cancel">
              <p>对话框内容</p>
              <p>对话框内容</p>
              <p>对话框内容</p>
          </Modal>
6259471f   梁灏   support Modal
13
14
15
16
      </div>
  </template>
  <script>
      export default {
672a2805   梁灏   fixed #505
17
18
19
20
21
          data () {
              return {
                  modal1: false
              }
          },
6259471f   梁灏   support Modal
22
          methods: {
672a2805   梁灏   fixed #505
23
24
              ok () {
                  this.$Message.info('点击了确定');
e5337c81   梁灏   fixed some compon...
25
              },
672a2805   梁灏   fixed #505
26
27
              cancel () {
                  this.$Message.info('点击了取消');
6259471f   梁灏   support Modal
28
29
30
31
              }
          }
      }
  </script>