Blame view

test/routers/more.vue 1.44 KB
2d948738   梁灏   update TimePicker...
1
2
3
  <style>
      body{
          height: 2000px !important;
9d844d53   梁灏   fixed Layout bug
4
5
      }
  </style>
7fa943eb   梁灏   init
6
  <template>
e011898c   梁灏   fixed #197
7
      <i-button type="primary" @click="modal1 = true">显示对话框</i-button>
5d0b89ce   Rijn   change scrolling ...
8
9
      <i-button @click="scrollable = !scrollable">Toggle scrollable</i-button>
      scrollable:{{scrollable}}
e011898c   梁灏   fixed #197
10
11
12
      <Modal
              :visible.sync="modal1"
              title="普通的Modal对话框标题"
5d0b89ce   Rijn   change scrolling ...
13
              :scrollable="scrollable"
e011898c   梁灏   fixed #197
14
15
16
17
18
              @on-ok="ok"
              @on-cancel="cancel">
          <p>对话框内容</p>
          <p>对话框内容</p>
          <p>对话框内容</p>
5d0b89ce   Rijn   change scrolling ...
19
          <i-button @click="scrollable = !scrollable">Toggle scrollable</i-button>
e011898c   梁灏   fixed #197
20
      </Modal>
a87da689   Rijn   added scrollable ...
21
22
      <i-button @click="instance(true)">Create Instance Scrollable</i-button>
      <i-button @click="instance(false)">Create Instance Non-scrollable</i-button>
7fa943eb   梁灏   init
23
24
  </template>
  <script>
7fa943eb   梁灏   init
25
      export default {
e011898c   梁灏   fixed #197
26
27
          data () {
              return {
f9a2e611   Rijn   added scrolling p...
28
                  modal1: false,
5d0b89ce   Rijn   change scrolling ...
29
                  scrollable: false
e011898c   梁灏   fixed #197
30
31
32
33
34
35
36
37
38
              }
          },
          methods: {
              ok () {
                  this.$nextTick(() => this.modal1 = true);
                  this.$Message.info('点击了确定');
              },
              cancel () {
                  this.$Message.info('点击了取消');
a87da689   Rijn   added scrollable ...
39
40
41
42
43
44
45
              },
              instance (scrollable) {
                  this.$Modal.info({
                      title: 'test',
                      content: 'test',
                      scrollable: scrollable
                  });
e011898c   梁灏   fixed #197
46
47
              }
          }
7fa943eb   梁灏   init
48
      }
e1134de2   jingsam   not bundle vue in...
49
  </script>