Commit d1ea2a56 by 匡雅琴

校验重置

1 parent e812658d
......@@ -6,6 +6,7 @@ import {
defineProps,
withDefaults,
watch,
onBeforeUnmount,
} from "vue";
import type { FormInstance, FormRules } from "element-plus";
import { ElMessage, ElMessageBox } from "element-plus";
......@@ -46,6 +47,8 @@ watch(
// 获取编辑数据
let keysLength = Object.keys(val).length;
ruleFormRef.value?.resetFields();
if (keysLength > 0) {
isEdit.value = true;
//编辑
......@@ -161,8 +164,8 @@ const isUniqueName = async () => {
ruleForm.uniqueName = ''
return false;
}
}
</script>
<template>
......
......@@ -46,6 +46,9 @@ watch(
(val) => {
// 获取编辑数据
let keysLength = Object.keys(val).length;
ruleFormRef.value?.resetFields();
if (keysLength > 0) {
isEdit.value = true;
//编辑
......
......@@ -49,7 +49,6 @@ let currentTab = reactive<Comp>({
// 添加公共模板
const addConfig = (index: number) => {
console.log(index);
propsData = {}
currentTab.tabComp = ''
nextTick(() => {
......@@ -100,10 +99,9 @@ let propsData = reactive({})
// 点击子菜单
const clickSubItem = (index: number, item: any) => {
console.log(index, item);
propsData = {...item}
currentTab.tabComp = ''
currentTab.tabComp = tabData[index].tabComp;
propsData = {...item}
}
// 菜单展开收起
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!