diff --git a/src/views/learning_garden/enterprise_video/components/add.vue b/src/views/learning_garden/enterprise_video/components/add.vue index b3f2408..63ea578 100644 --- a/src/views/learning_garden/enterprise_video/components/add.vue +++ b/src/views/learning_garden/enterprise_video/components/add.vue @@ -42,11 +42,11 @@ const props = defineProps({ }); const emits = defineEmits(["update:visible", "get-data"]); const visible = useVModel(props, "visible", emits); -const rules = ref({ +const rules = { NAME: [{ required: true, message: "视频名称不能为空", trigger: "blur" }], DESCR: [{ required: true, message: "内容不能为空", trigger: "blur" }], file: [{ required: true, message: "请上传附件", trigger: "change" }], -}); +}; const formRef = ref(null); const form = ref({ NAME: "", diff --git a/src/views/learning_garden/learning_garden/components/add.vue b/src/views/learning_garden/learning_garden/components/add.vue index 697ad7e..cd204ce 100644 --- a/src/views/learning_garden/learning_garden/components/add.vue +++ b/src/views/learning_garden/learning_garden/components/add.vue @@ -51,12 +51,12 @@ const props = defineProps({ }); const emits = defineEmits(["update:visible", "get-data"]); const visible = useVModel(props, "visible", emits); -const rules = ref({ +const rules = { TYPE: [{ required: true, message: "请选择类型", trigger: "change" }], TITLE: [{ required: true, message: "请输入标题", trigger: "blur" }], CONTENT: [{ required: true, message: "请输入内容", trigger: "blur" }], file: [{ required: true, message: "请上传附件", trigger: "change" }], -}); +}; const formRef = ref(null); const form = ref({ TYPE: "", diff --git a/src/views/learning_garden/learning_garden/components/add_task.vue b/src/views/learning_garden/learning_garden/components/add_task.vue index 50e129f..0df7580 100644 --- a/src/views/learning_garden/learning_garden/components/add_task.vue +++ b/src/views/learning_garden/learning_garden/components/add_task.vue @@ -60,7 +60,7 @@ const props = defineProps({ }); const emits = defineEmits(["update:visible", "get-data"]); const visible = useVModel(props, "visible", emits); -const rules = ref({ +const rules = { NAME: [{ required: true, message: "名称不能为空", trigger: "blur" }], STUDY_TYPE: [ { required: true, message: "学习类型不能为空", trigger: "blur" }, @@ -68,7 +68,7 @@ const rules = ref({ STUDY_USER_NAMES: [ { required: true, message: "请选择学习人员", trigger: "change" }, ], -}); +}; const formRef = ref(null); const form = ref({ NAME: "", diff --git a/src/views/security_commitment_pro/template/add.vue b/src/views/security_commitment_pro/template/add.vue index 2ba1768..305661e 100644 --- a/src/views/security_commitment_pro/template/add.vue +++ b/src/views/security_commitment_pro/template/add.vue @@ -97,14 +97,14 @@ import { ElMessage } from "element-plus"; const route = useRoute(); const router = useRouter(); const { PROMISE_ID } = route.query; -const rules = ref({ +const rules = { PROMISE_NAME: [ { required: true, message: "请输入承诺书名称", trigger: "blur" }, ], TYPE: [{ required: true, message: "请选择类型", trigger: "blur" }], LEVEL: [{ required: true, message: "请选择级别", trigger: "blur" }], TEXT: [{ required: true, message: "请输入正文", trigger: "blur" }], -}); +}; const form = ref({ PROMISE_NAME: "", TYPE: "",