Blame view

test/routers/more.vue 1.65 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
11
      }
  </style>
7fa943eb   梁灏   init
12
  <template>
09bce8de   梁灏   update Modal
13
      <i-button @click="modal9 = true">距离顶部 20px</i-button>
e011898c   梁灏   fixed #197
14
      <Modal
09bce8de   梁灏   update Modal
15
16
17
18
19
20
21
22
              title="对话框标题"
              :visible.sync="modal9"
              :style="{top: '20px'}">
          <p>对话框内容</p>
          <p>对话框内容</p>
          <p>对话框内容</p>
      </Modal>
      <i-button @click="modal10 = true">垂直居中</i-button>
e011898c   梁灏   fixed #197
23
      <Modal
09bce8de   梁灏   update Modal
24
25
26
              title="对话框标题"
              :visible.sync="modal10"
              class-name="vertical-center-modal">
e011898c   梁灏   fixed #197
27
28
29
          <p>对话框内容</p>
          <p>对话框内容</p>
          <p>对话框内容</p>
e011898c   梁灏   fixed #197
30
      </Modal>
a87da689   Rijn   added scrollable ...
31
32
      <i-button @click="instance(true)">Create Instance Scrollable</i-button>
      <i-button @click="instance(false)">Create Instance Non-scrollable</i-button>
7fa943eb   梁灏   init
33
34
  </template>
  <script>
7fa943eb   梁灏   init
35
      export default {
e011898c   梁灏   fixed #197
36
37
          data () {
              return {
09bce8de   梁灏   update Modal
38
39
                  modal9: false,
                  modal10: false,
f9a2e611   Rijn   added scrolling p...
40
                  modal1: false,
5d0b89ce   Rijn   change scrolling ...
41
                  scrollable: false
e011898c   梁灏   fixed #197
42
43
44
45
46
47
48
49
50
              }
          },
          methods: {
              ok () {
                  this.$nextTick(() => this.modal1 = true);
                  this.$Message.info('点击了确定');
              },
              cancel () {
                  this.$Message.info('点击了取消');
a87da689   Rijn   added scrollable ...
51
52
53
54
55
56
57
              },
              instance (scrollable) {
                  this.$Modal.info({
                      title: 'test',
                      content: 'test',
                      scrollable: scrollable
                  });
e011898c   梁灏   fixed #197
58
59
              }
          }
7fa943eb   梁灏   init
60
      }
e1134de2   jingsam   not bundle vue in...
61
  </script>