wwl
2024-12-19 05e3edd60cdde8fe3d82eaeaaec86a8cd5c7d7b5
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<template>
  <div>
    <el-dialog title="收货地址" :visible.sync="dialogFormVisibleProxy">
      <!-- 表单内容 -->
      <el-form>
        <el-form-item label="计划主题" label-width="100px">
          <el-input autocomplete="off" class="input"></el-input>
        </el-form-item>
        <el-form-item label="允许查看人" label-width="100px">
          <el-input autocomplete="off" class="input"></el-input>
        </el-form-item>
        <el-form-item label="上传附件" label-width="100px">
          <FileUpload v-model="form.file"></FileUpload>
        </el-form-item>
      </el-form>
      <Tinymce class="setTinymce" :height="200" v-model="value"></Tinymce>
      <div slot="footer" class="dialog-footer">
        <el-button @click="$emit('update:dialogFormVisible', false)"
          >取 消</el-button
        >
        <el-button type="primary" @click="submitForm">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
   
  <script>
import Tinymce from "@/components/Tinymce.vue";
export default {
  components: {
    Tinymce,
  },
  data() {
    return {
      form: {},
      value: ''
    };
  },
 
  props: {
    dialogFormVisible: {
      type: Boolean,
      default: false,
    },
  },
  computed: {
    dialogFormVisibleProxy: {
      get() {
        return this.dialogFormVisible;
      },
      set(value) {
        this.$emit("update:dialogFormVisible", value);
      },
    },
  },
  methods: {
    submitForm() {
      // 处理表单提交逻辑
      // ...
      this.$emit("update:dialogFormVisible", false); // 提交后关闭对话框
    },
  },
};
</script>
<style scoped lang="scss">
.input {
  width: 250px;
}
</style>