Blame view

ant-design-vue-jeecg/src/views/examples/form/stepForm/Step2.vue 1.75 KB
肖超群 authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
<template>
  <div>
    <a-form style="max-width: 500px; margin: 40px auto 0;">
      <a-alert
        :closable="true"
        message="确认转账后,资金将直接打入对方账户,无法退回。"
        style="margin-bottom: 24px;"
      />
      <a-form-item
        label="付款账户"
        :labelCol="{span: 5}"
        :wrapperCol="{span: 19}"
        class="stepFormText"
      >
        ant-design@alipay.com
      </a-form-item>
      <a-form-item
        label="收款账户"
        :labelCol="{span: 5}"
        :wrapperCol="{span: 19}"
        class="stepFormText"
      >
        test@example.com
      </a-form-item>
      <a-form-item
        label="收款人姓名"
        :labelCol="{span: 5}"
        :wrapperCol="{span: 19}"
        class="stepFormText"
      >
        Alex
      </a-form-item>
      <a-form-item
        label="转账金额"
        :labelCol="{span: 5}"
        :wrapperCol="{span: 19}"
        class="stepFormText"
      >
        ¥ 5,000.00
      </a-form-item>
      <a-form-item :wrapperCol="{span: 19, offset: 5}">
        <a-button :loading="loading" type="primary" @click="nextStep">提交</a-button>
        <a-button style="margin-left: 8px" @click="prevStep">上一步</a-button>
      </a-form-item>
    </a-form>
  </div>
</template>

<script>
肖超群 authored
50
51
52
53
54
55
56
57
58
59
60
61
62
63
export default {
  name: "Step2",
  data() {
    return {
      loading: false
    }
  },
  methods: {
    nextStep() {
      let that = this
      that.loading = true
      setTimeout(function () {
        that.$emit('nextStep')
      }, 1500)
肖超群 authored
64
    },
肖超群 authored
65
66
    prevStep() {
      this.$emit('prevStep')
肖超群 authored
67
68
    }
  }
肖超群 authored
69
}
肖超群 authored
70
71
72
</script>

<style lang="less" scoped>
肖超群 authored
73
74
.stepFormText {
  margin-bottom: 24px;
肖超群 authored
75
肖超群 authored
76
77
78
  .ant-form-item-label,
  .ant-form-item-control {
    line-height: 22px;
肖超群 authored
79
  }
肖超群 authored
80
}
肖超群 authored
81
82

</style>