From 30233b73bdb806214fbdf282fd801999db778d99 Mon Sep 17 00:00:00 2001 From: LiuJiaNan Date: Thu, 29 Feb 2024 16:03:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4rules=E7=94=A8ref=E5=8C=85?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/learning_garden/enterprise_video/components/add.vue | 4 ++-- src/views/learning_garden/learning_garden/components/add.vue | 4 ++-- .../learning_garden/learning_garden/components/add_task.vue | 4 ++-- src/views/security_commitment_pro/template/add.vue | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) 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: "",