commit | author | age
|
9bcb19
|
1 |
<template> |
I |
2 |
<a-modal |
|
3 |
title="日志详情" |
|
4 |
:width="900" |
|
5 |
:visible="visible" |
|
6 |
:confirmLoading="confirmLoading" |
|
7 |
@cancel="handleCancel" |
|
8 |
> |
|
9 |
<a-spin :spinning="confirmLoading"> |
|
10 |
<a-form :form="form"> |
|
11 |
<a-form-item |
|
12 |
label="具体消息" |
|
13 |
:labelCol="labelCol" |
|
14 |
:wrapperCol="wrapperCol" |
|
15 |
> |
|
16 |
<a-textarea :rows="4" v-decorator="['message']"/> |
|
17 |
</a-form-item> |
|
18 |
</a-form> |
|
19 |
</a-spin> |
|
20 |
</a-modal> |
|
21 |
</template> |
|
22 |
<script> |
|
23 |
export default { |
|
24 |
data () { |
|
25 |
return { |
|
26 |
labelCol: { |
|
27 |
xs: { span: 24 }, |
|
28 |
sm: { span: 5 } |
|
29 |
}, |
|
30 |
wrapperCol: { |
|
31 |
xs: { span: 24 }, |
|
32 |
sm: { span: 15 } |
|
33 |
}, |
|
34 |
visible: false, |
|
35 |
confirmLoading: false, |
|
36 |
form: this.$form.createForm(this) |
|
37 |
} |
|
38 |
}, |
|
39 |
methods: { |
|
40 |
// 初始化方法 |
|
41 |
details (record) { |
|
42 |
this.visible = true |
|
43 |
setTimeout(() => { |
|
44 |
this.form.setFieldsValue( |
|
45 |
{ |
|
46 |
message: record.message |
|
47 |
} |
|
48 |
) |
|
49 |
}, 100) |
|
50 |
}, |
|
51 |
handleCancel () { |
|
52 |
this.form.resetFields() |
|
53 |
this.visible = false |
|
54 |
} |
|
55 |
} |
|
56 |
} |
|
57 |
</script> |