Blame view

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