Blame view

local/routers/index.vue 1.63 KB
7fa943eb   梁灏   init
1
2
3
4
  <style>
  
  </style>
  <template>
e355dd49   梁灏   add Select Component
5
      <Page :total="100" show-sizer></Page>
7fa943eb   梁灏   init
6
7
  </template>
  <script>
4935594e   梁灏   fixed #21
8
      import { Modal, Button, Message, Page } from 'iview';
39e6e965   梁灏   fixed checkbox bu...
9
  
7fa943eb   梁灏   init
10
      export default {
4935594e   梁灏   fixed #21
11
          components: { Modal, Button, Page },
7fa943eb   梁灏   init
12
13
14
15
16
          props: {
          
          },
          data () {
              return {
be966e9f   梁灏   add Modal component
17
  
7fa943eb   梁灏   init
18
19
20
              }        
          },
          methods: {
be966e9f   梁灏   add Modal component
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
              info () {
                  Modal.info({
                      title: '这是对话框标题',
                      content: `<p>这是对话框内容</p><p>这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容</p>`
                  });
              },
              success () {
                  Modal.success();
              },
              warning () {
                  Modal.warning();
              },
              error () {
                  Modal.error();
              },
              confirm () {
                  Modal.confirm({
  //                    okText: 'OK',
  //                    cancelText: 'Cancel',
                      title: '删除提示',
                      content: '删除后将不可找回,您确定要删除吗?',
                      onCancel () {
                          Message.info('cancel it');
                      },
                      onOk () {
                          setTimeout(() => {
                              Modal.remove();
                              Message.success('OK!');
                          }, 2000);
                      },
                      loading: true
                  });
39e6e965   梁灏   fixed checkbox bu...
53
              }
7fa943eb   梁灏   init
54
55
56
          }
      }
  </script>