Blame view

examples/routers/modal.vue 1.29 KB
6259471f   梁灏   support Modal
1
2
  <template>
      <div>
2ac208b9   梁灏   fixed #407
3
4
5
6
7
8
9
10
11
12
13
14
15
16
          <i-button @click.native="modal2 = true">自定义页头和页脚</i-button>
          <Modal v-model="modal2" width="360">
              <p slot="header" style="color:#f60;text-align:center">
                  <Icon type="information-circled"></Icon>
                  <span>删除确认</span>
              </p>
              <div style="text-align:center">
                  <p>此任务删除后,下游 10 个任务将无法执行。</p>
                  <p>是否继续删除?</p>
              </div>
              <div slot="footer">
                  <i-button type="error" size="large" long :loading="modal_loading" @click.native="del">删除</i-button>
              </div>
          </Modal>
6259471f   梁灏   support Modal
17
18
19
20
      </div>
  </template>
  <script>
      export default {
2ac208b9   梁灏   fixed #407
21
22
23
24
25
26
27
28
29
          data () {
              return {
                  modal2: false,
                  modal_loading: false,
                  modal3: false,
                  modal4: false,
                  modal5: false
              }
          },
6259471f   梁灏   support Modal
30
          methods: {
2ac208b9   梁灏   fixed #407
31
32
33
34
35
36
37
              del () {
                  this.modal_loading = true;
                  setTimeout(() => {
                      this.modal_loading = false;
                      this.modal2 = false;
                      this.$Message.success('删除成功');
                  }, 2000);
6259471f   梁灏   support Modal
38
39
40
41
              }
          }
      }
  </script>