Blame view

examples/routers/more.vue 1.75 KB
09bce8de   梁灏   update Modal
1
2
3
4
5
6
7
8
9
  <style lang="less">
      .vertical-center-modal{
          display: flex;
          align-items: center;
          justify-content: center;
  
      .ivu-modal{
          top: 0;
      }
9d844d53   梁灏   fixed Layout bug
10
      }
8ed5fd0c   Rijn   added a placehold...
11
12
13
14
15
  
      .placeholder {
          min-height: 2000px;
          width: 1px;
      }
9d844d53   梁灏   fixed Layout bug
16
  </style>
7fa943eb   梁灏   init
17
  <template>
09bce8de   梁灏   update Modal
18
      <i-button @click="modal9 = true">距离顶部 20px</i-button>
e011898c   梁灏   fixed #197
19
      <Modal
09bce8de   梁灏   update Modal
20
21
22
23
24
25
26
27
              title="对话框标题"
              :visible.sync="modal9"
              :style="{top: '20px'}">
          <p>对话框内容</p>
          <p>对话框内容</p>
          <p>对话框内容</p>
      </Modal>
      <i-button @click="modal10 = true">垂直居中</i-button>
e011898c   梁灏   fixed #197
28
      <Modal
09bce8de   梁灏   update Modal
29
30
31
              title="对话框标题"
              :visible.sync="modal10"
              class-name="vertical-center-modal">
e011898c   梁灏   fixed #197
32
33
34
          <p>对话框内容</p>
          <p>对话框内容</p>
          <p>对话框内容</p>
e011898c   梁灏   fixed #197
35
      </Modal>
a87da689   Rijn   added scrollable ...
36
37
      <i-button @click="instance(true)">Create Instance Scrollable</i-button>
      <i-button @click="instance(false)">Create Instance Non-scrollable</i-button>
8ed5fd0c   Rijn   added a placehold...
38
      <div class="placeholder"></div>
7fa943eb   梁灏   init
39
40
  </template>
  <script>
7fa943eb   梁灏   init
41
      export default {
e011898c   梁灏   fixed #197
42
43
          data () {
              return {
09bce8de   梁灏   update Modal
44
45
                  modal9: false,
                  modal10: false,
f9a2e611   Rijn   added scrolling p...
46
                  modal1: false,
5d0b89ce   Rijn   change scrolling ...
47
                  scrollable: false
e011898c   梁灏   fixed #197
48
49
50
51
52
53
54
55
56
              }
          },
          methods: {
              ok () {
                  this.$nextTick(() => this.modal1 = true);
                  this.$Message.info('点击了确定');
              },
              cancel () {
                  this.$Message.info('点击了取消');
a87da689   Rijn   added scrollable ...
57
58
59
60
61
62
63
              },
              instance (scrollable) {
                  this.$Modal.info({
                      title: 'test',
                      content: 'test',
                      scrollable: scrollable
                  });
e011898c   梁灏   fixed #197
64
65
              }
          }
7fa943eb   梁灏   init
66
      }
e1134de2   jingsam   not bundle vue in...
67
  </script>