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
| <template>
| <a-modal
| :width="400"
| :visible="reasonVisible"
| title="下载原因"
| :destroyOnClose="true"
| :maskClosable="false"
| @cancel="reasonCancel"
| @ok="reasonOk"
| >
| <a-form-model-item ref="name" label="下载原因">
| <a-input type="textarea" v-model="reason" placeHolder="请输入下载原因" />
| </a-form-model-item>
| </a-modal>
| </template>
|
| <script>
| export default {
| props: {
| reasonVisible: {
| type: Boolean,
| required: true,
| },
| },
| data() {
| return {
| reason: "",
| };
| },
| methods: {
| reasonCancel() {
| this.$emit("update:reasonVisible", false);
| },
| reasonOk() {
| if ("" == this.reason.trim()) {
| this.$message.error("下载原因不能为空");
| return false;
| }
| this.reasonCancel();
| this.$emit("ok", this.reason);
| },
| },
| };
| </script>
|
| <style scoped>
| </style>
|
|