Blame view

test/routers/page.vue 1.83 KB
7fa943eb   梁灏   init
1
  <style>
7570318b   梁灏   fixed Tooltip pla...
2
  
7fa943eb   梁灏   init
3
4
  </style>
  <template>
b8273bfc   jingsam   add a nav for tes...
5
6
7
      <Page :total="40" size="small"></Page>
      <Page :total="40" size="small" show-elevator show-sizer></Page>
      <Page :total="40" size="small" show-total></Page>
382c000c   梁灏   Tag add type prop...
8
      <Page :total="100" show-sizer :page-size="5" :page-size-opts="[5,10,15,20]"></Page>
7fa943eb   梁灏   init
9
10
  </template>
  <script>
b8273bfc   jingsam   add a nav for tes...
11
      import { Modal, Button, Message, Page } from 'iview';
7fa943eb   梁灏   init
12
13
  
      export default {
b8273bfc   jingsam   add a nav for tes...
14
          components: { Modal, Button, Page },
7fa943eb   梁灏   init
15
          props: {
b8273bfc   jingsam   add a nav for tes...
16
          
7fa943eb   梁灏   init
17
18
19
          },
          data () {
              return {
d6342fe1   jingsam   fixed ie bug
20
  
b8273bfc   jingsam   add a nav for tes...
21
              }        
7fa943eb   梁灏   init
22
23
          },
          methods: {
b8273bfc   jingsam   add a nav for tes...
24
25
26
27
28
29
30
31
32
33
34
35
36
37
              info () {
                  Modal.info({
                      title: '这是对话框标题',
                      content: `<p>这是对话框内容</p><p>这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容</p>`
                  });
              },
              success () {
                  Modal.success();
              },
              warning () {
                  Modal.warning();
              },
              error () {
                  Modal.error();
45b672ca   梁灏   add Steps UI
38
              },
b8273bfc   jingsam   add a nav for tes...
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
              confirm () {
                  Modal.confirm({
  //                    okText: 'OK',
  //                    cancelText: 'Cancel',
                      title: '删除提示',
                      content: '删除后将不可找回,您确定要删除吗?',
                      onCancel () {
                          Message.info('cancel it');
                      },
                      onOk () {
                          setTimeout(() => {
                              Modal.remove();
                              Message.success('OK!');
                          }, 2000);
                      },
                      loading: true
                  });
7fa943eb   梁灏   init
56
57
58
              }
          }
      }
d6342fe1   jingsam   fixed ie bug
59
  </script>