项目中心,编辑回显9

This commit is contained in:
gengxin
2025-03-05 13:20:00 +08:00
parent fddce63551
commit be2d3b2960
2 changed files with 4 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
<template>
<a-input
v-model:value="modelV.name"
v-model:value="modelV.value"
:placeholder="placeholder"
:show-count="showCount"
:maxlength="maxlength"
@@ -22,9 +22,6 @@ const props = defineProps({
id: {
type: String,
},
name: {
type: String,
},
placeholder: {
type: String,
},
@@ -54,12 +51,9 @@ const props = defineProps({
});
const emit = defineEmits(["update:value",'update:validated']);
console.log("setup props.value",props.value)
console.log("setup props.onceName",props.onceName)
console.log("setup props",props)
console.log("setup props.name",props.name)
const modelV = ref({
value: props.name
value: props.value
});
const isExistName = ref(true);
@@ -78,14 +72,6 @@ Form.useForm(modelV, rulesRef, { debounce: { wait: 800 } });
onMounted(() => {
validateValue()
console.log("onMounted validateValue 已完成")
console.log("modelV props",props)
console.log("modelV props.name",props.name)
console.log("onMounted modelV 已完成",modelV)
console.log("onMounted modelV.value 已完成",modelV.value)
console.log("onMounted modelV.value.value 已完成",modelV.value.value)
console.log("onMounted props.onceName 已完成",props.onceName)
if(props.onceName==modelV.value.value){
isExistName.value = false;
}else{
@@ -108,7 +94,6 @@ watch(() => modelV.value.value, () => {
},{immediate: true});
async function validateValue() {
console.log("validateValue modelV 项目中心-项目:",modelV.value)
if (!modelV.value.value) {
emit("update:validated", 2);
return Promise.reject("请输入名称");

View File

@@ -1579,7 +1579,7 @@ export default {
}
function handleEdit(record) {
console.log("handleEdit gx 项目中心-项目" ,record);
if (record.type === 1 || record.type === 2) {
if (record.type === 1 || record.type === 2 || record.type === 3) {
state.doublepro = true;
state.projectInfo = record;
state.onceName = record.name;