Commit 6710e433 by 匡雅琴

修改重置

1 parent 51a89c5c
......@@ -83,9 +83,11 @@ const rules = reactive<FormRules>({
remark: { required: true, message: "请输入描述", trigger: "blur" },
});
const resetForm = (formEl: FormInstance | undefined) => {
if (!formEl) return;
formEl.resetFields();
const resetForm = () => {
ruleForm.remark = ''
if (!isEdit.value) {
ruleForm.uniqueName = ''
}
editorDom.value?.setValue();
};
......@@ -98,7 +100,6 @@ const submitForm = async (formEl: FormInstance | undefined) => {
if (valid) {
// 判断唯一标识
isUniqueName().then(async (result) => {
console.log(result);
if (!result) return;
//发起请求(新增或编辑)
......
......@@ -81,9 +81,9 @@ const rules = reactive<FormRules>({
});
// 重置表单
const resetForm = (formEl: FormInstance | undefined) => {
if (!formEl) return;
formEl.resetFields();
const resetForm = () => {
ruleForm.remark = ''
ruleForm.templateName = ''
editorDom.value?.setValue();
};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!